Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.9
Author Message
dirtbag
Regular
Regular



Joined: Nov 09, 2003
Posts: 73

PostPosted: Thu Jan 22, 2004 2:42 am Reply with quote

I have been using your Site Info Block which is excellent block. The problem thati find is i have a couple of my members that have really long username that are longer than the Block.. The long username makes the Site Info Block expand more than it should screwing up the formatting on the Website making it look bad..

Is there someway to solve this problem. Maybe a way to show just a set limit of character in the username like 25 or something and all characters after 25 are not displayed ???

Thanks
Rick
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Jan 22, 2004 8:08 am Reply with quote

I actually modified the block for that very reason months ago and never got around to reissuing it Laughing Find this code
Code:
    if (!$memberinfo[user_allow_viewonline]&&!is_admin($admin)) {

      $hiddenTotal++;
   }
    elseif (!$memberinfo[user_allow_viewonline]&&is_admin($admin)) {
      $hiddenTotal++;
      if (strlen($session[uname])<13) {
      $who_online_now .= "$zi:&nbsp;<a href=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\"><img src=\"images/blocks/icon_mini_profile.gif\" border=\"0\" alt=\"Check the profile of $session[uname]\"></a>&nbsp;<a href=\"messages-post-.html$memberinfo[user_id]\"><img src=\"images/blocks/nopm.gif\" border=\"0\" alt=\"Send a quick private message to $session[uname]\"></a>&nbsp;<A HREF=\"forum-userprofile-.html$memberinfo[user_id]\">$session[uname]</a>(H)<br />\n";}
      else {
      $who_online_now .= "$zi:&nbsp;<a href=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\"><img src=\"images/blocks/icon_mini_profile.gif\" border=\"0\" alt=\"Check the profile of $session[uname]\"></a>&nbsp;<a href=\"messages-post-.html$memberinfo[user_id]\"><img src=\"images/blocks/nopm.gif\" border=\"0\" alt=\"Send a quick private message to $session[uname]\"></a>&nbsp;<A HREF=\"forum-userprofile-.html$memberinfo[user_id]\">".substr($session[uname],0,10)."..."."</a>(H)<br />\n";}
       $who_online_now .= ($i != $member_online_num ? "  " : "");
       $i++;
   }
    else {
      if (strlen($session[uname])<13) {
      $who_online_now .= "$zi:&nbsp;<a href=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\"><img src=\"images/blocks/icon_mini_profile.gif\" border=\"0\" alt=\"Check the profile of $session[uname]\"></a>&nbsp;<a href=\"messages-post-.html$memberinfo[user_id]\"><img src=\"images/blocks/nopm.gif\" border=\"0\" alt=\"Send a quick private message to $session[uname]\"></a>&nbsp;<A HREF=\"forum-userprofile-.html$memberinfo[user_id]\">$session[uname]</a><br />\n";}
      else {
      $who_online_now .= "$zi:&nbsp;<a href=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\"><img src=\"images/blocks/icon_mini_profile.gif\" border=\"0\" alt=\"Check the profile of $session[uname]\"></a>&nbsp;<a href=\"messages-post-.html$memberinfo[user_id]\"><img src=\"images/blocks/nopm.gif\" border=\"0\" alt=\"Send a quick private message to $session[uname]\"></a>&nbsp;<A HREF=\"forum-userprofile-.html$memberinfo[user_id]\">".substr($session[uname],0,10)."..."."</a><br />\n";}
       $who_online_now .= ($i != $member_online_num ? "  " : "");
       $i++;
   }
