Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Clan Tag In Post Bit Details »»
Clan Tag In Post Bit
Version: 1.00, by iDHKHCM iDHKHCM is offline
Developer Last Online: Aug 2012 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.x.x Rating:
Released: 11-06-2011 Last Update: Never Installs: 15
Template Edits
Re-useable Code  
No support by the author.

this edit just adds a clan tag next to your username or wherever you decide to put it

first you will need to make a profile field

Go to AdminCP --> User Profile Fields --> Add New User Profile Field

for profile field type select Single-Line Text Box

Title= Clan Tag
Profile Field Category= (Uncategorized)
Max length of allowed user input= 4
Field Required= Yes, at registration and profile updating
Field Editable by User= Yes
Private Field= No
Field Searchable on Members List= Yes
Show on Members List= Yes

should look like this:




Now Go To postbit_legacy And Find:
HTML Code:
<vb:else />


{vb:raw post.musername}


right above it add: (Replace Red XX with the profile feild number)
Code:
<vb:if condition="$post['fieldXX']"> 
<font color="red" size="4"><B>{vb:rawphrase fieldXX}[{vb:raw post.fieldXX}]</B></font></vb:if>
after its done it will look like this

Screenshots

File Type: png pf.png (59.4 KB, 0 views)
File Type: png ct.png (3.8 KB, 0 views)

Show Your Support

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

Comments
  #12  
Old 07-20-2012, 04:51 AM
Dogma21cw Dogma21cw is offline
 
Join Date: Sep 2011
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

See below.
Reply With Quote
  #13  
Old 07-20-2012, 05:08 AM
Dogma21cw Dogma21cw is offline
 
Join Date: Sep 2011
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

YAY! I figgered it out. I had to create a custom phrase in the phrase mananger.

Went AdminCP>Phrase Manager.
Phrase type: GLOBAL, then add new phrase.
Product: vBulletin
Varname: oppdiv//this was the name of the team
Text: [TEAM1]
Translations: [TEAM1]

Then used the following code when editing the postbit template:
Code:
EDIT: See my next post
Works great, automatically assigns team tags & colors based on the usergroup.
Reply With Quote
  #14  
Old 07-20-2012, 06:08 AM
Dogma21cw Dogma21cw is offline
 
Join Date: Sep 2011
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I fixed it. Had to use $post instead of $bbuserinfo. $post made it look at the poster's usergroup, not the viewers.

Code:
<vb:if condition="is_member_of($post, 779)">
  <font color=#FF0000 size="2"><B><I>{vb:rawphrase oppdiv}</I></B></font></vb:if>
<vb:if condition="is_member_of($post, 780)">
  <font color=#FF0000 size="2"><B>{vb:rawphrase oppdiv}</B></font></vb:if>
<vb:if condition="is_member_of($post, 778)">
  <font color=#FF0000 size="2">{vb:rawphrase oppdiv}</font></vb:if>
That's for 1/2 of our tournament. oppdiv is the phrase I created for their team. 779 is the top ranks in BOLD & ITALICS. 780 is the mid ranks in BOLD. And 778 is the lowest with nothing special about it.

Thanks for your hard work in showing me the way, I hope this post of mine helps others.
Reply With Quote
  #15  
Old 07-20-2012, 08:08 AM
Dogma21cw Dogma21cw is offline
 
Join Date: Sep 2011
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, that all works for the postbit. But does anyone know where I'd do to add this to the user profile page, and the currently active users sections?
Reply With Quote
  #16  
Old 10-05-2012, 09:04 AM
MG Zebra MG Zebra is offline
 
Join Date: Sep 2012
Location: So-Cal
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How could I get text next to it so it would say Clan Tag: {[DM]} or something different than the question for the box.
Reply With Quote
  #17  
Old 03-07-2014, 02:04 AM
Checkmate MK8 Checkmate MK8 is offline
 
Join Date: Mar 2014
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I set this field to accept ALT characters? Currently, when a user enters an ALT character, it defaults to the numerical reference to the character.

In other words, what should be showing as ★ is showing as "&9733" in the profile field upon clicking "save".

Thanks,
CheckM8
Reply With Quote
  #18  
Old 03-07-2014, 03:29 AM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You done it like this
Code:
<vb:if condition="$post['field5']"> 
<font color="red" size="4"><B>{vb:rawphrase field5}[{vb:raw post.field5}]</B></font></vb:if>
5 being profile field number
Reply With Quote
  #19  
Old 03-07-2014, 03:31 AM
Checkmate MK8 Checkmate MK8 is offline
 
Join Date: Mar 2014
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes
Reply With Quote
  #20  
Old 03-07-2014, 03:39 AM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you post a ss of the template you edited
Reply With Quote
  #21  
Old 03-27-2014, 03:31 AM
Checkmate MK8 Checkmate MK8 is offline
 
Join Date: Mar 2014
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ForceHSS View Post
can you post a ss of the template you edited
Sorry for the delay, here you go @ForceHSS
Attached Images
File Type: png postbit_legacy_ss.png (92.9 KB, 0 views)
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 10:51 AM.


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.08506 seconds
  • Memory Usage 2,333KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete