vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Clan Tag Mod (https://vborg.vbsupport.ru/showthread.php?t=236226)

Pro-eSports.com 02-18-2010 03:09 PM

Clan Tag Mod
 
There was a clan tag mod for vB3.x.x where users could enter a clan tag in their profile and this clan tag was then added in red color before their username.

Like:

[vB] Mister X

Can someone link me to this mod?
Is this mod compatible to vB4.x.x?

If not then it would be great if someone could develop such a mod for vB4.

Thanks. :)

mikey1991 02-18-2010 06:09 PM

Well for vB3 it would've been; make a clan tag profile field, and then edit your postbit template and before $post[musername] add <if condition="$post['fieldx']">$post[fieldx]</if>

I'm sure it's easy to translate that to vb4, I just can't remember the syntax anymore, lol

Pro-eSports.com 02-18-2010 06:24 PM

Quote:

Originally Posted by mikey1991 (Post 1985791)
Well for vB3 it would've been; make a clan tag profile field, and then edit your postbit template and before $post[musername] add <if condition="$post['fieldx']">$post[fieldx]</if>

I'm sure it's easy to translate that to vb4, I just can't remember the syntax anymore, lol

It would be awesome if you could find out. You're a coder mate. :D If not you then who?! ;)

mikey1991 02-18-2010 07:02 PM

Well, I think it would be something like this:

<vb:if condition="$post['fieldx']">{vb:raw post.fieldx}</vb:if>{vb:raw post.username}

So go to your ACP > User Profile Field Manager > Add New User Profile Field > Profile Field Type > Single Line Text Box > Fill out all the boxes, then note the FIELDID .. Ie, it will say something liek "field7" - then go to your ACP > Styles & Templates > Style Manager > YourStyle > Edit Templates > Postbit Templates > Postbit and find {vb:raw post.username} and add before it; <vb:if condition="$post['fieldx']">{vb:raw post.fieldx}</vb:if> - where the red x is changed to your fieldid..

This isn't tried or tested, but should work.

Of course, if you want the clan tag to be RED and inside ['s, change the code accordingly, IE;

<vb:if condition="$post['fieldx']"><span style="color:red;">[{vb:raw post.fieldx}]</span></vb:if>{vb:raw post.username}

Pro-eSports.com 02-18-2010 07:57 PM

I'll try it out now and post back with the results. Thanks for the help so far.

--------------- Added [DATE]1266531421[/DATE] at [TIME]1266531421[/TIME] ---------------

It gives me the following error when saving:

Code:

Parse error: syntax error, unexpected T_STRING in /.../pro-esports.com/forums/includes/adminfunctions_template.php(4667) : eval()'d code on line 53
I put the entire code into a text file and opened it with Notepad to see what's in line 53.

Line 53:

Code:

<span class="postbit_reputation" id="repdisplay_{vb:raw post.postid}_{vb:raw post.userid}">{vb:raw post.reputationdisplay}</span>
Just to make sure I haven't done anything wrong. Here is the code bit with the code you told me to add. It has a few more lines from the original postbit file so don't wonder.

Code:

<vb:if condition="$post.avatarurl">
                                                        <img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, <vb:if condition="$post['field16']"><span style="color:red;">[{vb:raw post.field16}]</span></vb:if> {vb:raw post.username}}" />
                                                <vb:else />


mikey1991 02-18-2010 09:06 PM

Sorry that didn't work, like I originally said, this wasn't tried nor tested. I only have a vB4 localhost, and am not using it live, so I don't know what the error could be there, maybe someone else can reply with an answer.

toonysnn 02-18-2010 09:12 PM

<vb:if condition="$post['userid'] > 0">
<img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, <vb:if condition="$post['field16']"><span style="color:red;">[{vb:raw post.field16}] </span></vb:if>{vb:raw post.username}}" />
</vb:if>

That should work fine .. I can't test it at the moment, but it should work without issue.

I haven't read entirely what you want to accomplish, but going off of Mikey's comments and what I see slightly in the first post...

Pro-eSports.com 02-18-2010 11:44 PM

Now it gives the following error message:

Quote:

invalid_tag_nesting

Pro-eSports.com 04-11-2010 05:21 PM

Bump!

leftanalog 06-04-2011 04:34 PM

I know this thread is old... but has anyone gotten this to work?


All times are GMT. The time now is 04:08 AM.

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.01114 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete