UPDATED : Ok everything should work now, both in private.php and private2.php. I have updated it to work with both files so if you downloaded it before please go through the file again and check you have got all of it.
What does it do?
- Displays total PM's In :
-- Inbox
-- Sent Items Folder
-- Custom Folders
Next Up...
-- Message Tracking (Display total read/unread)
03-03-03 at 01:23 AM 7thgenCivic.Com said this in Post #31 I just made some more changes.
Instead of displaying ( / ) or () if there is nothing there, I added this.
Yours contains some typo mistakes. Here the corrected one (apply in both private.php and private2.php)
PHP Code:
$msgin_track = $DB_site->query_first("SELECT COUNT(*) AS track_msgtotal FROM privatemessage WHERE fromuserid=$bbuserinfo[userid] AND receipt='1'");
if ($msgin_track[track_msgtotal]) :
$track_msgtotal = $msgin_track[track_msgtotal];
else :
$track_msgtotal = 0;
endif;
$msgin_trackread = $DB_site->query_first("SELECT COUNT(*) AS track_msgtotalread FROM privatemessage WHERE fromuserid=$bbuserinfo[userid] AND receipt='2'");
if ($msgin_trackread[track_msgtotalread]) :
$track_msgtotalread = $msgin_trackread[track_msgtotalread];
else :
$track_msgtotalread = 0;
endif;
11-04-02 at 11:30 PM Tigga said this in Post #21 Well just incase anyone else is having the problem with the custom folders total not showing, I figured out what was wrong.
$msginfolder = $DB_site->query_first("SELECT COUNT(*) AS foldermsgtotal FROM privatemessage
WHERE userid=$bbuserinfo[userid] AND folderid=$folder[folderid]");
$foldermsgtotal = $msginfolder[foldermsgtotal];
Then you can look for another instance of the code above that you just added (near the bottom of the file) and remove it. Works great now.
05-31-03 at 03:46 AM nymyth said this in Post #37 my custom folders are still not showing a total......and i couldnt find the other instance you were talking about....any ideas...
Peace
There isn't any, because if you look at the date when it was posted it was back in November of 2002. So think it had an extra instance of it, but now with the newer version there isn't any.
I was reading through this thread and noticed some people said that it was quite messy getting through this hack. And I am surprised that someone didn't already compile all the modifications and fixes submitted by everyone in this thread. So I decided to that it need to be done and that way it would be much easier on everyone.
Thanks to Matt for creating this hack. And also thanks to Mystics, ManagerJosh, Tigga, T?Pau, 7thgenCivic.Com, & AlexanderT for modifying and fixing to this hack.
Special thanks goes out to Kreft for creating the original Improved PM Folderview Hack.
$ignoreusers="";
if (trim($bbuserinfo['ignorelist'])!="") {
$ignoreusers='AND fromuserid<>'.implode(' AND fromuserid<>',explode(' ', trim($bbuserinfo['ignorelist'])));
}
$msginfolder = $DB_site->query_first("SELECT COUNT(*) AS foldermsgtotal FROM privatemessage WHERE userid=$bbuserinfo[userid] AND folderid=$folder[folderid]$ignoreusers");
$foldermsgtotal = $msginfolder[foldermsgtotal];
$msginfolder = $DB_site->query_first("SELECT COUNT(*) AS foldermsgtotal FROM privatemessage
WHERE userid=$bbuserinfo[userid] AND folderid=$folder[folderid]");
$foldermsgtotal = $msginfolder[foldermsgtotal];
$ignoreusers="";
if (trim($bbuserinfo['ignorelist'])!="") {
$ignoreusers='AND fromuserid<>'.implode(' AND fromuserid<>',explode(' ', trim($bbuserinfo['ignorelist'])));
}
$msginfolder = $DB_site->query_first("SELECT COUNT(*) AS foldermsgtotal FROM privatemessage WHERE userid=$bbuserinfo[userid] AND folderid=$folder[folderid]$ignoreusers");
$foldermsgtotal = $msginfolder[foldermsgtotal];