View Full Version : Displaying ALL PMs on User CP Home Page
TWTCommish
03-12-2001, 02:29 PM
Just what the title sounds like: I want to display all (well, controlling the maximum number would be better) PMs on the "My vB Home" page in the User's CP, as opposed to just the new PMs.
My reason? Unless the forum is *really* active, most people are likely to have a few PMs, but rarely have new ones. I hate having that big white space sitting there doing nothing 90% of the time.
Any easy way of doing this?
I thought the same about the big white space, so I swapped the location of the 'subscribed threads' table with the location of the new PMs table, as there are far more likely to be new replies to subscribed threads than new PMs...
http://kier.3dfrontier.com/images/3DF_usercp.gif
Good idea - I'll probably try that - I'd still be interested in how to simply display all PMs there, if anyone knows how.
Is there a simple way to use a dropdown as you have done, as well? Very cool looking forms - sickingly cool, in fact. How'd you get those rounded corners in there?
Find $messages = $DB_site->query("SELECT privatemessage.*,touser.username AS tousername,fromuser.username AS fromusername,icon.title AS icontitle,icon.iconpath FROM privatemessage,user AS touser,user AS fromuser LEFT JOIN icon ON icon.iconid=privatemessage.iconid WHERE privatemessage.userid='$bbuserinfo[userid]' AND folderid=0 AND touser.userid=privatemessage.touserid AND fromuser.userid=privatemessage.fromuserid AND messageread=0 $ignoreusers ORDER BY dateline DESC"); in usercp.php and remove the text in red.
That will show the entire contents of the inbox.
Thanks very much - I stuck a LIMIT on the end, too. Thanks again! :)
Any chance of a super-easy way to display the correct PM icon? As of now it, obviously, displays the "Unread message" icon for all of them.
Nevermind - I figured it out. :)
If anyone else is interested, here's how it's done:
Find this line in usercp.php:
$privatemessage[folder] = "{imagesfolder}/newpm.gif";
...and replace it with this:
if ($privatemessage[messageread]) {
$privatemessage[folder] = "{imagesfolder}/pm.gif";
} else {
$privatemessage[folder] = "{imagesfolder}/newpm.gif";
}
Thanks Kier. :)
I would recommend that you replace "images/" with "{ imagesfolder }/" so that you don't have any problems with different stylesets. (remove the spaces)
Alright, will do - just copying it out of the program. I guess I have to stop thinking of vBulletin as perfect. :)
I'm stupid - it did actually use { imagesfolder } - but unlike you, I forget to space it out, so it is as it should be.
Thanks. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.