vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Links in Postbit based on Profile Fields. (https://vborg.vbsupport.ru/showthread.php?t=218286)

Malceski09 07-10-2009 07:29 AM

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

Wired1 07-10-2009 09:18 AM

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>


Malceski09 07-10-2009 11:22 AM

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?

Wired1 07-10-2009 05:46 PM

If I remember my HTML correctly, yes.


All times are GMT. The time now is 01:10 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.01207 seconds
  • Memory Usage 1,718KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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