[7.5.1] Remove image tags in quotes - 03/21/2009 9:25 PM
This mod replaces any image tags in a quote and replaces them with url tags.
open /scripts/quickquote.inc.php
Find:
Add after:
open /scripts/newreply.inc.php
Find:
add after:
That's it.
I also have a line that replaces youtube with a link.
that you could implement that also for other video's you might embed. Above works for [youtube]url or id[/youtube].
open /scripts/quickquote.inc.php
Find:
Code
} // end if
Add after:
Code
$post_body = preg_replace('%\[(img|img:left|img:right|img:center|image|image:left|image:center|image:right)\]%i', '', $post_body);
$post_body = preg_replace('%\[(/img|/image)\]%i', '', $post_body);
open /scripts/newreply.inc.php
Find:
Code
if ($q == 1) {
add after:
Code
$RawBody = preg_replace('%\[(img|img:left|img:right|img:center|image|image:left|image:center|image:right)\]%i', '', $RawBody);
$RawBody = preg_replace('%\[(/img|/image)\]%i', '', $RawBody);
That's it.
I also have a line that replaces youtube with a link.
Code
$post_body = preg_replace('%\[youtube\](|.*v=)([-\w]{8,12})(|&.*)\[/youtube\]%i', 'http://www.youtube.com/watch?v=\\2', $post_body);
that you could implement that also for other video's you might embed. Above works for [youtube]url or id[/youtube].