Author Topic: [Code] Refresh Who's Online V2  (Read 295 times)

0 Members and 0 Guests are viewing this topic.

Offline aIURbliS

  • Hero Member
  • *****
  • Posts: 1215
  • Karma: 45
  • Gender: Male
  • Location: U.S.
    • View Profile
[Code] Refresh Who's Online V2
« on: November 05, 2012, 02:28:42 am »

Description: Refreshes the Who's Online page every X seconds.
V2: Code is a little more quicker to load and now you're able to specify how many seconds between each refresh.


This code utilizes jQuery, please use the latest version found in this thread: http://support.createaforum.com/5/jquery-v1-8-update/
Footers:
Code: [Select]

<script>function xboi209_refreshwhosonline(seconds){if(location.href==smf_scripturl+"?action=who"){setInterval(function(){$("#whos_online").load(smf_scripturl+"?action=who #whos_online")},seconds)}}xboi209_refreshwhosonline("5");</script>


Editing Instructions: Look near the end of the code where you see xboi209_refreshwhosonline("5"); and replace the 5 with any number you want, it is NOT recommended that you set it to anything lower than 5!
All codes I make are tested on the latest version of Google Chrome and upon request of other browsers.

Share on Facebook Share on Twitter


 

Related Topics

  Subject / Started by Replies Last post
4 Replies
1452 Views
Last post September 02, 2012, 05:16:54 pm
by DarkHydra505
0 Replies
377 Views
Last post August 08, 2014, 01:10:40 pm
by freebiesforum
0 Replies
277 Views
Last post November 11, 2014, 08:54:33 pm
by CyanProductions
0 Replies
233 Views
Last post April 23, 2018, 04:20:49 pm
by Chronamut
3 Replies
168 Views
Last post May 30, 2018, 07:08:08 pm
by CreateAForum