The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to display online users/guests on cms homepage?
I'm using vb 4.2 and would like to display the amount of online users/guest in a cms article on the cms home. My forum is closed for guest users so they can't view it there. How can i accomplish this?
|
#2
|
|||
|
|||
Not positive it would work, but at the very least you would need to grab that bit of code from the bottom of the ForumHome Template and plug it into a template in the CMS depending on where you wanted it to appear. Keep in mind that it adds an extra call on the database which will slow loading times.
Code:
<vb:if condition="$show['guest']"> <!-- logged-in users --> <div id="wgo_onlineusers" class="wgo_subblock section"> <h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</h3> <div> <p>{vb:rawphrase there_are_x_y_online_link, {vb:raw totalonline}, {vb:raw session.sessionurl_q}} <span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw numberregistered}, {vb:raw numberguest}}</span></p> <p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw recordusers}, {vb:raw recorddate}, {vb:raw recordtime}}</p> <vb:if condition="$activeusers"> <ol class="commalist" id="wgo_onlineusers_list"> <vb:each from="activeusers" value="loggedin"> <li>{vb:stylevar dirmark}<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>{vb:raw loggedin.invisiblemark}{vb:raw loggedin.buddymark}{vb:raw loggedin.comma}</li> </vb:each> </ol> </vb:if> </div> </div> <!-- end logged-in users --> AActually in looking at it further, you'd probably have to include the hook as well Code:
{vb:raw template_hook.forumhome_wgo_pos1} |
#3
|
|||
|
|||
Great, thank you Budget101 i'm going to fiddle with your tip. If it works i let you and everybody know if if worked or not.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|