The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
User Title HTML markup in Postbit based on UserGroup Details »» | |||||||||||||||||||||||||||
User Title HTML markup in Postbit based on UserGroup
Developer Last Online: Sep 2022
User Title HTML markup in Postbit based on UserGroup
Here is a small hack for postbit as some people have requested. This will markup user titles in postbit. (Not user name) Template to edit: Postbit. Full Install Instructions are in the text file attached. Find in postbit: HTML Code:
$post[usertitle] Replace with: HTML Code:
<!-- User title HTML markup www.sevenskins.com --> <if condition="($post[displaygroupid]== X)"> <span style="font-weight:bold; color: #FF0000;">$post[usertitle]</span> <else /> <if condition="($post[displaygroupid]== X)"> <span style="font-weight:bold; color: #008000;">$post[usertitle]</span> <else /> <if condition="($post[displaygroupid]== X)"> <span style="font-weight:bold; color: #0000FF;">$post[usertitle]</span> <else /> $post[usertitle] </if> </if> </if> <!-- / User title HTML markup www.sevenskins.com --> You will have to change X for the usergroup ID. Three user groups IF statements has been added but you can add more as needed. Enjoy . Show Your Support
|
Comments |
#2
|
||||
|
||||
So if I create 5 usergroups, how can I use this?
|
#3
|
||||
|
||||
^^
you keep adding the code just below the last <else /> replacing $post[usertitle] and change the color: #0000FF as required. HTML Code:
<if condition="($post[displaygroupid]== X)"> <span style="font-weight:bold; color: #0000FF;">$post[usertitle]</span> <else /> $post[usertitle] </if> Screen Shot below gives you idea what to do. . |
#4
|
|||
|
|||
Thank you much for this!
|
#5
|
|||
|
|||
can you update this for vb 4 as the conditionals are different?
|
#6
|
|||
|
|||
Hi.
I want to use this, however, I'm trying to do something special with it. How can I make it show the color only if they're a moderator of that forum? For example; UserA is a moderator of ForumID 5. If UserA posts in ForumID 5, I want their usertitle to show with a color for everyone. However, if UserA posts in ForumID 15 (which they don't moderate), their usertitle shows as normal. How can I do this? Thanks |
#7
|
||||
|
||||
You would use conditionals that only display the formatting in the forums you wish. Check the articles sections for the vB3 conditionals list. I forget the exact syntax off the top of my head, but you would just wrap the specific parts you want displaying differently in the conditional statement.
On an unrelated note, it's 12:28 AM, and I'm drinking coffee. Yes. Yes it does. |
#8
|
|||
|
|||
Quote:
However, I know what you're meaning.. but I'm trying to go more in depth & complicated. If I'm a guest viewing vB.org at your post right now, and you're a moderator of this forum this is posted on, your usertitle would show with the color and what not. However, if I'm a guest viewing another post you made on vB.org in, for example, the Articles forums (which you don't moderate), then your usertitle would show without any customization.. |
#9
|
||||
|
||||
I may be recalling incorrectly, but I was fairly certain there was an [minicode]is_moderator()[/minicode] function for vB 3 conditionals. Something like:
HTML Code:
<if condition="is_moderator($forumid, 5, 6, 7)"><!--Some Code Here--></if> |
#10
|
|||
|
|||
Quote:
I want it to show if anyone is looking at a post of a moderator in that forum.. With that if condition, if I am a moderator of forums 5, 6, and 7 I will be able to see the code. However, if I'm a normal user and I'm looking at the moderator's post in forum 5, 6 or 7, I won't be able to see the code.. which is what I am looking for. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|