PDA

View Full Version : [Mini-hack] Intelligent Private Messaging Alert...


Chris M
08 Jan 2003, 18:41
Please do the following before attempting to install:

1.) Backup your Files before doing anything
2.) Be aware that although I have tested this myself, there may still be problems...If you do not backup your files, I cannot condone your install of this hack...
3.) If you want to Backup your Database, You can - There shouldn't be any need to...

The file you should have is:

install_pmimprovement_txt.php

Install Info:
Hack Version: 1.0
Files to edit: 1
Templates to add: 0
Templates to edit: 1
Queries to Run: 0
Time to install: Approx 1-2 Minutes

Credits
Requested by - Noone

Support - I unfortunately cannot be here during the coming weeks (Mon-Fri), so therefore you will have to rely on others for assitance, should it be urgent...If you do require assitance, please - Only reply in this thread!!

Hack info

What does it do? - Basically, this makes the call for the "forumhome_pmloggedin" template act more intelligently, and tell you if you have 1 message, that you have 1 message not 1 message(s)

Additional Info/Updates

This is really only a Mini-Hack, and something I feel should have already been done for the Private Messaging system.

Screenshots/Live Demo
Thanks to corsacrazy for providing the following screenshots...

1 New Private Message (on index.php) (http://www.vbulletin.org/forum/attachment.php?s=&postid=340165)
2 New Private Messages (on index.php) (http://www.vbulletin.org/forum/attachment.php?s=&postid=340166)

Enjoy!:)

Satan

Dean C
08 Jan 2003, 18:48
Hehe sounds quite cool :)

/me waits for the screenshots :)

- miSt

corsacrazy
08 Jan 2003, 19:43
i have various other pm hacks installed so how would i go about adding your code to make this work ? here is what i have in index.php


if ($newpm['messages']==0) {
$lightbulb='off';
} else {
$lightbulb='on';
if ($unreadpm['messages']==0) {
$pmblink='//';
} else {
$pmblink='';
}
}
//new PM sound hack
if ($unreadpm['messages']==0) {
$sound='';
} else {
$sound='<embed src="pm.wav" autostart="true" hidden="true">';
}
//end new PM sound hack

eval("\$pminfo = \"".gettemplate('forumhome_pmloggedin')."\";");

thanks :knockedout:

Chris M
08 Jan 2003, 20:11
@corsacrazy -

Replace (in your code above):

if ($newpm['messages']==0) {
$lightbulb='off';
} else {
$lightbulb='on';
with:
if ($newpm['messages']==0) {
$lightbulb='off';
} else {
$lightbulb='on';
}
if (($newpm['messages']==0) and ($unreadpm['messages']==0)) {
$stext='s';
} elseif (($newpm['messages']==1) and ($unreadpm['messages']==1)) {
$stext='';
} else {
$stext='s';
:)

Satan

drumsy
08 Jan 2003, 21:58
Installed. Thanks, easy as pie! :)

corsacrazy
09 Jan 2003, 08:28
cheers satan works great ! here are some screen shoots !

this is when there is a single message in your inbox, there fore it will display private message

corsacrazy
09 Jan 2003, 08:29
this is when there are two messages in your inbox, therefore it will display private messageS

Xenon
09 Jan 2003, 12:16
nice minihack chris :)

however i'd prever to do those things via templateconditions :)

Chris M
09 Jan 2003, 20:12
Yeh...But I prefer hacking - It adds another thing to my profile:p:D:p

Satan

Xenon
09 Jan 2003, 20:56
it's not the ammount that counts :P

Chris M
10 Jan 2003, 20:23
Oh really.......;)

Btw: Can you help me if I PM you? I'm trying to make it count the messages that you deleted, but I'm not exactly sure how...Currently it says "The message(s) have been deleted" or whatever...:bored:

Satan

The_Wanderer
15 Jan 2003, 11:18
great... thanks :)