Skip to main content
Topic: Auto Hyperlink (Read 2676 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Auto Hyperlink

Hello Devs,

Is it possible that all posts created whether its new or old can have automatic hyperlink on it when the user post it?
Example. if create a new topic or reply to the topic and I type in "elkarte" somwhere in the editor, that word will get hyperlinked to a pre-defined URL that is set in the admin area once I post it.

thanks in advance once again.

Re: Auto Hyperlink

Reply #1

yep, should be possible with the "censored words" feature..

Admin - Forum - Posts and Topics - censored words.
Thorsten "TE" Eurich
------------------------

Re: Auto Hyperlink

Reply #2

I don't think so, @TE - Therefor ElkArte must use a prefix and suffix with the censor function.

ElkArte has to make an URL BBC out of a single word. From:

Code: [Select]
ElkArte

to:

Code: [Select]
[url=http://elkarte.net]ElkArte[/url]

So [url=http://elkarte.net] must be set before and [/url] has to be set after the word.

Re: Auto Hyperlink

Reply #3

@TE @Jorin it works! thanks very much!

Re: Auto Hyperlink

Reply #4

Really? What exactly did you use?

Re: Auto Hyperlink

Reply #5

@Jorin  I used your same example above. I tested it and it worked! ;-)

Re: Auto Hyperlink

Reply #6

Oh. Ehm. Oh. Gotta go!  :-[

Re: Auto Hyperlink

Reply #7

@Jorin thought you might be interested to know that your solution above works but I found out later that it also affected the title.
@emanuele I hope you could chime in to advice us if there is a way to limit the sensored word to exclude the title?
currently, when I want to censor the word "elkarte" for example to say
Code: [Select]
[url=http://elkarte.net]ElkArte[/url]
it works on new posts and replies. but it also affected the title and its not properly parsed. So while its ok in the body, the title is showing the code snippet.
Can we put an if statement somewhere to only affect the body and not the title?

Re: Auto Hyperlink

Reply #8

I didn't remember you could insert text before and after. Great it works!


Re: Auto Hyperlink

Reply #10

thanks @emanuele  this is exactly what I need!