Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
How to replace terms in forums with other terms/hyperlinks
Avatar
mann
Member
Free Members
sp_UserOfflineSmall Offline
Apr 16, 2012 - 9:54 am

We have a product on my website which we don't offer anymore and that product has been replaced by a new product. Now the problem is that there are forum posts of the past mentioning that product and when new users browser through the forum they see those posts mentioning the product but they don't find the product anywhere on the website.

Is there any way I can replace the name of the product with the name of the new product instead of having to edit tens of posts.

Also I'd like to know is there any way to auto convert certain text in the forum into hyperlinks.

For example, in phbb, the admin can set certain terms in such a way that whenever the term is mentioned it gets converted into a hyperlink. For example, if anyone mentions say an ipod in the forum, that term gets automatically hyperlinked to the thread to which it has been set. Let me know if you guys understood the question.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 16, 2012 - 11:38 am

I can give you a quick and dirty way to do the first one but there is no automated method Can probably do it with sql queries but oddly I have never been asked to write an in-string replace before o have never investigated or tried it.

It is no to the second question as well although there are, I believe, some WP plugins that might do this for you. At least there have been on the past. The main problem is when they get intertwines with say, a link, as they can screw up the html but used with care might work.

andy-signature.png
YELLOW
SWORDFISH
Avatar
mann
Member
Free Members
sp_UserOfflineSmall Offline
Apr 16, 2012 - 11:51 am

Thanks Andy so how do I implement the first thing ? What do I need to execute in phpmyadmin ?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 16, 2012 - 2:29 pm

The quick and dirty way is to dump an export of the sfposts table into a text file. Edit it with a plain text editor. Perform a search and replace and then import it back into the database...

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626