Members   Search      Help    Register    Login    Home
Home » Support Forums for PMBT 2.X » General Help for 2.X » pm system(pop up)
pm system [message #4494] Mon, 19 July 2010 19:07 Go to next message
Daffy is currently offline Daffy  France
Messages: 359
Registered: October 2009
Location: uk
Releaser

i got sick of the pm pop up all the time, not being able to navigate unless reading it first. so i have removed the part from my main.php and added a code to show a nice red box stating you have X new messages. since doing so, when sending a request to re-seed a torrent, i get an error "SMTP Error: Could not authenticate." how do i stop this thanks.

Re: pm system [message #4673 is a reply to message #4494] Thu, 05 August 2010 22:22 Go to previous messageGo to next message
watermolecule is currently offline watermolecule  United States
Messages: 109
Registered: July 2010
Super-Seeder
This sounds like a great idea. Could you share the code? Did you get the SMTP error issue figured out?
Re: pm system [message #4805 is a reply to message #4673] Thu, 02 September 2010 23:05 Go to previous message
Daffy is currently offline Daffy  United Kingdom
Messages: 359
Registered: October 2009
Location: uk
Releaser

sure, sorry for late responce, i be honest. (i forgot) lol Confused

open theme/****/main.php

find and delete
$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
// WARN things START
if ($user->user) {
if ($user->downloaded > 0){
include ("./ratiowarn.php");
}
}


and add above
$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");
}


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


[Updated on: Wed, 08 September 2010 01:37]

Report message to a moderator

Previous Topic:remove the shoutbox
Next Topic:plz help me i have a problem
Goto Forum:
  


Current Time: Wed Feb 08 22:31:31 GMT 2012

Total time taken to generate the page: 0.00706 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software