and change it to
Code:
   $sessionNameModified = strlen($session[uname])<13?$session[uname]:substr($session[uname],0,10)."...";

    if (!$memberinfo[user_allow_viewonline]&&!is_admin($admin)) {
      $hiddenTotal++;
   }
    elseif (!$memberinfo[user_allow_viewonline]&&is_admin($admin)) {
      $hiddenTotal++;
      $who_online_now .= "$zi:&nbsp;<a href=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\"><img src=\"images/blocks/icon_mini_profile.gif\" border=\"0\" alt=\"Check the profile of $session[uname]\"></a>&nbsp;<a href=\"messages-post-.html$memberinfo[user_id]\"><img src=\"images/blocks/nopm.gif\" border=\"0\" alt=\"Send a quick private message to $session[uname]\"></a>&nbsp;<A HREF=\"forum-userprofile-.html$memberinfo[user_id]\">".$sessionNameModified."</a>(H)<br />\n";
       $who_online_now .= ($i != $member_online_num ? "  " : "");
       $i++;
   }
    else {
      $who_online_now .= "$zi:&nbsp;<a href=\"modules.php?name=Your_Account&op=userinfo&username=$session[uname]\"><img src=\"images/blocks/icon_mini_profile.gif\" border=\"0\" alt=\"Check the profile of $session[uname]\"></a>&nbsp;<a href=\"messages-post-.html$memberinfo[user_id]\"><img src=\"images/blocks/nopm.gif\" border=\"0\" alt=\"Send a quick private message to $session[uname]\"></a>&nbsp;<A HREF=\"forum-userprofile-.html$memberinfo[user_id]\">".$sessionNameModified."</a><br />\n";
       $who_online_now .= ($i != $member_online_num ? "  " : "");
       $i++;
   }

Of course you can modify the number 13 to be whatever you need.
 
View user's profile Send private message
dirtbag







PostPosted: Thu Jan 22, 2004 9:58 am Reply with quote

Raven,

I dont know if its me but i can not find that piece of code that you posted above?? Anyways i looked for both of them inside on my block-Site_Info.php and could not find the exact match.. I see the section that is similiar but i will post the code below from my block and maybe you can tell me the section to change..

Code:
if (eregi("block-Site_Info.php",$_SERVER['PHP_SELF'])) {

    Header("Location: index.php");
}

function convertIP ($xip) {
   global $admin;
   if (is_admin($admin)) return $xip;
   $xipx = explode('.',$xip);
   for ($i=2;$i<count($xipx);$i++) {
      $xipx[$i] = preg_replace ('/(0|1|2|3|4|5|6|7|8|9)/', "x", $xipx[$i]);
   }
   return implode('.',$xipx);
}


$content = "";

mt_srand ((double)microtime()*1000000);
global $dbi, $nukeurl, $startdate, $user, $cookie, $prefix, $user_prefix, $db, $anonymous, $mode, $t, $f, $redirect, $random_num, $admin, $gfx_chk;
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 10);
cookiedecode($user);
$uname = $cookie[1];

$sql = "SELECT username,user_id FROM $user_prefix"._users." ORDER BY user_id DESC LIMIT 0,1";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);

$lastusername = $row[username];
$lastuser = $row[user_id];
$numrows = $db->sql_numrows($db->sql_query("SELECT user_id FROM $user_prefix"._users.""));
$numrows1 = $numrows-1;
$sql = "SELECT uname, host_addr FROM $prefix"._session." WHERE guest=0";
$result = $db->sql_query($sql);
$member_online_num = $db->sql_numrows($result);
$who_online_now = "";
$i = 1;
$hiddenTotal = 0;
while ($session = $db->sql_fetchrow($result)) {
    $sql = "select user_id, username, user_allow_viewonline from ".$user_prefix."_users where username='$session[uname]'";
    $member_result =  $db->sql_query($sql);
    if (sql_num_rows($member_result, $dbi) == 1) {
        $memberinfo = sql_fetch_array($member_result, $dbi);
    }
    if ($i < 10) $zi = "0$i";
    else $zi = $i;
    if (is_admin($admin)) {
      $sql1 = "SELECT host_addr FROM $prefix"._session." WHERE uname='$memberinfo[username]'";
      $result1 = $db->sql_query($sql1);
      mysql_fetch_row($result1);
      $zi = "<a href=\"http://www.samspade.org/t/lookat?a=".$session[host_addr]."\" target=\"_blank\">".$zi."</a>";
   }
    if (!$memberinfo[user_allow_viewonline]&&!is_admin($admin)) {
      $hiddenTotal++;
   }
    elseif (!$memberinfo[user_allow_viewonline]&&is_admin($admin)) {
      $hiddenTotal++;
      $who_online_now .= "$zi:&nbsp;<a href=\"userinfo-.html$session[uname]\"><img src=\"images/blocks/icon_mini_profile.gif\" border=\"0\" height=\"10\" alt=\"Check the profile of $session[uname]\"></a>&nbsp;<a href=\"messages-post-.html$memberinfo[user_id]\"><img src=\"images/blocks/nopm.gif\" border=\"0\" alt=\"Send a quick private message to $session[uname]\"></a>&nbsp;<A HREF=\"forums.html?file=profile&mode=viewprofile&u=$memberinfo[user_id]\">$session[uname]</a>(H)<br />\n";
       $who_online_now .= ($i != $member_online_num ? "  " : "");
       $i++;
   }
    else {
      $who_online_now .= "$zi:&nbsp;<a href=\"userinfo-.html$session[uname]\"><img src=\"images/blocks/icon_mini_profile.gif\" border=\"0\" height=\"10\" alt=\"Check the profile of $session[uname]\"></a>&nbsp;<a href=\"messages-post-.html$memberinfo[user_id]\"><img src=\"images/blocks/nopm.gif\" border=\"0\" alt=\"Send a quick private message to $session[uname]\"></a>&nbsp;<A HREF=\"forums.html?file=profile&mode=viewprofile&u=$memberinfo[user_id]\">$session[uname]</a><br />\n";
       $who_online_now .= ($i != $member_online_num ? "  " : "");
       $i++;
   }
}

