Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by fury fury is offline
Developer Last Online: Sep 2018 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 10-05-2001 Last Update: Never Installs: 14
 
No support by the author.

My first hack! Yay!

This should theoretically work for 2.0.0 and above, but I've only tested it to work in 2.0.3 and 2.2.0.

What this hack does is just allow you to use $allpm[messages], $newpm[messages], and $unreadpm[messages] like in index.php, in your privfolder template. I found it handy to be able to use this in the privfolder template because it's annoying to have to go back to index.php to find out how many messages you have left after deleting a crapload

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-20-2002, 07:55 AM
Regs Regs is offline
 
Join Date: Oct 2001
Location: Vancouver BC
Posts: 322
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This little gem of a small hack is perfect for my needs, thank-you!

I'm surprised no one has replied to this thread ever as with a slight addition, it can cut back on some of our 'support' to our end users...

I don't know how many times I've had to explain to my users on why they can't receive PMs even after emptying their inboxes [the dreaded Sent Items folder].

Simply add another query to the instructions:

$unreadpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND folderid=-1 $ignoreusers");

And then put $sentpm[messages] sent messages wherever in your privfolder template

Well, that's how I'm using it

Cheers,

~Regs.
Reply With Quote
  #3  
Old 04-20-2002, 10:25 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet Hack...

I am installing it now!

Satan
Reply With Quote
  #4  
Old 04-20-2002, 10:51 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I find that if you put this code instead, it looks better:

PHP Code:
<b>|</b><smallfont><b>$newpm[messages]</b>  New Messages <b>|</b></smallfont>
<
smallfont><b>$unreadpm[messages]</b>  Unread Messages <b>|</b></smallfont>
<
smallfont><b>$allpm[messages]</b>  Total Messages <b>|</b></smallfont>
<
smallfont><b>$sentpm[messages]</b>  Sent Messages <b>|</b></smallfont
That makes the font smaller, and then it looks more vBulletin style...

I also added
Quote:
<b>|</b>
Before and after each one, so that it seperates them better...

@Regs - You made a mistake in your php...It should be :

PHP Code:
$sentpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND folderid=-1 $ignoreusers"); 
Not :

Quote:
$unreadpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND folderid=-1 $ignoreusers");


Satan
Reply With Quote
  #5  
Old 04-20-2002, 12:11 PM
inetd inetd is offline
 
Join Date: Nov 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have screenshot?
Reply With Quote
  #6  
Old 04-20-2002, 12:17 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll get you one...

Satan
Reply With Quote
  #7  
Old 04-20-2002, 12:21 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I customised mine with the additions I said above, and I also added colour to it :

PHP Code:
<font color="#FF972F"
Make sure you add this to the end of the group of text though :

PHP Code:
</font
Mine looks like this :

PHP Code:
<font color="#FF972F">
<
b>|</b><smallfont><b>$newpm[messages]</b> New Messages <b>|</b></smallfont> <smallfont><b>$unreadpm[messages]</b
Unread Messages <b>|</b></smallfont> <smallfont><b>$allpm[messages]</bTotal 
Messages 
<b>|</b></smallfont> <smallfont><b>$sentpm[messages]</bSent Messages 
<b>|</b></smallfont> </font
Screenshot below...

Satan
Reply With Quote
  #8  
Old 04-20-2002, 12:22 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is meant to be Orange, but it doesnt show up too well...

Satan
Reply With Quote
  #9  
Old 04-20-2002, 03:21 PM
Regs Regs is offline
 
Join Date: Oct 2001
Location: Vancouver BC
Posts: 322
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

... Hellsatan. I just hurriedly copied and pasted the code from the original readme and forgot to change the first bit of code.

I had made the little template alterations as you suggested and added code to put it in a table like the rest of the pages.

I left that for others though

A good hack nonetheless.

Cheers,

~Regs.
Reply With Quote
  #10  
Old 04-20-2002, 04:59 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeh...

I found the alterations seemed to make it less confusing...

Satan
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:12 PM.


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.08336 seconds
  • Memory Usage 2,306KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete