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 02-18-2010, 03:09 PM
Pro-eSports.com Pro-eSports.com is offline
 
Join Date: Jan 2010
Location: Germany
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 02-18-2010, 06:09 PM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 02-18-2010, 06:24 PM
Pro-eSports.com Pro-eSports.com is offline
 
Join Date: Jan 2010
Location: Germany
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mikey1991 View Post
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. If not you then who?!
Reply With Quote
  #4  
Old 02-18-2010, 07:02 PM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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}
Reply With Quote
  #5  
Old 02-18-2010, 07:57 PM
Pro-eSports.com Pro-eSports.com is offline
 
Join Date: Jan 2010
Location: Germany
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 />
Reply With Quote
  #6  
Old 02-18-2010, 09:06 PM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 02-18-2010, 09:12 PM
toonysnn toonysnn is offline
 
Join Date: Sep 2006
Location: Texas
Posts: 511
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<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...
Reply With Quote
  #8  
Old 02-18-2010, 11:44 PM
Pro-eSports.com Pro-eSports.com is offline
 
Join Date: Jan 2010
Location: Germany
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now it gives the following error message:

Quote:
invalid_tag_nesting
Reply With Quote
  #9  
Old 04-11-2010, 05:21 PM
Pro-eSports.com Pro-eSports.com is offline
 
Join Date: Jan 2010
Location: Germany
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bump!
Reply With Quote
  #10  
Old 06-04-2011, 04:34 PM
leftanalog leftanalog is offline
 
Join Date: May 2011
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know this thread is old... but has anyone gotten this to work?
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 09:47 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.05715 seconds
  • Memory Usage 2,252KB
  • Queries Executed 11 (?)
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
  • (3)bbcode_code
  • (2)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_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