View Single Post
  #5 (permalink)  
Old 03-03-2003, 01:15 PM
TuNa TuNa is offline
Junior Member
 
Join Date: Jan 2003
Location: England
Posts: 71
Send a message via ICQ to TuNa
Hi Martin,

I've checked out the difference between the 2 blocks and noticed that the coding has been changed Slightly.
On my site atm the coding for the message part is this; which I guess was the old coding, its available in downloads now with the adjustment:

if (is_active("Private_Messages")) {
$result = sql_query("select user_new_privmsg from ".$user_prefix."_users where uname='$username'", $dbi);
list($numrow) = sql_fetch_row($result, $dbi);
if ($newnumrow == "0") {
$content .= ""._YOUHAVE." no "._PRIVATEMSG."";
} else {
$content .= ""._YOUHAVE." <a href=\"modules.php?name=Private_Messages\">$numrow</a> "._PRIVATEMSG."";
}
}
$content .= "</center>
";

Where the coding for the message part on this site is this:

// Determine how many READ Messages and how many UNREAD Messages

$result2 = sql_query( "select privmsgs_type from $prefix"._bbprivmsgs." where privmsgs_to_userid='$uid' 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='$uid' AND (privmsgs_type='0')", $dbi);
$MesRead = sql_num_rows($result3);
$content .= ""._SV_PRIVMSG."
";
$content .= ""._SV_UNREAD." <a href=\"modules.php?name=Private_Messages\">".$MesUnread."</a>
";
$content .= ""._SV_READ." <a href=\"modules.php?name=Private_Messages\">".$MesRead."</a>";
$content .= "</center>
";

I've tested it on my tester site that I now have running and it works fine.
Reply With Quote