vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Does text-string replacement exist? (https://vborg.vbsupport.ru/showthread.php?t=156870)

SCRIPT3R 09-02-2007 04:34 PM

Does text-string replacement exist?
 
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 04: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 04: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 07:10 AM

It does.

SCRIPT3R 09-03-2007 07:03 PM

Quote:

Originally Posted by Marco van Herwaarden (Post 1331258)
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 11:38 AM

It will also replace inside posts.

nexialys 09-05-2007 12: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 01:17 PM

you can also do this with vbseo, if you use that...

SCRIPT3R 09-05-2007 02: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 02:53 PM

What is the exact (copy & paste inside a code block) replacement you have defined?

Edit: just tested it with:
Code:

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 03:21 PM

the following examples do not work... and thus any text string within their hyperlink will not work.
Code:

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

Code:

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


Marco van Herwaarden 09-05-2007 03:29 PM

Tried the first one on my unmodified (3.6.7) testboard and it worked fine.

Marco van Herwaarden 09-05-2007 03: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:
Code:

http://www.test.com/?ref=111&s=111

SCRIPT3R 09-05-2007 04:15 PM

Quote:

Originally Posted by Marco van Herwaarden (Post 1332997)
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:
Code:

http://www.test.com/?ref=111&s=111

that solves that problem, thnx.


All times are GMT. The time now is 02:25 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
  • Page Generation 0.01874 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete