daffy |
8th September 2010 02:40 |
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 "";
}
find
Code:
// WARN things START
if ($user->user) {
if ($user->downloaded > 0){
include ("./ratiowarn.php");
}
}
and add above
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("\n");
}
http://i56.tinypic.com/20u34ih.jpg
|