I'm using the pd2003 pro theme which displays how many new Private Messages you have in the header after you login. However, I am using IB forums now, and would like to set it up to display how many IB new messages I have. I know there's a way but I don't know php&sql enough to do it.
Here's the code for a nuke-block that displays what I want:
$sql_pm = $db->sql_query("SELECT * FROM ".$ibf."_members WHERE name='$pmname'") or print sql_error();
$pm = sql_fetch_array($sql_pm);
$content = "<b>$pmname</b>,<br><center>$text1 <b>$pm[new_msg]</b> $text2<br><a href='$forumdir/index.php?s=&act=Msg&CODE=01'>$text3</a>.";
And here is the code for my current Private Messages in theme.php:
Code:
if (is_active("Private_Messages")) {
$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];
$numrow = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM ".$prefix."_bbprivmsgs WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='1' OR privmsgs_type='5' OR privmsgs_type='0')"));
$newpm = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_bbprivmsgs WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')"));
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