View Full Version : Forum Home Enhancements - Username Colors "Online Users" (Like colorbars)
smgxtreme
03-18-2013, 11:00 PM
Like the other modifications for "usergroup colors" I could not get any working on current version.
Here is a template edit and it does work.
Style Manager> Style> Edit Templates> Widget Templates> widget_onlineusers
5.0.3 to 5.0.4:
Search for:
<a href="{vb:url 'profile', {vb:raw onlineUser}}">{vb:raw onlineUser.username}</a><vb:if condition="++$onlineCount < count($onlineUsers)">, </vb:if>
and replace with:
<p style="font-weight: bold;">
<a href="{vb:url 'profile',{vb:raw onlineUser}}"><vb:if condition="!empty($user['musername'])">{vb:raw onlineUser.musername}<vb:else />{vb:raw user.username}</vb:if></a><vb:if condition="++$onlineCount < count($onlineUsers)">, </vb:if></p>
Prior to 5.0.3 use this:
Search for:
<a href="{vb:url 'profile', {vb:raw user}}">{vb:raw user.username}</a><vb:if condition="++$onlineCount < count($onlineUsers)">, </vb:if>
and replace with:
<p style="font-weight: bold;">
<a href="{vb:url 'profile', {vb:raw user}}"><vb:if condition="!empty($user['musername'])">{vb:raw user.musername}<vb:else />{vb:raw user.username}</vb:if></a><vb:if condition="++$onlineCount < count($onlineUsers)">, </vb:if></p>
doctorsexy
03-19-2013, 11:31 AM
Works well... thanks ... now if someone would do something to show spiders
smgxtreme
03-19-2013, 03:08 PM
I actually just made html color "groups" in another block below it.
Was trying to add to the code but html kept breaking it.
I'll try and work on it later.
Thanks for your reply.
smgxtreme
03-19-2013, 07:07 PM
Ok, I was able to add the groups by once again editing the widget_onlineusers
Look for:
<p>{vb:rawphrase there_are_x_online, {vb:raw onlineUserCounts.total}} {vb:rawphrase x_members_and_y_guests, {vb:raw onlineUserCounts.members}, {vb:raw onlineUserCounts.guests}}.</p>
After add:
<b><font color="#ff3300">Example</font> ? 
<font color="#ff0a0a">Second Example</font> ? 
<font color="#33ff00">Third Example</font> ? 
</b><br><br>
If you don't want it there feel free to move around until you find the right spot.
Also, correct me if I did html syntax wrong please, I can use any help I can get too. :)
TilkiBey
03-19-2013, 09:45 PM
your codes will give w3 and last comma problem
use these codes
<a href="{vb:url 'profile', {vb:raw user}}"><vb:if condition="!empty($user['musername'])">{vb:raw user.musername}<vb:else />{vb:raw user.username}</vb:if></a><vb:if condition="++$onlineCount < count($onlineUsers)">, </vb:if>
smgxtreme
03-21-2013, 01:46 AM
Thank you for your code, I will update it above.
Thanks again!
emresozen
03-21-2013, 04:25 PM
your codes will give w3 and last comma problem
use these codes
<a href="{vb:url 'profile', {vb:raw user}}"><vb:if condition="!empty($user['musername'])">{vb:raw user.musername}<vb:else />{vb:raw user.username}</vb:if></a><vb:if condition="++$onlineCount < count($onlineUsers)">, </vb:if>
teşekk?rler tilkibey:)Trafikci258
TilkiBey
03-22-2013, 09:03 AM
Thank you for your code, I will update it above.
Thanks again!
hmm
where is the ending of p tag?
w3 error w3 error w3 error
JakeSheppard
07-15-2013, 07:23 PM
what do i need to change in 5.0.3? because it doesnt work, and i dont know the variables....
smgxtreme
08-08-2013, 05:42 AM
Updated and it works as of 08/07/2013
Huy Ho?ng
09-04-2013, 01:06 AM
It does not work with version vbb 5.0.4?
http://www.myalbum.vn/GroteFoto-VHGBZAAO.jpg
Ok, I was able to add the groups by once again editing the widget_onlineusers
Look for:
After add:
If you don't want it there feel free to move around until you find the right spot.
Also, correct me if I did html syntax wrong please, I can use any help I can get too. :)
good job smg ... the legend groups works but Username Colors "Online Users" wont work on 5.0.4 ... anyway i have a quick request ... is possible to separate online staff and users online?
(possibly keeping the image of the avatar,and use only username colors on mouse on the avatar) sorry for bad english :(
YuGiMoTo
10-18-2013, 12:18 PM
Is this suitable for 5.0.5?
fusiion
12-06-2013, 08:29 PM
Works on 5.0.5 just tried it. :)
ARLreborn
01-13-2014, 03:19 PM
<a href="{vb:url 'profile', {vb:raw onlineUser}}">{vb:raw onlineUser.username}</a><vb:if condition="++$onlineCount < count($onlineUsers)">, </vb:if>
and replace with:
<p style="font-weight: bold;">
<a href="{vb:url 'profile',{vb:raw onlineUser}}"><vb:if condition="!empty($user['musername'])">{vb:raw onlineUser.musername}<vb:else />{vb:raw user.username}</vb:if></a><vb:if condition="++$onlineCount < count($onlineUsers)">, </vb:if></p>
Doesnt work for vB 5.0.5
ARLreborn
01-13-2014, 05:52 PM
Apologies - it DOES work on 5.0.5 - just be sure to edit the "Online Users" Module and untick "Use Avatars"
WanaGo
04-14-2014, 12:49 AM
Running 5.1.0 here...
Can someone help explain this mod a bit. I have made the mod and the names go bold, however the colour is all the same. How do you go about and select the colours exactly? Very new to this.
Thanks
ageurtse
06-09-2014, 07:24 PM
great modification, nice work
TeamIHPK
06-03-2016, 10:34 AM
What about for vbulletin 5.2.2?
semihcannet
02-22-2019, 02:08 PM
What about for vbulletin 5.4.4?
In Omnibus
02-22-2019, 02:17 PM
What about for vbulletin 5.4.4?
You don't need to edit templates to get usergroup colors to work.
All you need to do is to use HTML in the AdminCP Usergroups.
Username HTML Markup
First Box: <span style="color:red"> (Or whatever color you want.)
Second Box: </span>
You can also use any other HTML attribute, like <b> or <i>
In Omnibus
02-22-2019, 02:24 PM
But if you're insistent on using a Modification this one works.
https://vbulletin.org/forum/showthread.php?t=289034
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.