//if (!is_admin($admin)) $i = $i - $hiddenTotal;
//if ($i<0) $i=0;
$sql = "SELECT uname, guest FROM $prefix"._session." WHERE guest=1";
$result = $db->sql_query($sql);
$gmember_online_num = $db->sql_numrows($result);
$gwho_online_now = "";
while ($session = $db->sql_fetchrow($result)) {
    if (isset($session["guest"]) and $session["guest"] == 1) {
       if ($i < 10) $zi = "0$i";
       else $zi = $i;
            $gwho_online_now .= "$zi:&nbsp;<a href=\"http://www.samspade.org/t/lookat?a=". convertIP($session[uname])."\" target=\"_blank\">". convertIP($session[uname])."</a><br />\n";
            $gwho_online_now .= ($i != $gmember_online_num ? "  " : "");
            $i++;
    }
}

$Today = getdate();
//Formatting Current Date
$month = $Today['month'];
$mday = $Today['mday'];
$year = $Today['year'];
//Formatting Previous Date
$pmonth = $Today['month'];
$pmday = $Today['mday'];
$pmday = $mday-1;
$pyear = $Today['year'];
//Month conversion into numeric mode
if ($pmonth=="January") { $pmonth=1; } else
if ($pmonth=="February") { $pmonth=2; } else
if ($pmonth=="March") { $pmonth=3; } else
if ($pmonth=="April") { $pmonth=4; } else
if ($pmonth=="May") { $pmonth=5; } else
if ($pmonth=="June") { $pmonth=6; } else
if ($pmonth=="July") { $pmonth=7; } else
if ($pmonth=="August") { $pmonth=8; } else
if ($pmonth=="September") { $pmonth=9; } else
if ($pmonth=="October") { $pmonth=10; } else
if ($pmonth=="November") { $pmonth=11; } else
if ($pmonth=="December") { $pmonth=12; };
$test = mktime (0,0,0,$pmonth,$pmday,$pyear,1);

//Creating SQL parameter
$test = mktime (0,0,0,$pmonth,$pmday,$pyear,1);
$curDate2 = "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
$preday = strftime ("%d",$test);
$premonth = strftime ("%B",$test);
$preyear = strftime ("%Y",$test);
$curDate3 = "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";

//Executing SQL Today
$sql = "SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$userCount = $row[userCount];
//end

//Executing SQL Yesterday
$sql = "SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDate3'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$userCount2 = $row[userCount];
//end

$sql = "SELECT uname FROM ".$prefix."_session WHERE guest=1";
$result = $db->sql_query($sql);
$guest_online_num = $db->sql_numrows($result);
$sql = "SELECT uname FROM ".$prefix."_session WHERE guest=0";
$result = $db->sql_query($sql);
$member_online_num = $db->sql_numrows($result)-$hiddenTotal;
$who_online_num = $guest_online_num + $member_online_num + $hiddenTotal;

$sql = "SELECT username FROM ".$prefix."_users_temp";
$result = $db->sql_query($sql);
$waiting = $db->sql_numrows($result);

$content .= "<form action=\"account.html\" method=\"post\">";

