View Full Version : User specific text colour
Renny
06-27-2008, 03:43 PM
Hello,
Is there a way you can make it so a user group when posting is automatically given a text colour to the colour i chose?
Ive been looking for sometime on how to do this but ive had no luck and cant find any mods/hacks on how to do this
However i know it can be done becuase i use to use a layout that did just that, but i dont want to use the layout.
Thanks
wwolf27
06-29-2008, 03:34 AM
Hello,
Is there a way i can make it so a user group when posting is automatically given a text colour to the colour i chose?
Ive been looking for sometime on how to do this but ive had no luck and cant find any mods/hacks on how to do this
However i know it can be done becuase i use to use a layout that did just that, but i dont want to use the layout.
Thanks
I to am interested :o
Karri
07-03-2008, 05:59 PM
This is how I managed to make it work. I do it so that certain users get a certain color but it translates easily to the whole group getting the color you pick.
Go to your skins css and define something like
.VIP_Group { color:#000000 }
Then go to your postbit template and find
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
and replace with
<!-- message -->
<if condition="(in_array($post['usergroupid'], array('group number goes here')))">
<span class="VIP_Group"><div id="post_message_$post[postid]">$post[message]</div></span>
<else />
<div id="post_message_$post[postid]">$post[message]</div>
</if>
<!-- / message -->
That should do what you are looking for. :)
Renny
07-03-2008, 06:35 PM
Ive tried to do what you have suggested but it hasnt worked.
This bit here;
array('group number goes here')))">
Just making sure, this is what ive put. Is it correct?
array('6')))">
And the CSS code goes in the "Additional CSS Definitions" correct?
Thanks,
Renny
Opserty
07-03-2008, 07:00 PM
AdminCP > Usergroups > Usergroup Manager > Edit Usergroup > Username HTML markup
Renny
07-03-2008, 07:12 PM
AdminCP > Usergroups > Usergroup Manager > Edit Usergroup > Username HTML markup
Im sorry but what you have just posted isnt relivent. Its the Text of the posts the usergroup posts, not the username. Maybe you should read more carefully ?
Karri
07-03-2008, 07:34 PM
Ive tried to do what you have suggested but it hasnt worked.
This bit here;
array('group number goes here')))">
Just making sure, this is what ive put. Is it correct?
array('6')))">
And the CSS code goes in the "Additional CSS Definitions" correct?
Thanks,
Renny
That is the code I use, of course I have more than one group getting colored but I just tried changing my code to match what I posted and the colors still worked. Yes I have the CSS in the additional CSS section. Silly question but the code I posted was for black text, you did change it to a color that would be different than your standard color?
EDITED TO ADD: also you put it in the postbit template you are using? I didn't specify but if you are using postbit_legacy then it needs to go in there.
Renny
07-03-2008, 07:45 PM
That is the code I use, of course I have more than one group getting colored but I just tried changing my code to match what I posted and the colors still worked. Yes I have the CSS in the additional CSS section. Silly question but the code I posted was for black text, you did change it to a color that would be different than your standard color?
Yes i changed the colour to #04c0ff. In the edit template which postbit are you talking about, just to make sure ive got the righ tone it is the one called "postit" with out any "postbit_XXXXXX"?
Karri
07-03-2008, 07:57 PM
Depends on which one you are using on your site, if you are using the legacy layout then you need to use postbit_legacy if you are using the layout like in the posts here you need to use postbit. Check vbulletin options, Style & Language Settings, Use Legacy (Vertical) Postbit Template if that is set to yes then edit the postbit_legacy template. If that is set to no then do the postbit template.
Renny
07-03-2008, 08:14 PM
Depends on which one you are using on your site, if you are using the legacy layout then you need to use postbit_legacy if you are using the layout like in the posts here you need to use postbit. Check vbulletin options, Style & Language Settings, Use Legacy (Vertical) Postbit Template if that is set to yes then edit the postbit_legacy template. If that is set to no then do the postbit template.
Im using postbit_legacy, ive found and edited the code like youve told me to and yet still no luck... ill have a bit of a mess around more tomorrow and post if any developments, thanks for your help and time =]
wwolf27
07-04-2008, 08:57 PM
Thank you Karri and Renny, you have been a great help!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.