vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   [Mini-hack] Intelligent Private Messaging Alert... (https://vborg.vbsupport.ru/showthread.php?t=47506)

Chris M 01-07-2003 10:00 PM

[Mini-hack] Intelligent Private Messaging Alert...
 
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)
2 New Private Messages (on index.php)

Enjoy!:)

Satan

Dean C 01-08-2003 05:48 PM

Hehe sounds quite cool :)

[high]* Mist waits for the screenshots :)
[/high]

- 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

PHP Code:

  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):

Code:

  if ($newpm['messages']==0) {
    $lightbulb='off';
  } else {
    $lightbulb='on';

with:
Code:

  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


All times are GMT. The time now is 11:16 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01079 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete