![]() |
Text Replace - HowTo?
Hi,
I would like to be able to have the forum automatically change a word in a post to something else when posted.. For example, somebody types the post: Hello, everyone go to yahoo. And have it changed to: Hello, everyone go to http://www.Yahoo.com. How can I do this? Thanks a lot! |
Quote:
|
nope, not with smilies, but with the replacement vars :)
|
Quote:
Can it be done in the showthread only and not on the forumhome? Thanks |
hmm, well, then you have to hack the bbcodeparse function a little bit:
open functions_bbcodeparse.php find: PHP Code:
PHP Code:
|
I thought that replacement variables do not act on post content. Maybe that was in the same dream, sorry :)
|
Quote:
|
Quote:
return str_replace('yahoo', '<a href="http://www.yahoo.com">yahoo</a>',return str_replace('google', '<a href="http://www.google.com">google</a>', parse_bbcode2($bbcode, $dohtml, $dobbimagecode, $dosmilies, $dobbcode, $iswysiwyg, $donl2br))); ??? |
@Ahmad: nah, it weas jsut in vb2 some of the replacementvars (those which started with an {) were not parsed inside posts, but all others have been all the time ;)
@ryan: you should then use array replacement: PHP Code:
|
All times are GMT. The time now is 07:42 AM. |
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:
|