The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Currently Active Users widget ?
I have added a Currently Active Users widget ? to my CMS and it shows up fine but does anyone know how to make it update and refresh ?
Look at the photo below . And does anyone know how to do this with PHP ? rather than static HTML This is the code i used . Code:
<!-- logged-in users --> <div id="wgo_onlineusers" class="wgo_subblock"> <h3><img src="images/misc/users_online.png" alt="Currently Active Users" />Currently Active Users</h3> <div> <p>There are currently <a href="online.php">8 users online</a>. <span class="shade">4 members and 4 guests</span></p> <p>Most users ever online was 37, 11-29-2009 at <span class="time">02:54 PM</span>.</p> <ol class="commalist" id="wgo_onlineusers_list"> <b> <font color="red">• Administrators</font> <font color="666600">• Super Moderators</font> • Moderators • Registered Users </b><br /><br /> <li> <a class="username" href="member.php?1-The-Voice-of-champions"> <font color="red">The Voice of champions</font></a></li> <li> <a class="username" href="member.php?49-BIG-SOOTY">BIG SOOTY</a></li> <li> <a class="username" href="member.php?23-Mark-Ryan">Mark Ryan</a>+</li> <li> <a class="username" href="member.php?19-tak1888"><font color="666600">tak1888</font></a>+</li> </ol> </div> </div> <!-- end logged-in users --> |
#2
|
|||
|
|||
That is no PHP code, just static HTML ... you need to use PHP code and queries to get the updated information.
|
#3
|
|||
|
|||
I know that but i posted here to see if anyone knew how to do it ?
|
#4
|
||||
|
||||
Have you tried copying the php code from the forum.php page?
|
#5
|
||||
|
||||
im thinking makeing a template, and then make the widget and register the template
and then print_output just like a normal php page, but inside the widget instead.. |
#6
|
|||
|
|||
Might try that .
Do you know what the code is or the php code that im looking for ? --------------- Added [DATE]1261011165[/DATE] at [TIME]1261011165[/TIME] --------------- Ok i found this and i think this is the right code . How would i go about adding this to the PHP Widget ? what is the output in the last line . PHP Code:
|
#7
|
||||
|
||||
Did you try looking at the file before asking? It's pretty well commented with LOGGED IN USERS in big capital letters to tell you where the code is.
|
#8
|
|||
|
|||
Quote:
And what should the full code be to add it to the widget so i can try it . I posted it in post 6 but not sure what the last line should be with the output . |
#9
|
||||
|
||||
You'll have to try things out and see what you need. The php code is in the forum.php file and the template code needed to output it is probably in the FORUMHOME template. If it isn't in there, then do this to find the template - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.
That should give you plenty of information to go try this out on your test site and get it working. |
#10
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|