if (is_user($user)) {
   $sqlp = "SELECT user_posts AS posts FROM $user_prefix"._users." WHERE username = '$uname'";
   $result = $db->sql_query($sqlp);
   $row = $db->sql_fetchrow($result);
   $posts = $row[posts];
   $sql = "SELECT user_avatar FROM " . $prefix."_users WHERE username='$uname' AND user_avatar IS NOT NULL";
   $result = $db->sql_query($sql);
   if ($result) {
      $userinfo = $db->sql_fetchrow($result);
       if ( ereg( "(http)", $userinfo[user_avatar]) ) {
         $content .= "<center><img src=\"$userinfo[user_avatar]\" /></center><img src=images/blank.gif height=\"2\"><br>";
       }
       else
       if ($userinfo[user_avatar]) {
         $content .= "<center><img src=\"modules/Forums/images/avatars/$userinfo[user_avatar]\" /></center><img src=images/blank.gif height=\"2\"><br>";
       }
   }

   if ($posts>0) $content .= "<center>$posts post(s)</center><img src=images/blank.gif height=\"2\"><br>";
    $content .= "<img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> Hello, <b>$uname</b><br />\n\n";
    $content .= "<img src=images/visitors/arrow.gif>&nbsp;<a href=\"modules.php?name=Your_Account&amp;op=logout\">Logout</a>\n";
   $content .= "<hr color=\"#cccccc\" size=\"1\">\n";
    $sql = "SELECT user_id FROM $user_prefix"._users." WHERE username='$uname'";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $uid = $row[user_id];
   $sql = "SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='5'";
   $result = $db->sql_query($sql);
   $een = $db->sql_numrows($result);
   $sql = "SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='1'";
   $result = $db->sql_query($sql);
   $twee = $db->sql_numrows($result);
   $newpms = $een + $twee;
   $sql = "SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='0'";
   $result = $db->sql_query($sql);
   $oldpms = $db->sql_numrows($result);
   $content .= "<img src=\"images/blocks/email-y.gif\" height=\"10\" width=\"14\"> <a href=\"messages.html\"><b>"._BPM."</b></a><br />\n";
    $content .= "<img src=images/visitors/arrow.gif> "._BUNREAD.": <b>$newpms</b><br />\n";
    $content .= "<img src=images/visitors/arrow.gif> "._BREAD.": <b>$oldpms</b><br />\n";
   $content .= "<hr color=\"#cccccc\" size=\"1\">\n";
} else {
    $content .= "<img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", <b>$anonymous</b>\n";
   $content .= "<hr color=\"#cccccc\" size=\"1\">\n";
    $content .= "<table><tr><td>"._NICKNAME."</td><td><input type=\"text\" name=\"username\" size=\"10\" maxlength=\"25\"></td></tr>";
    $content .= "<tr><td>"._PASSWORD."</td><td><input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\"></td></tr></table>";
    if (extension_loaded("gd") AND ($gfx_chk == 2 OR $gfx_chk == 4 OR $gfx_chk == 5 OR $gfx_chk == 7)) {
       mt_srand ((double)microtime()*1000000);
       $maxran = 1000000;
      $random_num = mt_rand(0, $maxran);
      $content .=""._SECURITYCODE.": <img src='modules.php?name=Your_Account&op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'>\n";
      $content .="<br />"._TYPESECCODE.": <input type=\"text\" NAME=\"gfx_check\" SIZE=\"11\" MAXLENGTH=\"10\"><br>\n";
      $content .="<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">\n";
    }
   $content .="<input type=\"hidden\" name=\"redirect\" value=$redirect>\n";
   $content .="<input type=\"hidden\" name=\"mode\" value=$mode>\n";
   $content .="<input type=\"hidden\" name=\"f\" value=$f>\n";
   $content .="<input type=\"hidden\" name=\"t\" value=$t>\n";
    $content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
    $content .= "<input type=\"submit\" value=\""._LOGIN."\">\n<br /><a href=\"modules.php?name=Your_Account&amp;op=new_user\">&middot;&nbsp;"._BREG."</a><br>";
    $content .= "<a href=\"modules.php?name=Your_Account&amp;op=pass_lost\">&middot;&nbsp;"._PASSWORDLOST."</a>";
   $content .= "<hr color=\"#cccccc\" size=\"1\">\n";
}
$content .= "<img src=images/visitors/mem.gif> <b>"._BMEMP.":</b><br />\n";
$content .= "<img src=images/visitors/arrow.gif> "._BLATEST.": <a href=\"userinfo-.html$lastusername\"></a>&nbsp;<A HREF=\"forums.html?file=profile&mode=viewprofile&u=$lastuser\"><b>$lastusername</b></a><br />\n";
if (is_admin($admin) AND @file_exists("modules/UserInfoAddons/index.php")) {
   $btdLink = "<a href=\"modules.php?name=UserInfoAddons&amp;timespan=today\">"._BTD."</a>";
   $bydLink = "<a href=\"modules.php?name=UserInfoAddons&amp;timespan=yest\">"._BYD."</a>";   
}
else {
   $btdLink = _BTD;
   $bydLink = _BYD;
}
$content .= "<img src=images/visitors/arrow.gif> ".$btdLink.": <b>$userCount</b><br />\n";
$content .= "<img src=images/visitors/arrow.gif> ".$bydLink.": <b>$userCount2</b><br />\n";
if (is_admin($admin) AND @file_exists("modules/Resend_Email/index.php")) $waitLink = "<a href=\"modules.php?name=Resend_Email\">".Waiting."</a>";
else $waitLink = Waiting;
$content .= "<img src=images/visitors/arrow.gif> ".$waitLink.": <b>$waiting</b><br />\n";
$content .= "<img src=images/visitors/arrow.gif> "._BOVER.": <b>$numrows1</b><br />\n";
   $content .= "<hr color=\"#cccccc\" size=\"1\">\n";
