PDA

View Full Version : Does text-string replacement exist?


SCRIPT3R
09-02-2007, 05:34 PM
for the life of me i thought this was already created, but cannot find anything close right now.. looking for something that will replace any pre-defined text-string with something else - for posts. if it's not yet available, perhaps i could whip something together or someone else could. i would simply just base it off vB's censor control.

edited to clarify.

nexialys
09-02-2007, 05:40 PM
AdminCP >> Styles & Templates >> Replacement Variable Manager

???

this one is style related, but i suppose it's working as it is supposed to...

SCRIPT3R
09-02-2007, 05:46 PM
yes, but i'm looking for something that generates the replacement on the fly during page generation.

Marco van Herwaarden
09-03-2007, 08:10 AM
It does.

SCRIPT3R
09-03-2007, 08:03 PM
It does.
only for templates, NOT for posts which is what i'm referring to; i edited my first post to clarify.

Marco van Herwaarden
09-05-2007, 12:38 PM
It will also replace inside posts.

nexialys
09-05-2007, 01:46 PM
the text-replacement engine is replacing ANY text string contained in the "OUTPUT" ... not only the templates...

it is located in the Style manager system to provide a different filtering for each styles - because you can provide different filtering depending on your forums... (word X is filtered in style X, but not in style Y...)

goddess_dix
09-05-2007, 02:17 PM
you can also do this with vbseo, if you use that...

SCRIPT3R
09-05-2007, 03:51 PM
this is what it WON'T do on my forums...

original text string is..

http://www.someplace.com

replacement text string is...

http://www.anotherplace.com

nothing is changed though, even after rebuilding all threads/posts/forums... am i doing something wrong?

Marco van Herwaarden
09-05-2007, 03:53 PM
What is the exact (copy & paste inside a code block) replacement you have defined?

Edit: just tested it with:
Search for Text: http://www.someplace.com
Replace with Text: http://www.anotherplace.com
Made a post with http://www.someplace.com and it was nicely replaced.

PS I would not include "http://" or even "www.". Without you would cath more.

SCRIPT3R
09-05-2007, 04:21 PM
the following examples do not work... and thus any text string within their hyperlink will not work.
Search for Text: http://www.test.com/?ref=111&s=111
Replace with Text: http://www.test.com/?ref=222&s=222


Search for Text: test.com/?ref=111&s=111
Replace with Text: test.com/?ref=222&s=222

Marco van Herwaarden
09-05-2007, 04:29 PM
Tried the first one on my unmodified (3.6.7) testboard and it worked fine.

Marco van Herwaarden
09-05-2007, 04:41 PM
Never mind, had an old replacement for "test".

Your problem is that you are not searching for the correct text. You will need to search for the text as it is in the output (tip: use view source).

Change your search text to:
http://www.test.com/?ref=111&s=111

SCRIPT3R
09-05-2007, 05:15 PM
Never mind, had an old replacement for "test".

Your problem is that you are not searching for the correct text. You will need to search for the text as it is in the output (tip: use view source).

Change your search text to:
http://www.test.com/?ref=111&s=111

that solves that problem, thnx.