GT-CZUser-Info name display errors

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   GT-CZUser-Info name display errors
dsnail2000
CZ Super Newbie
 Codezwiz Site Donator
dsnail2000 has been a member for over 19 year's 19 Year Member
usa.gif virginia.gif
Age: 40
Gender: Male
Website:
Status: Offline
Joined: Jun 28, 2004
0.00 posts per day
Posts: 36
Points: 6,786
   
I added the GT-CZUser-Info block to my site, [ Register or login to view links on this board.] and noticed a funky display error. Each name is prepended with a semicolon. It says "Welcome, ;dvsDave" I can't find where this extra semicolon is hiding. Anybody come across this error as well?



Back to top Reply with quote
#2   re: GT-CZUser-Info name display errors
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
Taut has been a member for over 20 year's 20 Year Member
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.72 posts per day
Posts: 5530
Points: 481,695
   
double check your lang_english file that you uploaded or re-upload the files again please



Back to top Reply with quote
#3   
dsnail2000
CZ Super Newbie
 Codezwiz Site Donator
dsnail2000 has been a member for over 19 year's 19 Year Member
usa.gif virginia.gif
Age: 40
Gender: Male
Website:
Status: Offline
Joined: Jun 28, 2004
0.00 posts per day
Posts: 36
Points: 6,786
   
This is the code from the block:
<?php

/********************************************************/
/* CZ User Info Info Block for PHP-Nuke                 */
/* By: Telli (telli@codezwiz.com)                       */
/* http://codezwiz.com/                                 */
/* Copyright © 2000-2003 by Codezwiz                    */
/********************************************************/

if ( eregi( "block-CZUser_Info.php", $PHP_SELF ) )
{
   Header(" Location: index.php" );
   die();
}

// Some definitions
global $user, $cookie, $prefix, $dbi, $user_prefix, $username, $stop, $module_name, $redirect, $mode, $t, $f, $gfx_chk;
$content = "";

cookiedecode( $user );
$ip = getenv( "REMOTE_ADDR" );
$username = $cookie[1];
if ( !isset( $username ) )
{
   $username = "$ip";
   $guest = 1;
}


// Determine last registered user
$result = sql_query( "select username from $prefix"._users." order by user_id DESC limit 0,1", $dbi );
list( $lastuser ) = sql_fetch_row( $result, $dbi );
// Amount of registered users
$numrows = sql_num_rows( sql_query( "select user_id from $prefix"._users."", $dbi ) );
// Amount of registered users online
$result2 = sql_query( "SELECT uname, guest FROM $prefix"._session." where guest=0", $dbi );
$member_online_num = sql_num_rows( $result2 );