$content .= "<img src=images/visitors/visitors.gif> <b>"._BVISIT.":</b>\n<br />\n";
$content .= "<img src=images/visitors/arrow.gif> "._BVIS.": <b>$guest_online_num</b><br />\n";
$content .= "<img src=images/visitors/arrow.gif> "._BMEM.": <b>$member_online_num</b><br />\n";
$content .= "<img src=images/visitors/arrow.gif> "."Hidden".": <b>$hiddenTotal</b><br />\n";
$content .= "<img src=images/visitors/arrow.gif> "._BTT.": <b>$who_online_num</b><br />\n";
   $content .= "<hr color=\"#cccccc\" size=\"1\">\n";



if ($member_online_num > 0) {
    $content .= "<img src=\"images/blocks/group-1.gif\" height=\"14\" width=\"17\" align=\"middle\"> <b><u>"._BON.":</u></b><br />$who_online_now";
    $hr = "<hr color=\"#cccccc\" size=\"1\">\n";

}
if ($gmember_online_num > 0 && ($showGuests||($showGuestsAdmin&&is_admin($admin)))) {
    $content .= "<br />$gwho_online_now";
    $hr = "<hr color=\"#cccccc\" size=\"1\">\n";
}


$content .= $hr;

/* Hits for Today */
$t_time = time();
$t_year = date("Y", $t_time);
$t_month = date("n", $t_time);
$t_date = date("j", $t_time);
$result = sql_query("SELECT hits FROM $prefix"._stats_date." WHERE year='$t_year' AND month='$t_month' AND date='$t_date'", $dbi);
list($today) = sql_fetch_row($result, $dbi);
/* Hits for Yesterday */
$y_time = $t_time - 86400;
$y_year = date("Y", $y_time);
$y_month = date("n", $y_time);
$y_date = date("j", $y_time);
$result = sql_query("SELECT hits FROM $prefix"._stats_date." WHERE year='$y_year' AND month='$y_month' AND date='$y_date'", $dbi);
list($yesterday) = sql_fetch_row($result, $dbi);
/* Hits in Total */
$totalhits = 0;
$result = sql_query("SELECT sum(hits) FROM $prefix"._stats_year."", $dbi);
list($totalhits) = sql_fetch_row($result, $dbi);
$content .= "<center><small>"._WERECEIVED."</small><br />";
$content .= "<b><a href=\"stats.html\">$totalhits</a>&nbspHits</b><br />";
$content .= "<small>Since $startdate</small></center>";
$content .= "<hr color=\"#cccccc\" size=\"1\">";
$content .= "<center>"._BHITS." "._BTD.": <b><a href=\"stats.html?op=DailyStats&year=$t_year&month=$t_month&date=$t_date\">$today</a></b><br />";
$content .= ""._BHITS." "._BYD.": <b><a href=\"stats.html?op=DailyStats&year=$y_year&month=$y_month&date=$y_date\">$yesterday</a></b><br /></center>";
if ($showServerDateTime || ($showServerDateTimeAdmin&&is_admin($admin))) {
   $content .= "<hr noshade>";
   $sdt = date("j F Y\nH:i:s T");
   $zone = date("Z")/3600;
   if ($zone >= 0) {
      $zone = "+".$zone;
   }
   $content .= "<center>"._SERDT."<br />$sdt (GMT $zone)</center>";
}
$content .= "</form>";
 
