![]() |
Need to replace a word in posts but not in titles
I just tried to use a replacement, but it replaces the word in thread titles as well.
Basically, I am trying to replace all instances of a word in a post with a link that I specify. Regular expressions make my eyes cross so I am going to need a wee bit of assistance on getting this one going please. Amy |
If you want to do all past posts, you can use REPLACE in an UPDATE query. If you mean all future posts...no idea. You'd need a new hack.
|
you'd probably have to edit functions.php for the postbit part(unless you want it permanent, then just do a query), newreply.php, and newthread.php, not sure what you'd have to do right off hand though
|
I am wondering if javascript would do it or something similar? You know those ad banners that change words on pages to links? Anybody know if such a thing exists in javascript?
|
Javascript is virtually never the answer to any problem ;)
|
I got it. I added a function in functions.php that does a string replace on the post before it is parsed for vbcode, etc. It works like a charm and this should help my affiliate programs do a bit better.
Amy |
I wish I had seen this message earlier. I just got through doing the very same thing a few days ago. Easy, wasn't it? ;)
|
All times are GMT. The time now is 07:59 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|