XF 1.2 URL in conversations

snoopy5

Well-known member
Hi

I have an addon to send each newly registered user automatically a welcome pm over the conversation.

This is a predefined text in phrases for this addon. I try now to include there a clickable link within that conversation message, but do not succeed. How can I do this?

Code:
[url="{Url}"]{textforthelink}[/url]


like in

Code:
[url="{homeUrl}"]{homeUrl}[/url]

Thanks
 
Last edited:
Hi

I have an addon to send each newly registered user automatically a welcome pm over the conversation.

This is a predefined text in phrases for this addon. I try now to include there a clickable link within that conversation message, but do not succeed. How can I do this?

{textofthelink}

Thanks

Which add on is it? You may need to use html if you are editing the text within the phrase.

You might be better of asking in an add on support thread.
 
Hi I tried already html

<a href="myurl">textforthelink</a>

But that does not work neither. I do not think that it has something to do wih the addon. This must be general way in Xenforo to have clickable links appearing in phrases. With homurl etc. it does work, so I guess it has to be something similar then.

But I do not find the solution.
 
In a template it is done like so:
Code:
<a class="myClass" href="{xen:link route}">{xen:phrase my_phrase}</a>

Is that what you mean?
 
Remove the curly brackets for a hard coded standard URL.

The curly brackets are for xen:link URLs.

You should consider using xen:link though as it will automatically update based on the board URL.
 
Remove the curly brackets for a hard coded standard URL.

The curly brackets are for xen:link URLs.

You should consider using xen:link though as it will automatically update based on the board URL.


no, does not work neither
Code:
<a class="myClass" href="http://www.myurl">textforthelink</a>

How do I do it with " xen:link" ? Which part of the url do I put where?

Code:
<a class="myClass" href="{xen:link /urlpartafter_forum_directory/}">{xen:phrase textforthelink}</a>
 
Last edited:
...
You can't use HTML or xenforo template helper like xen:link and xen:phrase in phrases:)

o.k., but how exactly does this has to be written in the code then? There must be some kind of rule in the xenforo system which is independant of any kind of addon?

Can you post an example with first a full url like http://www.... and then show how you copy& paste it into the code, so that it works?

As you can see above I have a hard time to get the code snippets working. For example this code:

Code:
[url="{homeUrl}"]{homeUrl}[/url]

does work without any problems in the same phrase. I just do not know how to replace it with my own url and text for my url into it.
 
Last edited:
Back
Top Bottom