// Assemble the online registered users
$who_online_now = "";
$i = 1;
while ( $session = sql_fetch_array( $result2, $dbi ) )
{
   if ( isset($session["guest"]) and $session["guest"] == 0 )
   {
if ($i < 10) $zi = "0$i";
    else $zi = $i;
// Get user ID's of online registered users
      $resultuser_id = sql_query( "SELECT user_id FROM ".$prefix."_users where username='$session[uname]'", $dbi );
      list( $user_id ) = sql_fetch_row( $resultuser_id, $dbi );
   
//Filtering Administrator add more admin names if needed
   if (($session[uname] == DVSDAVE) or ($session[uname] == dvsDave))  {
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-$user_id.html\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp<A HREF=\"forum-userprofile-$user_id.html\">$session[uname]</a>&nbsp<img src=\"images/CZUser/admin.gif\">\n";
                  }
//Filtering Staff 1 add more admin names if needed
   elseif (($session[uname] == SHIP) or ($session[uname] == ship)){
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-$user_id.html\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp<A HREF=\"forum-userprofile-$user_id.html\">$session[uname]</a>&nbsp<img src=\"images/CZUser/staff.gif\">\n";         
            }
//Filtering Staff 2
   elseif (($session[uname] == WOLF825) or ($session[uname] == wolf825)){
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-$user_id.html\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp<A HREF=\"forum-userprofile-$user_id.html\">$session[uname]</a>&nbsp<img src=\"images/CZUser/staff.gif\">\n";         
            }
//Filtering Staff 3
   elseif (($session[uname] == MAYHEM) or ($session[uname] == mayhem)){
                  $who_online_now .= "<br>$zi.<a href=\"messages-post-$user_id.html\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp<A HREF=\"forum-userprofile-$user_id.html\">$session[uname]</a>&nbsp<img src=\"images/CZUser/staff.gif\">\n";         
            }
      else {
         $who_online_now .= "<br>$zi.<a href=\"messages-post-$user_id.html\"><img src=\"images/CZUser/pm.gif\" width=\"18\" height=\"10\" border=\"0\" ALT=\"Send a Private Message to $session[uname] \"></a>&nbsp<A HREF=\"forum-userprofile-$user_id.html\">$session[uname]</a>\n";
         }
      $who_online_now .= ( $i != $member_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
$curDate2 = "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
$preday = strftime ( "%d", $test );
$premonth = strftime ( "%B", $test );
$preyear = strftime ( "%Y", $test );
$curDateP = "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";

// Executing SQL Today
$sql2 = "SELECT COUNT(user_id) AS userCount from nuke_users WHERE user_regdate LIKE '$curDate2'";
$result2 = sql_query( $sql2, $dbi );
list( $userCount ) = sql_fetch_row( $result2, $dbi );
// end

// Executing SQL Yesterday
$sql3 = "SELECT COUNT(user_id) AS userCount from nuke_users WHERE user_regdate LIKE '$curDateP'";
$result3 = sql_query( $sql3, $dbi );
list( $userCount2 ) = sql_fetch_row( $result3, $dbi );
// end

$result = sql_query( "SELECT uname FROM $prefix"._session." where guest=1", $dbi );
$guest_online_num = sql_num_rows( $result );

$result = sql_query( "SELECT uname FROM $prefix"._session." where guest=0", $dbi );
$member_online_num = sql_num_rows( $result );

$who_online_num = $guest_online_num + $member_online_num;

// Display all information
if ( is_user( $user ) )
{
   // Determine how many READ Messages and how many UNREAD Messages
   $result = sql_query( "select user_id from $prefix"._users." where username='$username'", $dbi );
   list( $user_id ) = sql_fetch_row( $result, $dbi );
   $result2 = sql_query( "select privmsgs_type from $prefix"._bbprivmsgs." where privmsgs_to_userid='$user_id' AND (privmsgs_type='1' or privmsgs_type='5')", $dbi );
   $MesUnread = sql_num_rows( $result2 );
   $result3 = sql_query( "select privmsgs_type from $prefix"._bbprivmsgs." where privmsgs_to_userid='$user_id' AND (privmsgs_type='0')", $dbi );
   $MesRead = sql_num_rows( $result3 );


   // Info for users which is logged in
   $content .= "<br><img src=\"images/CZUser/group-4.gif\" height=\"14\" width=\"17\">"._CZ_WELCOME."<b>&nbsp".$username."</b><br>\n<hr>\n";
   $content .= "\n";
   $content .= "<img src=\"images/CZUser/email-y.gif\" height=\"10\" width=\"14\"> <b><a href=\"messages.html\">"._CZ_PRIVMSG."</b></a><br>\n";
   $content .= "<img src=\"images/CZUser/email-r.gif\" height=\"10\" width=\"14\">"._CZ_UNREAD."<b>".$MesUnread."</b><br>\n";
   $content .= "<img src=\"images/CZUser/email-g.gif\" height=\"10\" width=\"14\">"._CZ_READ."<b>".$MesRead."</b><br>\n<hr>\n";
   $content .= "<BR>\n";
}
else
{
// Info for guests (users who didn't log in)
   if (!is_user($user)) {
       mt_srand ((double)microtime()*1000000);
       $maxran = 1000000;
       $random_num = mt_rand(0, $maxran);
}
$content .= "<img src=\"images/CZUser/group-4.gif\" height=\"14\" width=\"17\"> "._CZ_GUEST." <b>$uname</b>\n<hr>";

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

$content .="<table border=\"0\"><tr><td>\n";
$content .=""._CZ_NICKNAME."</td></tr>\n";
$content .="<tr><td><input type=\"text\" name=\"username\" size=\"15\" maxlength=\"25\"><CENTER></td></tr>\n";
$content .="<tr><td>"._CZ_PASSWORD."</td></tr>\n";
$content .="<tr><td><input type=\"password\" name=\"user_password\" size=\"15\" maxlength=\"20\"></td></tr>\n";
       if (extension_loaded("gd") AND ($gfx_chk == 2 OR $gfx_chk == 4 OR $gfx_chk == 5 OR $gfx_chk == 7)) {
$content .="<tr><td colspan='2'>"._CZ_SECURITYCODE." <img src='modules.php?name=Your_Account&op=gfx&random_num=$random_num' border='1' alt='"._CZ_SECURITYCODE."' title='"._CZ_SECURITYCODE."'></td></tr>\n";
$content .="<tr><td colspan='2'>"._CZ_TYPESECCODE." <input type=\"text\" NAME=\"gfx_check\" SIZE=\"12\" MAXLENGTH=\"10\"></td></tr>\n";
$content .="<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">\n";
       }
$content .="</table><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\">\n";
$content .="&nbsp<input type=\"submit\" value=\""._LOGIN."\"></form>\n";
}
// Info for users who logged in AND Guests
$content .= "<img src=\"images/CZUser/group-2.gif\" height=\"14\" width=\"17\"> <b><u>"._CZ_MEM.":</u></b><br>\n";
// Hyperlink last registered user to phpBB viewing profile
$resultName = sql_query( "SELECT user_id FROM ".$prefix."_users where username='$lastuser'", $dbi );
list( $Lastuser_id ) = sql_fetch_row( $resultName, $dbi );
$content .= "<img src=\"images/CZUser/ur-moderator.gif\" height=\"14\" width=\"17\"> "._CZ_OVERALL."<b>$numrows</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-author.gif\" height=\"14\" width=\"17\"> "._CZ_TODAY."<b>$userCount</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-admin.gif\" height=\"14\" width=\"17\"> "._CZ_YESTERDAY."<b>$userCount2</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-guest.gif\" height=\"14\" width=\"17\"> "._CZ_LATEST."<A HREF=\"forum-userprofile-$Lastuser_id.html\"><b>$lastuser</b></a><br>\n<hr>\n";
$content .= "<img src=\"images/CZUser/group-3.gif\" height=\"14\" width=\"17\"><u><b>"._CZ_ON."</b></u><br>\n";
$content .= "<img src=\"images/CZUser/ur-anony.gif\" height=\"14\" width=\"17\">"._CZ_TOTAL."<b>$who_online_num</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-member.gif\" height=\"14\" width=\"17\">"._CZ_VISITORS2."<b>$guest_online_num</b><br>\n";
$content .= "<img src=\"images/CZUser/ur-registered.gif\" height=\"14\" width=\"17\">"._CZ_VMEMBERS."<b>$member_online_num</b><br>\n";
$vtotal = $guest_online_num+$member_online_num;


if ( is_user( $user ) )
{
   
   $content .= "<hr>\n<img src=\"images/CZUser/group-1.gif\" height=\"14\" width=\"17\"><b><u>"._CZ_ONLINE."</b></u>$who_online $who_online_now";
}
else
{
   $content .= "<hr>\n<img src=\"images/CZUser/group-1.gif\" height=\"14\" width=\"17\"><b><u>"._CZ_ONLINE."</u></b>$who_online $who_online_now";
   $content .= "<CENTER><br><br><a href=\"account-new_user.html\">"._CZ_UMBREG."</a><BR>\n";
   $content .= "<a href=\"account-pass_lost.html\">"._CZ_UMBLOST."</a><BR>\n";

}

?>


This is the code snippet from my language file:
// Begin CZUser Info block
define("_CZ_MEM","Membership");
define("_CZ_UMBREG", " Register Here ");
define("_CZ_UMBLOST", " Lost Password ");
define("_CZ_WELCOME", " Welcome, ");
define("_CZ_GUEST", " Welcome, Guest");
define("_CZ_PRIVMSG", "Private Message(s)");
define("_CZ_UNREAD", " Unread: ");
define("_CZ_READ", " Read: ");
define("_CZ_MEMBERS", " Member Info:");
define("_CZ_ON", " Online Info:");
define("_CZ_LATEST", " Latest User: ");
define("_CZ_TODAY", " New Today: ");
define("_CZ_YESTERDAY", " New Yesterday: ");
define("_CZ_OVERALL", " Total Members: ");
define("_CZ_VISITORS1", " Total Online: ");
define("_CZ_VISITORS2", " Guest(s) Online: ");
define("_CZ_VMEMBERS", " User(s) Online: ");
define("_CZ_TOTAL", " Total Online: ");
define("_CZ_ONLINE", " Online List: ");
define("_CZ_SECURITYCODE","Security Code: ");
define("_CZ_TYPESECCODE","Type Security Code Here: ");
define("_CZ_PASSWORD","Password: ");
define("_CZ_NICKNAME","Nickname: ");
// End CZUser Info block



Back to top Reply with quote
#4   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Try this one and you won't have to enter the admin names.



Attached Files
GT_CZUser-Info.zip (39.96 KB, Downloaded: 5248 Time(s))



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   
dsnail2000
CZ Super Newbie
 Codezwiz Site Donator
dsnail2000 has been a member for over 19 year's 19 Year Member
usa.gif virginia.gif
Age: 40
Gender: Male
Website:
Status: Offline
Joined: Jun 28, 2004
0.00 posts per day
Posts: 36
Points: 6,786
   
fixed, works great! thanks much!



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum