vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - Clan Tag In Post Bit (https://vborg.vbsupport.ru/showthread.php?t=273551)

Dogma21cw 07-20-2012 04:51 AM

See below.

Dogma21cw 07-20-2012 05:08 AM

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.

Dogma21cw 07-20-2012 06:08 AM

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.

Dogma21cw 07-20-2012 08:08 AM

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?

MG Zebra 10-05-2012 09:04 AM

How could I get text next to it so it would say Clan Tag: {[DM]} or something different than the question for the box.

Checkmate MK8 03-07-2014 02:04 AM

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

ForceHSS 03-07-2014 03:29 AM

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

Checkmate MK8 03-07-2014 03:31 AM

Yes

ForceHSS 03-07-2014 03:39 AM

can you post a ss of the template you edited

Checkmate MK8 03-27-2014 03:31 AM

1 Attachment(s)
Quote:

Originally Posted by ForceHSS (Post 2485612)
can you post a ss of the template you edited

Sorry for the delay, here you go @ForceHSS


All times are GMT. The time now is 02:44 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01094 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete