-
☆ A M B ☆
- 24,524 Posts
Use a plugin on the system event OnWebPagePrerender and do a preg_replace on the $modx->documentOutput to replace anything between [[]]
$pattern = ’/[[(.*)]]/Usi’;
$modx->documentOutput = preg_replace($pattern,’’,$modx->documentOutput);
If you wanted to remove the [[]] as well then a simple str_replace would do it
$patterns = array(’[[’,’]]’);
$modx->documentOutput = str_replace($patterns,’’,$modx->documentOutput);
:)
Had to do it non-MODx since other sites would be using this, so right now it’s just using a display:none div. Although I should get somewhat of a speed boost using preg_replace.
What’s the Usi part for, therebechips?
-
☆ A M B ☆
- 2,213 Posts
Just a quick note the iPod/iPhone works fine with youtube feeds... Large images can take a bit to download, but why not just do thumbnails and then a lightbox for bigger?