Jump to content



Photo

[vBulletin] Group default font color


  • Please log in to reply
1 reply to this topic

#1 Ellendway

Ellendway
  • Members
  • 95 posts

Posted 25 January 2012 - 01:56 PM

Welcome to another vBulletin tutorial. Today I will give you an idea how to improve your forums with colors. I bet some of you will know Blizzard Entertainment and their Blue Posters. Their topics or answers have usually blue color (You can check it here). And because I have got World of Warcraft website I had same idea. I was looking for this for long time and now, I'm done and ready to share this with you guys.

What you will need?
  • Admin Control Panel access;
  • Searching skill in templates;
  • Your own idea what color you will use (You will need to use HEX colors - #000000, etc.)
.XML files
I will start with standard / default .XML files from Client Area. As always you will need to download new version of your skin. If you have got your .XML file saved in your computer open it. I recommend download PSPad software (it's advanced text editor) or just use WordPad. Search for {vb:raw post.message} phrase.

You will need to replace this code with this
<vb:if condition ="$post[usergroupid]==NUMBER OF USER GROUP 1"><span style="color: #NUMBER OF COLOR 1"></vb:if>
<vb:if condition ="$post[usergroupid]==NUMBER OF USER GROUP 2"><span style="color: #NUMBER OF COLOR 2"></vb:if>
{vb:raw post.message}
<vb:if condition ="$post[usergroupid]==NUMBER OF USER GROUP 2"></span></vb:if>
<vb:if condition ="$post[usergroupid]==NUMBER OF USER GROUP 1"></span></vb:if>

I'm sure you will want explanation. Sure no problem.

NUMBER OF USER GROUP - It's number of user group saved in database. You can check group number in Admin Control Panel:
  • Admin Control Panel
  • Usergroups;
  • Usergroup Manager;
  • There you will see window with text "Edit Usergroup (id: 6)". ID is number of usergroup.

NUMBER OF COLOR - Because I'm using HEX codes for this you will need it too. I'm not sure if you can use other ways but HEX codes are tested. You can use 2createawebsite.com website for colors. Just copy number with # with the table there. For example #159FB7 or #1DB715.

Example codes
You can use one group or five groups. It's your decision. I prefer use colors for administrators and moderators. Members can have white / black (default) color.

<vb:if condition ="$post[usergroupid]==6"><span style="color: #014ba0"></vb:if>
<vb:if condition ="$post[usergroupid]==7"><span style="color: #008000"></vb:if>
{vb:raw post.message}
<vb:if condition ="$post[usergroupid]==7"></span></vb:if>
<vb:if condition ="$post[usergroupid]==6"></span></vb:if>

<vb:if condition ="$post[usergroupid]==5"><span style="color: #B75115"></vb:if>
{vb:raw post.message}
<vb:if condition ="$post[usergroupid]==5"></span></vb:if>

If you replaced phrase {vb:raw post.message} you can save file and upload theme on your forums as usually.

Admin Control Panel
If you have got uploaded theme already you can edit template from ACP.
  • Go to ACP;
  • Styles & Templates;
  • Choose Edit Template;
  • Search for Postbit Templates;
  • And again - search for {vb:raw post.message} and replace it.

<vb:if condition ="$post[usergroupid]==NUMBER OF USER GROUP 1"><span style="color: #NUMBER OF COLOR 1"></vb:if>
<vb:if condition ="$post[usergroupid]==NUMBER OF USER GROUP 2"><span style="color: #NUMBER OF COLOR 2"></vb:if>
{vb:raw post.message}
<vb:if condition ="$post[usergroupid]==NUMBER OF USER GROUP 2"></span></vb:if>
<vb:if condition ="$post[usergroupid]==NUMBER OF USER GROUP 1"></span></vb:if>

  • Save changes



If you will have question just ask.

>>> Czech / Slovak Official World of Warcraft Fansite WoWFan.cz <<<


#2 Sean James

Sean James

    Administrator

  • Administrators
  • 12,887 posts
  • LocationSydney Australia

Posted 29 January 2012 - 06:03 AM

Nice work mate, adding to tutorials ;)

Bluepearl Skins - vBulletin, XenForo & Custom Skins - Custom Skin Portfolio updated

If you are happy with our support, please leave feedback here it will be much appreciated!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Links

Customers

Our Network

Our Friends