The Arcive of vBulletin Modifications Site. |
|
Members online status Details »»
|
|||||||||||||||||||||||||
This template edit will show if any members are logged in or not by displaying the online status in red for offline or green for online.
![]() ![]() Edit the phrase "currently_active_users" and change to "[Your Forum Name] Members" Create new phrases "online_now" value="ONLINE NOW!" and "offline_now" value= "OFFLINE" or whatever you want displayed Find and change in template FORUMHOME : Code:
<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />
Code:
<span class="blocksubhead">{vb:rawphrase currently_active_users} -</span>
<vb:if condition="$numberregistered > 0">
<span class=members_online>{vb:phrase online_now}</span>
<vb:else />
<span class=members_offline>{vb:phrase offline_now}</span>
</vb:if>
Code:
.members_online {
color: lime;
font-style: italic;
font-weight: bolder;
}
.members_offline {
color: red;
font-style: italic;
font-weight: bolder;
}
Show Your Support
|
|||||||||||||||||||||||||
| 3 благодарности(ей) от: | ||
| Dragonsys, HM666, puertoblack2003 | ||
| Comments |
|
#2
|
||||
|
||||
|
Can this be used to display if any members of a specific usergroup are online?
|
|
#3
|
||||
|
||||
|
I imagine it could. I don't have a vb4 install anymore to work with so I couldn't tell you how to do it. I'm sure one of the vb4 devs on here could help you out with that. I only work on vb5 mods now.
|
|
#4
|
||||
|
||||
|
I had thought about using is_member_of (and someone PM'd me about it as well), I'm just not sure if it would actually check anyone logged in, or if it just pulls from the person viewing the page. I will play with it and post up here if I find a solution which works.
|
|
#5
|
||||
|
||||
|
When you use the is_member_of() function, you typically need to pass 2 arrays as parameters, the first should contain the usergroup information of the user in question, and the second array is a list of usergroupids you are checking for.
So, for example suppose you have the userid of the user in question (in $userid), what you could then use as a condition is: is_member_of(fetch_userinfo($userid), array(X, Y, Z)) which will return true if the user with $userid as their userid is a member of any of the usergroups with usergroupid X, Y, or Z. |
|
#6
|
||||
|
||||
|
Quote:
|
|
#8
|
|||
|
|||
|
Works for vB 4.2.5
Find and change in template FORUMHOME : (Only partial code was given above) Code:
<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</h3>
Change to: Code:
<span class="blocksubhead">{vb:rawphrase currently_active_users} -</span>
<vb:if condition="$numberregistered > 0">
<span class=members_online>{vb:phrase online_now}</span>
<vb:else />
<span class=members_offline>{vb:phrase offline_now}</span>
</vb:if>
|
![]() |
|
|