Post Text Replacements to Links

8 posts in this topic

Posted

Is it possible to have certain text or regular expressions to be converted to links? For example to make text which refers to products automatically translate to links to those products. Let's say grapes are a product I have -- any time the word grape appears in post text I want it to appear as a link with the anchor text of grapes that links to some page I have for grapes.

So... someone types grapes in a post and it appears as grapes automatically.

Share this post


Link to post
Share on other sites

Posted

You should be able to use the badword filter for this. Add "grapes" as a badword, and the HTML or bbcode as the replacement.

IPBSupport.de likes this

Share this post


Link to post
Share on other sites

Posted

I tried that before posting this question, but I can't seem to get that to work on my demo installation (which is about to expire). Even when I try to do a simple text replacement like "Tilt" to "blobby" it doesn't seem to be working, so I'm clearly missing a step. I've tried both the exact and loose match options.

Share this post


Link to post
Share on other sites

Posted

Note that you can set certain groups to bypass the bad word filter, and the admin group by default is set to bypass the bad word filters. Try changing the group options to turn this off, or log in as a regular member to post the word.

Share this post


Link to post
Share on other sites

Posted

Ok yes that was the problem, so I turned off the bypass and it looks like what the badwords thing does is do a physical replace at the time of posting instead of replacing the text in any existing posts (which makes sense because you can bypass the filter, but won't work so well for me since I have thousands of existing posts on my board). Thanks for your help on this one.

Share this post


Link to post
Share on other sites

Posted

[quote name='bfarber' timestamp='1343056473' post='2290101']
You should be able to use the badword filter for this. Add "grapes" as a badword, and the HTML or bbcode as the replacement.

Thanks for this idea/solution - but there are a huge problem: The badword filter also works (just fine) in topic titles... but... if you replace a "badword" with HTML or bbcode, the HTML/bbcode show in the topic title.

Do you have a solution for this? Maybe in 3.4? And if no: How can i made the changes from the badword filter undo? I used the "Recount & Rebuild" Tools and now have thousands of wrong topic titles and the backup from this day (last month) is no longer available (overwritten by a newer backup).

(i reportet this problem here)

Share this post


Link to post
Share on other sites

Posted

[quote name='IPBSupport.de' timestamp='1349284769' post='2316027']
Thanks for this idea/solution - but there are a huge problem: The badword filter also works (just fine) in topic titles... but... if you replace a "badword" with HTML or bbcode, the HTML/bbcode show in the topic title.

Do you have a solution for this? Maybe in 3.4? And if no: How can i made the changes from the badword filter undo? I used the "Recount & Rebuild" Tools and now have thousands of wrong topic titles and the backup from this day (last month) is no longer available (overwritten by a newer backup).

(i reportet this problem here)


Probably best to post in the support and/or feedback forums. :)

Share this post


Link to post
Share on other sites

Posted

Ok thx, i postet it here, maybe you can think about this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Who's Browsing   0 members

    No registered users viewing this page.