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
  #62  
Old 06-12-2002, 08:03 AM
proton242 proton242 is offline
 
Join Date: Nov 2001
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good hack, thnx!!!
Reply With Quote
  #63  
Old 06-13-2002, 01:45 AM
Limpkinw Limpkinw is offline
 
Join Date: Feb 2002
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack!
Reply With Quote
  #64  
Old 07-13-2002, 07:08 PM
Martin CX Martin CX is offline
 
Join Date: Nov 2001
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Frenck
Just run this query once on your DB,

ALTER TABLE `post` ADD INDEX(`dateline`) ;

problem solved.

It brings back my page generation time back from 2.5 seconds to 0.5 seconds.
Yeah? Does this solve the problems with serverstrain? :hopeful:
Reply With Quote
  #65  
Old 07-17-2002, 03:38 PM
santeematt santeematt is offline
 
Join Date: May 2002
Location: Santee
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice. i installed this one a while ago but upgrading my board killed it.. i just fixed it and 'installed'
Reply With Quote
  #66  
Old 08-29-2002, 01:17 PM
Roody Roody is offline
 
Join Date: Mar 2002
Location: Florida
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there a possibility with all the changes that have occured with this hack that someone can post the actual coding that does in fact work correctly again?

Im a bit unsure after reading through these posts what to remove and what not too and having the updated changes in one spot would be nice.

Thx
Reply With Quote
  #67  
Old 09-01-2002, 12:48 AM
Roody Roody is offline
 
Join Date: Mar 2002
Location: Florida
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bumping this up to get some help on my previous post.
Reply With Quote
  #68  
Old 09-08-2002, 12:35 AM
Illuvatar's Avatar
Illuvatar Illuvatar is offline
 
Join Date: Apr 2002
Location: So. Cal
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me moves his site to new server, upgrades VB to 2.2.7 and re-installs this most excellent hack!

thanks again!

Illu
Reply With Quote
  #69  
Old 09-12-2002, 05:53 AM
ExAvIoUr ExAvIoUr is offline
 
Join Date: Jan 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Roody (and any else who doesn't want to read through) ... in a good mood today, so I compiled the optimizations from the posts here and here it is:

:::Since Your Last Visit:::

*** optimized per the suggestions of the posts here. I also changed the text to display "There are X new thread and X new posts! ... simply b/c the other way made it seemed crowded up top. change it to whatever you'd like.


Run this query on your DB:

Code:
ALTER TABLE `post` ADD INDEX(`dateline`) ;

Edit: "index.php"

Find:

Code:
// if user is know, then welcome

Add below it:

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]'");

Edit Template: /Forum Home Page Templates/"forumhome_welcometext"


Find:

Code:
Welcome back, <b>$bbuserinfo[username]</b>

Add below it:

Code:
<br>There are <b>$getnewthread[threads]</b> new threads and <b>$getnewpost[posts]</b> new posts!
Reply With Quote
  #70  
Old 09-25-2002, 09:38 PM
hidjra hidjra is offline
 
Join Date: Jan 2002
Location: Amsterdam
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by ExAvIoUr
Roody (and any else who doesn't want to read through) ... in a good mood today, so I compiled the optimizations from the posts here and here it is:

:::Since Your Last Visit:::

*** optimized per the suggestions of the posts here. I also changed the text to display "There are X new thread and X new posts! ... simply b/c the other way made it seemed crowded up top. change it to whatever you'd like.


Run this query on your DB:

Code:
ALTER TABLE `post` ADD INDEX(`dateline`) ;

Edit: "index.php"

Find:

Code:
// if user is know, then welcome

Add below it:

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]'");

Edit Template: /Forum Home Page Templates/"forumhome_welcometext"


Find:

Code:
Welcome back, <b>$bbuserinfo[username]</b>

Add below it:

Code:
<br>There are <b>$getnewthread[threads]</b> new threads and <b>$getnewpost[posts]</b> new posts!


hi, this does speed things up, but when i mark all forums read or when i log out, and log back in, it still displays new threads.

hidjra
Reply With Quote
  #71  
Old 09-28-2002, 05:16 AM
Roody Roody is offline
 
Join Date: Mar 2002
Location: Florida
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the help man. sorry if you think i wasnt reading this thread through. in fact i read it thoroughly, but after all the posts i found it a little confusing. thanks for the update though.
Reply With Quote
  #72  
Old 12-04-2002, 02:22 PM
Roody Roody is offline
 
Join Date: Mar 2002
Location: Florida
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey everyone. i actually just created a post regarding this hack in another forum. I need help trying to get this hack to work at a member level. Basically we have members on my board who can't see all the forums yet this hack leads them to think there is posts that are viewable to them. Is there a way to make this set on a member level.

here is my other post.

Member level
Reply With Quote
  #73  
Old 01-06-2003, 04:16 AM
sebastien69 sebastien69 is offline
 
Join Date: Apr 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah work great on 2.2.8

but how must i do for put the number of new thread as link under each forum descriptions

i've tried all the night but no succes for me

can you help me please????

Is it the good way for do that i explain ??
Reply With Quote
  #74  
Old 03-26-2003, 06:49 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

quick question, if i wanted this to also say
Quote:
there has been XX new journal entries
and XX new journal entry comments
and XX new quizzes
would you be able to tell me how?
Reply With Quote
  #75  
Old 02-16-2004, 05:30 PM
Thomas P's Avatar
Thomas P Thomas P is offline
 
Join Date: Oct 2001
Location: Munich, DE
Posts: 365
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd need what Roody wants.

$getnewthread=$DB_site->(...)and forumid <> 'id of your private forum'");
$getnewpost=$DB_site->(....)and thread.forumid <> 'id of your private forum'");

Can I use several forums here?

<> '4' | '6' | '8' ?

Members see the counter rising although there are only posts in private forums, that's the point.

Thanks,
-Tom
Reply With Quote
  #76  
Old 03-03-2004, 01:19 PM
Thomas P's Avatar
Thomas P Thomas P is offline
 
Join Date: Oct 2001
Location: Munich, DE
Posts: 365
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Thomas P
Can I use several forums here?

<> '4' | '6' | '8' ?

Members see the counter rising although there are only posts in private forums, that's the point.
^^^moderate bump
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 03:17 AM.


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.05618 seconds
  • Memory Usage 2,364KB
  • Queries Executed 30 (?)
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
  • (10)bbcode_code
  • (4)bbcode_php
  • (4)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
  • (2)pagenav_pagelink
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)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