Raven







PostPosted: Thu Jan 22, 2004 10:05 am Reply with quote

You must be using an older release or something. It's not the latest. But, here is the code you need to modify
Code:
    if (!$memberinfo[user_allow_viewonline]&&!is_admin($admin)) { 

      $hiddenTotal++;
   }
    elseif (!$memberinfo[user_allow_viewonline]&&is_admin($admin)) {
      $hiddenTotal++;
      $who_online_now .= "$zi:&nbsp;<a href=\"userinfo-.html$session[uname]\"><img src=\"images/blocks/icon_mini_profile.gif\" border=\"0\" height=\"10\" alt=\"Check the profile of $session[uname]\"></a>&nbsp;<a href=\"messages-post-.html$memberinfo[user_id]\"><img src=\"images/blocks/nopm.gif\" border=\"0\" alt=\"Send a quick private message to $session[uname]\"></a>&nbsp;<A HREF=\"forums.html?file=profile&mode=viewprofile&u=$memberinfo[user_id]\">$session[uname]</a>(H)<br />\n";
       $who_online_now .= ($i != $member_online_num ? "  " : "");
       $i++;
   }
    else {
      $who_online_now .= "$zi:&nbsp;<a href=\"userinfo-.html$session[uname]\"><img src=\"images/blocks/icon_mini_profile.gif\" border=\"0\" height=\"10\" alt=\"Check the profile of $session[uname]\"></a>&nbsp;<a href=\"messages-post-.html$memberinfo[user_id]\"><img src=\"images/blocks/nopm.gif\" border=\"0\" alt=\"Send a quick private message to $session[uname]\"></a>&nbsp;<A HREF=\"forums.html?file=profile&mode=viewprofile&u=$memberinfo[user_id]\">$session[uname]</a><br />\n";
       $who_online_now .= ($i != $member_online_num ? "  " : "");
       $i++;
   }
 
dirtbag







PostPosted: Thu Jan 22, 2004 10:07 am Reply with quote

thanks for the Fast Response!! must of caught you online!! thanks again for the help and time as i appreciate it..
 
dirtbag







PostPosted: Thu Jan 22, 2004 10:23 am Reply with quote

it worked great... Exclamation Exclamation Wink
 
Darrell3831
Worker
Worker



Joined: Feb 18, 2004
Posts: 244

PostPosted: Fri Nov 19, 2004 4:51 pm Reply with quote

I see the size < 13 in the list of members, but a user name also shows up in the latest member section of the info block.

Where there every any mods to chop off the extra characters for really long "latest members" names?

How would you fill $lastuser with only the left most 13 characters from user_id ?

Code:
$lastuser= $row[user_id];

_________________
[ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Fri Nov 19, 2004 4:59 pm Reply with quote

Darrell3831 wrote:
I see the size < 13 in the list of members, but a user name also shows up in the latest member section of the info block.

Where there every any mods to chop off the extra characters for really long "latest members" names?

How would you fill $lastuser with only the left most 13 characters from user_id ?

Code:
$lastuser= $row[user_id];
Code:
$lastuser= substr($row[user_id],0,13);
 
Darrell3831







PostPosted: Fri Nov 19, 2004 5:08 pm Reply with quote

Thanks,

I could not find the appropriate function in my book. Sad Sometimes I feel silly not knowing what function name to look for.....

For anyone else wanting to do this...

It's not the $lastuser variable. I quoted the wrong one. It's the variable just above it called $lastusername.

Code:
$lastusername = substr($row[username],0,13);


Thanks Raven for getting an ole' C++ programmer on the right track...
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.9

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©