PDA

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


Chris M
01-07-2003, 10:00 PM
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) (https://vborg.vbsupport.ru/attachment.php?s=&postid=340165)
2 New Private Messages (on index.php) (https://vborg.vbsupport.ru/attachment.php?s=&postid=340166)

Enjoy!:)

Satan

Dean C
01-08-2003, 05:48 PM
Hehe sounds quite cool :)

* Mist waits for the screenshots :)

- miSt

corsacrazy
01-08-2003, 06:43 PM
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
01-08-2003, 07:11 PM
@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
01-08-2003, 08:58 PM
Installed. Thanks, easy as pie! :)

corsacrazy
01-09-2003, 07:28 AM
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
01-09-2003, 07:29 AM
this is when there are two messages in your inbox, therefore it will display private messageS

Xenon
01-09-2003, 11:16 AM
nice minihack chris :)

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

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

Satan

Xenon
01-09-2003, 07:56 PM
it's not the ammount that counts :P

Chris M
01-10-2003, 07:23 PM
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
01-15-2003, 10:18 AM
great... thanks :)