Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-10-2009, 07:29 AM
Malceski09 Malceski09 is offline
 
Join Date: May 2008
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Links in Postbit based on Profile Fields.

Ill use an example.

With Battrick, each userr has themselves an assigned Team ID number (which is Part of the link to their Pavillion.

In the Postbit, i would like to be able to have it, so we can click the Team Name, and link (in another window) to their Pavillion.

Its somewhat like this.

h ttp://ww w.battrick.org/nl/office.asp?userID=4813 is the link to my Pavillion

4813 is my Team ID (FIELD 1)

St Arnaud CC is my Team Name. (FIELD 2)

Basically, id like it to be set up somewhat like this...
St Arnaud CC

which is
[U RL="http://www.battrick.org/nl/office.asp?userID=4813"]St Arnaud CC[/URL]

Which Therefore is
[U RL="http://www.battrick.org/nl/office.asp?userID=FIELD 1"]FIELD 2[/URL]

Now, my question, can it be done? If so, how?

Thanks
Reply With Quote
  #2  
Old 07-10-2009, 09:18 AM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That should do it. Trimmed down a mod of mine to do it.

2 plugins, 1 template. Template's cached. Only shows the link if the ID exists. All you have to do is to edit the template (Link In Postbit), change the field IDs to the correct ones, and that's it.

I made it a product and here's a link to it: https://vborg.vbsupport.ru/showthread.php?t=218293

Change the template to below for what you need (specifically a known URL + a profile field).
Code:
<if condition="$post['field1']">
	<a href="http://www.battrick.org/nl/office.asp?userID=$post[field1]">$post[field2]</a>
</if>
Reply With Quote
  #3  
Old 07-10-2009, 11:22 AM
Malceski09 Malceski09 is offline
 
Join Date: May 2008
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Perfect! Cheers

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

Ahh, one thing, What mod would i need to do, to make it open in new window?

is that just adding target="_blank" after the link?
Reply With Quote
  #4  
Old 07-10-2009, 05:46 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If I remember my HTML correctly, yes.
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 01:20 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.05717 seconds
  • Memory Usage 2,187KB
  • 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_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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