Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-29-2012, 05:15 PM
Altari Altari is offline
 
Join Date: Sep 2011
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to refresh activitystream each X second ?

Hello,

I would like to automatically refresh the activity stream every, maybe 5 seconds. Is there a way to do this ? (Vb's default setting is only for minutes).

I had a look in clientscript/vbulletin_activitystream.js and change some things, but that's not enough and do nothing.

Thank you.
Reply With Quote
  #2  
Old 05-29-2012, 07:21 PM
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Location: India
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you will need to edit these line in activitystream.js file

Change this line
Code:
if(this.options.refresh*60000>300000){this.idlerefresh=this.options.refresh*60000}else{this.idlerefresh=300000}
To
Code:
if(this.options.refresh*1000>60000){this.idlerefresh=this.options.refresh*1000}else{this.idlerefresh=60000}
now if you enter 5 in vB default setting, it will be treated as 5 seconds.
Reply With Quote
  #3  
Old 05-30-2012, 01:16 AM
setishock setishock is offline
 
Join Date: Feb 2008
Location: Houma, La.
Posts: 1,177
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does your forum really get that busy that you need to refresh every 5 seconds as opposed to every 5 minutes? The more things you give to VB to do more often will chew up CPU cycles as well as pounding on your database. Your host may not appreciate that.
Reply With Quote
  #4  
Old 05-30-2012, 01:17 PM
RSNF's Avatar
RSNF RSNF is offline
 
Join Date: May 2010
Location: Florida
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Taking a huge gamble by doing every 5 seconds.............Just saying
Reply With Quote
  #5  
Old 05-30-2012, 02:13 PM
Altari Altari is offline
 
Join Date: Sep 2011
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This depend of users viewing the activity stream isn't it ? I have something like 400-600 users on my board at the same time, but nomore than 10/20 users watching the activity stream, so the the server load should be negligible ? (Dedicated server)

--------------- Added [DATE]1338391354[/DATE] at [TIME]1338391354[/TIME] ---------------

Quote:
Originally Posted by Badshah93 View Post
you will need to edit these line in activitystream.js file

Change this line
Code:
if(this.options.refresh*60000>300000){this.idlerefresh=this.options.refresh*60000}else{this.idlerefresh=300000}
To
Code:
if(this.options.refresh*1000>60000){this.idlerefresh=this.options.refresh*1000}else{this.idlerefresh=60000}
now if you enter 5 in vB default setting, it will be treated as 5 seconds.
Thank you for your help, but that's not enough and this doesn't work.
Reply With Quote
  #6  
Old 05-30-2012, 03:35 PM
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Location: India
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try this one (last code was refrshing in every 60 seconds or more)

Replace
Code:
if(this.options.refresh*60000>300000){this.idlerefresh=this.options.refresh*60000}else{this.idlerefresh=300000}
With

Code:
if(this.options.refresh){this.idlerefresh=this.options.refresh*1000}else{this.idlerefresh=60000}
Reply With Quote
  #7  
Old 05-31-2012, 08:30 AM
Altari Altari is offline
 
Join Date: Sep 2011
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This work well, thank you, i have set 10 sec.

Thank you.
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 09:12 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.03829 seconds
  • Memory Usage 2,215KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete