PDA

View Full Version : Links in Postbit based on Profile Fields.


Malceski09
07-10-2009, 07:29 AM
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 (http://www.battrick.org/nl/office.asp?userID=4813)

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).
<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 1247228718 at 1247228718 ---------------

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.