Hi all! I am looking for a way users can add a link to their postbit. I know this is done by creating a profile field and using a conditional in the postbit template, but how would I make that link click-able like AA does it here? Cheers, Tex
Well I ended up answering my own question. Sometimes it helps to just get up and walk away from it for a while. For anyone who finds this thread looking for the answer you can use the following conditional in your postbit template: HTML: <if condition="$post['field8']"><div><a href="http://$post[field8]"><b>$post[field9]</b></a></div></if> *Note: you need to create 2 single line profile fields. One they should enter the URL without http:// and the second field they should enter the site name. Make sure you change the field numbers in the conditional above to your profile field numbers.
Thanks Nick! Actually for my site I ultimately wanted my users to be able to post a link to their addon page from a specific addon site. I just changed the conditional a bit and used only one profile field for them to enter their username from the addon site. HTML: <if condition="$post['field8']"><div><a href="http://orbithangar.com/searchauth.php?search=$post[field8]"><b>$post[field8]'s Addons</b></a></div></if>
Here, use this one. It has better checking to see if they've actually filled out both fields. HTML: <if condition="$post['field8']"> <div> <a href="http://$post[field8]"><b><if condition="$post['field9']">$post[field9]<else />$post[field8]</if></b></a> </div> </if> If the user hasn't filled out the Website Name field, but has filled out the URL field, then it will simply display the URL. Else it'll display the name.
Search for something similar to: HTML: <div>$post[posts]</div> That general area is where you should add it.