Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=93)
-   -   annoying pm pop up (http://www.bvlist.com/showthread.php?t=5318)

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");
 print("You Have ".$pmcount." New Message!");
 print("

\n");
}

http://i56.tinypic.com/20u34ih.jpg


All times are GMT +2. The time now is 07:45.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.