Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2008, 05:47 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default user title html markup

Vbulletin by default has the usergroup > html markup feature. However, I'd like one specifically for user TITLE html markup as well. Couldn't find any here, either in modification graveyard or not quite that feature but close.

I tried to figure it out on my own, but not a coder by trade.

For one, I want this applied in postbit_legacy at least. So I went to that template.

I see this:

Quote:
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
Now, on my home page shoutbox you cannot use it unless you're a registered member. So I have this if rule applied to the text box area of the shoutbox:

Quote:
<if condition="in_array($bbuserinfo['usergroupid'], array(2,6,7,35))">
I'm trying to figure out a way to apply the same thing specifically for the admin and moderator usergroup, to the user title. Any help on this appreciated.
Reply With Quote
  #2  
Old 10-11-2008, 08:04 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<if condition="is_member_of($bbuserinfo, 2,6,7,35)">

for just admins and mods:

<if condition="is_member_of($bbuserinfo, 5, 6, 7)">
Reply With Quote
  #3  
Old 10-13-2008, 01:34 PM
dannykilla's Avatar
dannykilla dannykilla is offline
 
Join Date: Jun 2007
Location: Manchester, UK
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So where on the postbit template do you place the code

<if condition="is_member_of($bbuserinfo, 5, 6, 7)">

Dan
Reply With Quote
  #4  
Old 10-13-2008, 05:13 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dannykilla View Post
So where on the postbit template do you place the code

<if condition="is_member_of($bbuserinfo, 5, 6, 7)">

Dan
Around the item that you only want shown to users in usergroup 5, 6, or 7.
Reply With Quote
  #5  
Old 10-13-2008, 07:56 PM
dannykilla's Avatar
dannykilla dannykilla is offline
 
Join Date: Jun 2007
Location: Manchester, UK
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Like this?
<if condition="is_member_of($bbuserinfo, 5, 6, 7)"><div class="smallfont">$post[usertitle]</div></if>

if so it didn't work for me?
Reply With Quote
  #6  
Old 10-13-2008, 08:16 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is it you are trying to do? What you are trying to do will influence what variables to use. The condition that is written will only show certain information to a user if the *user looking at the thread* is a moderator/supermod/admin. If you only want to show it if the poster is a moderator/supermod/admin, then use $post in the condition.
Reply With Quote
  #7  
Old 10-13-2008, 08:23 PM
dannykilla's Avatar
dannykilla dannykilla is offline
 
Join Date: Jun 2007
Location: Manchester, UK
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Basically I want to have my user title have the colour like my username for example :

in my postbit I have at the min this:

Dannykilla
Guild Leader

I want it to show this:

Dannykilla
Guild Leader
Reply With Quote
  #8  
Old 10-13-2008, 10:43 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not quite that easy to do what you want. Your username actually gets processed through a function called fetch_musername to determine what is should be displayed as. You might be able to modify that function to do the same for the title (includes/functions.php). It might be easier to just modify the postbit to add the style directly. ie for red admins:
HTML Code:
<if condition="is_member_of($post, 6)"><div style="color:red;">$post[usertitle]</div></if>
Reply With Quote
  #9  
Old 10-13-2008, 10:47 PM
dannykilla's Avatar
dannykilla dannykilla is offline
 
Join Date: Jun 2007
Location: Manchester, UK
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne, but I have sorted it now I just copied the <span style .... >
into the User title box and that worked !!!!!
Reply With Quote
  #10  
Old 10-13-2008, 11:06 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, if you use that, then that would work also. (I don't use that so I'd have to do it a different way on my site.)
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 06:02 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.06266 seconds
  • Memory Usage 2,253KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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