Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > BT.Manager (phpMyBitTorrent) > Mods & Themes
Reply
  #1  
Old 8th September 2010, 02:40
daffy's Avatar
daffy daffy is offline
Senior Member
 
Join Date: Mar 2009
United Kingdom
Posts: 550
Default 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>";

}
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("<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");
}
Click the image to open in full size.
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
The Following User Says Thank You to daffy For This Useful Post:
romano1 (23rd January 2012)
Reply

Tags
annoying , pm , pop

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 12:34. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.