View Full Version : Anyone notice about PMs?
Takara
06-23-2002, 03:53 PM
There are a fiew things wrong with Private Messages.
#1, if you have no messages in any of your folders (recieved or sent) you see this:
<nick> - You have new message(s) since your last visit.
(You have unread messages and 0 total messages in all your folders.)
It SHOULD say 'You have 0 new messages' and 'You have 0 unread messages'. Aswell you can send a message to a user with just spaces in the subject, thats really annoying.
Xenon
06-23-2002, 03:59 PM
open private.php
find:
if ($message=="" or $touser=="" or $title=="") {
eval("standarderror(\"".gettemplate("error_requiredfields")."\");");
exit;
}
replace with
if (trim($message)=="" or $touser=="" or trim($title)=="") {
eval("standarderror(\"".gettemplate("error_requiredfields")."\");");
exit;
}
then no " " messages could be sent anymore
Takara
06-23-2002, 04:05 PM
Cool, thanks ^^
Now I just have to fix that other one.
Takara
06-23-2002, 04:14 PM
Ah, its because I commented out the following queries in index.php
$allpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");
$newpm=$DB_site->query_ffirst("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0 $ignoreusers");
$unreadpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND messageread=0 AND folderid=0 $ignoreusers");
$newpm['messages']=$allpm['newpm'];
$unreadpm['messages']=$allpm['unreadpm'];
and replaced by
$allpm=$DB_site->query_first("SELECT COUNT(*) AS messages,
SUM(IF(dateline>$bbuserinfo[lastvisit] AND folderid=0,1,0)) AS newpm,
SUM(IF(messageread=0 AND folderid=0,1,0)) AS unreadpm
FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");
$newpm['messages']=$allpm['newpm'];
$unreadpm['messages']=$allpm['unreadpm'];
I'll changed the end part to
if ($allpm['newpm'] == "") {
$newpm['messages']="0";
} else {
$newpm['messages']=$allpm['newpm'];
}
if ($allpm['unreadpm'] == "") {
$unreadpm['messages']="0";
} else {
$unreadpm['messages']=$allpm['unreadpm'];
}
But it hasnt worked yet. I'll keep playing.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.