Quote from: xwisdom at Jun 27, 2006, 01:58 PM
Create a plugin and listen to the OnWebPagePrerender. When this event is called you can replace the <script type="text/javascript>var MODX_MEDIA_PATH = "media";</script> found inside $modx->documentOutput.
for example:
$js = '<script type="text/javascript>var MODX_MEDIA_PATH = "media";</script>';
$modx->documentOutput = str_replace($js,'',&$modx->documentOutput);
I don’t bother about these strange JS-vars (getting used to it from the front-end editing-features
)
But this interception of documentOutput comes in handy!
Taking this way I could implement an extremely simplified version of Autolink, without the need for an extra db-table, but plain old chunks, loaded into arrays. Thanks for that, xwisdom!
@ZAP: just use a multi-file search-tool and let it crawl thru your modx-directory. Would not be too hard to get rid of these vars from their source.