UBB.Dev
Posted By: blaaskaak [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:

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].
Posted By: Gizmo Re: [7.5.1] Remove image tags in quotes - 03/22/2009 2:55 AM
I like it, heres a vote to make it in the next build :x...
Posted By: AKD96 Re: [7.5.1] Remove image tags in quotes - 03/22/2009 4:50 AM
Oooo... good idea! [Linked Image]
Posted By: AllenAyres Re: [7.5.1] Remove image tags in quotes - 03/24/2009 8:10 PM
Thanks Yarp™!
© UBB.Developers