Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
User Title HTML markup in Postbit based on UserGroup Details »»
User Title HTML markup in Postbit based on UserGroup
Version: 1.00, by Seven Skins Seven Skins is offline
Developer Last Online: Sep 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.7.x Rating:
Released: 11-04-2008 Last Update: Never Installs: 16
Template Edits
 
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-05-2008, 11:28 PM
iogames's Avatar
iogames iogames is offline
 
Join Date: Jan 2007
Location: Las Vegas, NV.
Posts: 1,433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So if I create 5 usergroups, how can I use this?
Reply With Quote
  #3  
Old 11-06-2008, 10:42 AM
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^^


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.







.
Reply With Quote
  #4  
Old 11-02-2009, 01:26 AM
m411b m411b is offline
 
Join Date: Feb 2009
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you much for this!
Reply With Quote
  #5  
Old 03-18-2012, 08:46 PM
tommyxv tommyxv is offline
 
Join Date: Feb 2005
Posts: 295
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you update this for vb 4 as the conditionals are different?
Reply With Quote
  #6  
Old 12-10-2013, 06:47 PM
CoffeeLovesYou CoffeeLovesYou is offline
 
Join Date: Feb 2010
Posts: 176
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 12-13-2013, 04:28 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 12-21-2013, 07:34 AM
CoffeeLovesYou CoffeeLovesYou is offline
 
Join Date: Feb 2010
Posts: 176
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
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.
Thanks for responding.
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..
Reply With Quote
  #9  
Old 12-21-2013, 01:18 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Probably not the exact syntax, but I can't seem to find a reference to it this morning.
Reply With Quote
  #10  
Old 12-21-2013, 10:03 PM
CoffeeLovesYou CoffeeLovesYou is offline
 
Join Date: Feb 2010
Posts: 176
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
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>
Probably not the exact syntax, but I can't seem to find a reference to it this morning.
Yes, that will show if the user who is looking is a moderator.
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:19 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06154 seconds
  • Memory Usage 2,300KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete