Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[release] Ammount of new posts since last visit :) Details »»
[release] Ammount of new posts since last visit :)
Version: , by Zachery Zachery is offline
Developer Last Online: May 2017 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 11-14-2003 Last Update: Never Installs: 0
 
No support by the author.

This should be a simple one,

This will show how many new posts there have been since a persons last visit, this now does show the ammount of new threads too, silly me, i forgot to update the varible when i copied the posts querry

this will add 2 queries to your forumhome, however i must warn that with this even only running on the forumhome, these queries might still be rather large if you have a very active forum. at least from what i understand

updated with brads suggestion

id also take a look at this post as you may wish to include this into this template mod
http://www.vbulletintemplates.com/mo...05&postcount=8

live @ http://www.digitalkore.net

Download Now

File Type: (21.4 KB, 11 views)

Show Your Support

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

Comments
  #2  
Old 11-14-2003, 09:49 PM
imported_ogden2k's Avatar
imported_ogden2k imported_ogden2k is offline
 
Join Date: Apr 2003
Location: Maine, USA
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent addon!
Reply With Quote
  #3  
Old 11-14-2003, 09:50 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i belive assassingod made it hackable, i try to stay away from hacking files when i can help it
Reply With Quote
  #4  
Old 11-15-2003, 03:21 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://www.vbulletintemplates.com/mo...ead.php?t=1572

Asuming the db hasent changed more then I think it has from vB 2 this query should help out larger boards:

Code:
ALTER TABLE post ADD INDEX('dateline')
Reply With Quote
  #5  
Old 11-15-2003, 03:22 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how so brad?
Reply With Quote
  #6  
Old 11-15-2003, 03:26 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Faranth
how so brad?
It will create a index in the database on the post table, the records are sorted by dateline. So when index.php is loaded vB's mysql has a index it can look at and retrive the records from, this is faster then having mySQL search the post table on every page load. However the trade off is that the index will take up some extra space in the database.
Reply With Quote
  #7  
Old 11-15-2003, 04:06 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so would the querys need to be changed at all?
Reply With Quote
  #8  
Old 11-16-2003, 06:35 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Faranth
so would the querys need to be changed at all?
No, the query I posted will work with the modification as is. And should only be run once on the database.

Ive attached a php script that will do it for you, just upload it to the admincp directory and it should work.

Also you can cut down on alot of load by not running the querys for guests, to do so change the php block to this:

PHP Code:

if (THIS_SCRIPT == 'index' and $bbuserinfo['userid'] !== '0'
{
// Posts
$getnewposts $DB_site->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "post WHERE dateline >= '$bbuserinfo[lastvisit]'");
$newposts number_format($getnewposts['count']);
// Threads
$getnewthreads $DB_site->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "thread WHERE dateline >= '$bbuserinfo[lastvisit]'");
$newthreads number_format($getnewthreads['count']);

Boards that have converted their tables to innodb should avoid this modification also, it uses the count function which is slow under innodb, considering vBulletin uses count on these tables alot anyway this will only pour salt in a open wound.

Im not trying to bash this modification, you just have to be real careful when releasing/installing something like this, because it dose open the door up to all sorts of server load problems if not added correctly..
Attached Files
File Type: (21.4 KB, 2 views)
Reply With Quote
  #9  
Old 11-16-2003, 06:55 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks brad, ill update my txt and point users to your attachment


im more than aware of this :\ and i didnt think about disabling it for guests, sliped my mind which i should know better as i already turn alot of things off for guests.

i do belive i did give somewhat of a warning however

i updated the txt instuctions to check for guests as well and redid abit of the html to make it look abit nicer to users who are guests
Reply With Quote
  #10  
Old 11-17-2003, 10:29 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

brad i noticed a small error in your coding when for !== would still show for guests while != will not run the querry for guests, ive updated my txt file anyone who installed this should update their phpinclude_start tempalte
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 08:54 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.07040 seconds
  • Memory Usage 2,322KB
  • Queries Executed 24 (?)
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
  • (1)bbcode_code
  • (1)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
  • (2)postbit_attachment
  • (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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete