|
#1
|
||||
|
||||
annoying pm pop up
was a little annoying when a user pms you and cant navigate away till you read it, well i changed this so only poped up on pm page. even that was doing my head in, so now its simpler.
open theme/****/main.php find and delete Code:
$has_newpm = false; $sql = "SELECT id FROM ".$db_prefix."_private_messages WHERE recipient = '".$user->id."' AND is_read = 'false' LIMIT 1;"; $res = $db->sql_query($sql) or btsqlerror($sql); $has_newpm = ($db->sql_numrows($res) > 0) ? true : false; $db->sql_freeresult($res); if ($has_newpm) { echo "<script type=\"text/javascript\" language=\"JavaScript\">"; echo "sPath = window.location.pathname;"; echo "sPage = sPath.substring(sPath.lastIndexOf('/') + 1);"; echo "if (sPage != \"pm.php\"){ var answer = confirm (\""._jscriptconfirmtext."\");"; echo "if (answer) window.location=\"pm.php?op=inbox\";"; echo "}"; echo "</script>"; } Code:
// WARN things START if ($user->user) { if ($user->downloaded > 0){ include ("./ratiowarn.php"); } } Code:
$has_newpm = false; $sql = "SELECT id FROM ".$db_prefix."_private_messages WHERE recipient = '".$user->id."' AND is_read = 'false' LIMIT 1;"; $res = $db->sql_query($sql) or btsqlerror($sql); $pmcount = $db->sql_numrows($res); $has_newpm = ($pmcount > 0) ? true : false; $db->sql_freeresult($res); if ($has_newpm) { print("<center><p><table border=0 cellspacing=0 cellpadding=0 bgcolor=green><tr><td style='padding: 10px; background: red'>\n"); print("<a href=pm.php?op=inbox><font color=white><u>You Have <B>".$pmcount."</b> New Message!</U></font></a>"); print("</td></tr></table></p></center>\n"); }
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?" "I Kill You!" simples
|
The Following User Says Thank You to daffy For This Useful Post: | ||
romano1 (23rd January 2012)
|
Tags |
annoying , pm , pop |
|
|