Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by MrLister MrLister is offline
Developer Last Online: Oct 2012 Show Printable Version Email this Page

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

Somebody here request it so I made it quickly.... Basically this hack here tells your users how many new posts and threads there have been since hteir last visit on the main page.

An example is https://vborg.vbsupport.ru and right under your username.

INSTRUCTIONS:
Inside index.php (not admin) find:
PHP Code:
// if user is know, then welcome 
right under it add:
PHP Code:
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]'");
$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'"); 

In the template forumhome_welcometext find:
PHP Code:
Welcome back, <b>$bbuserinfo[username]</b
right under it add:
PHP Code:
<br>There have been <b>$getnewthread[threads]</bthreads and <b>$getnewpost[posts]</bposts since your last visit

That's it! If you installed the hack please click the install button!

Show Your Support

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

Comments
  #22  
Old 11-04-2001, 06:25 PM
Ifrani's Avatar
Ifrani Ifrani is offline
 
Join Date: Oct 2001
Location: Berlin
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible, that it only count posts ? The number of posts an threads is always the same... ?!?
Reply With Quote
  #23  
Old 11-04-2001, 06:32 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the hack
Reply With Quote
  #24  
Old 11-05-2001, 08:50 AM
Ifrani's Avatar
Ifrani Ifrani is offline
 
Join Date: Oct 2001
Location: Berlin
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I doublecheck all changes for this hack, but it still displays only posts and it is not counting the new threads (display the same number as posts)...
Is that only my problem ???
Reply With Quote
  #25  
Old 11-05-2001, 05:31 PM
Ifrani's Avatar
Ifrani Ifrani is offline
 
Join Date: Oct 2001
Location: Berlin
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I find the error:

The code to insert is:
PHP Code:
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE dateline > '$bbuserinfo[lastvisit]'");
$getnewpost=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'"); 
Don't use the "lastpost" in the query, "dateline" works better for me ...
Reply With Quote
  #26  
Old 11-06-2001, 01:51 PM
Alien's Avatar
Alien Alien is offline
 
Join Date: Oct 2001
Posts: 827
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and working, thanks a bunch!
Reply With Quote
  #27  
Old 11-09-2001, 01:57 AM
Mr. X's Avatar
Mr. X Mr. X is offline
 
Join Date: Oct 2001
Location: Iowa
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed it. Thanks
Reply With Quote
  #28  
Old 11-09-2001, 08:03 PM
over over is offline
 
Join Date: Nov 2001
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thnx will be adding to my board very useful hack
Reply With Quote
  #29  
Old 11-10-2001, 05:01 PM
snyx's Avatar
snyx snyx is offline
 
Join Date: Oct 2001
Location: Vancouver (whistler.2010)
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

whoa, works great man
JUST what the doctor ordered
Reply With Quote
  #30  
Old 11-11-2001, 07:29 PM
philliplewisuk philliplewisuk is offline
 
Join Date: Nov 2001
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had to remove it.

I have 300 members on my forum at most times and adding it just made it error and error!
Reply With Quote
  #31  
Old 11-16-2001, 05:57 PM
LuBi LuBi is offline
 
Join Date: Oct 2001
Posts: 416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FireFly what do I edit just to make it like yours.

>>Welcome back, user
Avatar Time Now
last vist
There have been XX posts
Click Here to view posts

Which do I edit? forumhome template itself?
Reply With Quote
Reply


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 07:16 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05016 seconds
  • Memory Usage 2,310KB
  • Queries Executed 25 (?)
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
  • (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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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