|
 
 |
|
|
 |
About This Page: This is a discussion on Trying to change user colours... within the vBulletin Modifications forums, part of the vBulletin Discusions category, at vBulletin Modification Discussions. I'm trying to change the colour of someones username depending on their usergroup.
I found this:
PHP Code:
$this -> post [ 'usertitle' ] =& $this -> registry -> usergroupcache [ "0" ][ 'usertitle' ];
|
10-20-2007, 08:51 AM
|
#1 (permalink)
|
|
Junior Member
Join Date: Oct 2007
Posts: 1
|
Trying to change user colours...
I'm trying to change the colour of someones username depending on their usergroup.
I found this:
PHP Code:
$this->post['usertitle'] =& $this->registry->usergroupcache["0"]['usertitle'];
I would like to make a switch statement like:
PHP Code:
switch($post['usertitle'])
{
case "Member"; $colour = "#fff"; $alt = "Regular Member"; break;
}
Hope that makes sense. Not sure where to put the switch statement though... Very new to VBulletin and haven't had enough time to properly look through all of the code.
Any help would be greatly appreciated  . Thanks
|
|
|
10-20-2007, 12:30 PM
|
#2 (permalink)
|
|
Administrator
Join Date: May 2006
Posts: 2,223
|
Re: Trying to change user colours...
This is a default option for vBulletin usergroups.
If you look in each usergoups settings you will see that the fourth setting from the top has this.
Username HTML Markup (Specify an opening and closing HTML tag with which to display the names of users in this group. This applies to names that appear on Logged-in Users, Who's Online, Users Browsing Forum, Users Browsing Thread, Posts, Member List etc.)
|
|
|
12-20-2007, 04:27 PM
|
#3 (permalink)
|
|
Junior Member
Join Date: Dec 2007
Posts: 6
|
Re: Trying to change user colours...
Goto:
admincp>>usergroups>>usergroupsmanager>>Username HTML Markup
put this:
PHP Code:
<span style="font-weight: bold; color: #YOURCOLOR;">
in the first box and this:
in the second!
Dont forget to change your color!
|
|
|
01-25-2008, 04:56 AM
|
#4 (permalink)
|
|
Junior Member
Join Date: Jan 2008
Posts: 1
|
Re: Trying to change user colours...
Quote:
Originally Posted by VBgOd
Goto:
admincp>>usergroups>>usergroupsmanager>>Username HTML Markup
put this:
PHP Code:
<span style="font-weight: bold; color: #YOURCOLOR;">
|
Thank you, that works, but only for primary members of the moderator group. How to highlisgh all moderators (primary and additional members of moderators group)?
|
|
|
01-26-2008, 10:49 PM
|
#5 (permalink)
|
|
Administrator
Join Date: May 2006
Posts: 2,223
|
Re: Trying to change user colours...
Set the moderator group to override primary groups username settings.
|
|
|
04-11-2008, 02:13 PM
|
#6 (permalink)
|
|
Junior Member
Join Date: Jul 2007
Posts: 6
|
Re: Trying to change user colours...
Quote:
Originally Posted by Code Monkey
Set the moderator group to override primary groups username settings.
|
This answers the question I was just about to ask 
|
|
|
04-22-2008, 05:53 PM
|
#7 (permalink)
|
|
Junior Member
Join Date: Apr 2008
Location: Sydney, Australia
Posts: 17
|
Re: Trying to change user colours...
Quote:
Originally Posted by VBgOd
Goto:
admincp>>usergroups>>usergroupsmanager>>Username HTML Markup
put this:
PHP Code:
<span style="font-weight: bold; color: #YOURCOLOR;">
in the first box and this:
in the second!
Dont forget to change your color!
|
I really wanted this on my baord also BUT i can't find "Username HTML Markup" after going into usergroupsmanager.???
I have 3.6.4 would mine be different?
Thanks 
|
|
|
04-23-2008, 07:25 AM
|
#8 (permalink)
|
|
Junior Member
Join Date: Jul 2007
Location: south central louisiana
Posts: 14
|
Re: Trying to change user colours...
Quote:
Originally Posted by IzNChar
I really wanted this on my baord also BUT i can't find "Username HTML Markup" after going into usergroupsmanager.???
I have 3.6.4 would mine be different?
Thanks 
|
no ... should be the same.
goto admincp >>> usergroup >>> usergroup manager >>>
then edit the desired user group. the fourth line down should look like this ... click for larger image ...
then enter the desired code like this in the first box, red in this example ...
Code:
<span style="color: red;">
and this in the second
|
|
|
04-23-2008, 08:26 PM
|
#9 (permalink)
|
|
Junior Member
Join Date: Apr 2008
Location: Sydney, Australia
Posts: 17
|
Re: Trying to change user colours...
thank you so much
sorry, i was looking for another 'heading' oops...silly me LOL
Thanks, it looks great
1 more Q...can we make them bold at all? i just wanted to make us admin bold.
do i put in <b> somewhere along the line? not 100% sure where though  ta
oh and what about fonts? or is that a bit much? lol
|
|
|
04-25-2008, 07:53 PM
|
#10 (permalink)
|
|
Junior Member
Join Date: Jul 2007
Location: south central louisiana
Posts: 14
|
Re: Trying to change user colours...
Quote:
Originally Posted by IzNChar
thank you so much
sorry, i was looking for another 'heading' oops...silly me LOL
Thanks, it looks great
1 more Q...can we make them bold at all? i just wanted to make us admin bold.
do i put in <b> somewhere along the line? not 100% sure where though  ta
oh and what about fonts? or is that a bit much? lol
|
 good question ... im a newb to and i never tried the bold look. the example given earlier in this thread suggests you can ... VBgOd's example in post #3 might give you an idea 
|
|
|
05-24-2008, 03:15 AM
|
#11 (permalink)
|
|
Junior Member
Join Date: May 2008
Posts: 1
|
Re: Trying to change user colours...
Quote:
Originally Posted by IzNChar
thank you so much
sorry, i was looking for another 'heading' oops...silly me LOL
Thanks, it looks great
1 more Q...can we make them bold at all? i just wanted to make us admin bold.
do i put in <b> somewhere along the line? not 100% sure where though  ta
oh and what about fonts? or is that a bit much? lol
|
Add <b> before<span> markup in first text box and </b> to 2nd text box.
<b><span style="color: red;"> in first box and </b></span> in 2nd box n its done. I've check already for ma forum.
|
|
|
07-09-2008, 10:21 AM
|
#12 (permalink)
|
|
Junior Member
Join Date: Jul 2008
Posts: 1
|
Re: Trying to change user colours...
When i click update it says
Quote:
Database error
The **** database has encountered a problem.
Please try the following:
* Load the page again by clicking the Refresh button in your web browser.
* Open the www.***.com home page, then try to open another page.
* Click the Back button to try another link.
The www.****.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
We apologise for any inconvenience.
|
and sql code below it
Quote:
Database error in vBulletin 3.7.0 Release Candidate 1:
Invalid SQL:
UPDATE usergroup SET
### UPDATE QUERY GENERATED BY fetch_query_sql() ###
`title` = 'Administrators',
`description` = '',
`usertitle` = 'Administrator',
`opentag` = '<span style=\"font-weight: bold; color: #F660AB;\"> ',
`closetag` = '</span>',
`passwordexpires` = '180',
`passwordhistory` = '360',
|
please help me !
|
|
|
07-20-2008, 11:16 PM
|
#13 (permalink)
|
|
Junior Member
Join Date: Jul 2008
Posts: 1
|
Re: Trying to change user colours...
well its for user names .. and working fine ..
but what if one want to change the title colour ? like Administrator ?
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |
|
| Online Users |
32 |
| Registered |
1 |
| Guests |
31 |
| Members |
3746 |
| Active Members |
164 |
| Threads |
1791 |
| Posts |
7271 |
| Top poster: Code Monkey (2223) |
| Welcome to our newest member, punko3000 |
| Most users ever online was 235, 04-11-2007 at 08:59 AM. |
|
|