MyBB Community Forums

Full Version: [request] remove images from quotes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

i hope this is the right place to post this.

I run a photography forum and as you'd expect have a lot of image hotlinked in posts.

when someone quotes a post in their reply the images are quoted as well. this can result i large posts.

is there a way (an mod/plugin) to remove images from quotes and replace them with a text eg "image removed from quote, refer to OP to view images"

cheers........
Yeah I actually want to remove quotes within quotes entirely. So that whenever you quote a message...if that message has a quote it will not be included. imho it becomes rather ugly when you do this and it's really not neccessary.

A plugin for this would be great.
i had both options in phpbb which i have migrated from. but as i've deleted the board i can't remember what the changes were to give me a clue on where to start.
Just another suggestion for this plugin, instead of removing the whole image link, maybe we can do it by replacing the [*img]http://urimagelink.gif[/*img] with just the image link(with a URL to the image).

Quote:[Image: sad.gif]
becomes
Quote:http://community.mybboard.net/images/smilies/sad.gif
yea, cool. i only wish i had the first clue about writing one then i'd do it. Saves a hell of a lot of screen space.
Try this please:

in newreply.php, find:
$quoted_post['message'] = preg_replace("#\[attachment=([0-9]+?)\]#i", '', $quoted_post['message']);
Below it, add:
$quoted_post['message'] = preg_replace("#\[img\](\r\n?|\n?)(https?://([^<>\"']+?))\[/img\]#is", '**see original post for image **', $quoted_post['message']);
$quoted_post['message'] = preg_replace("#\[img=([0-9]{1,3})x([0-9]{1,3})\](\r\n?|\n?)(https?://([^<>\"']+?))\[/img\]#is", '**see original post for image **', $quoted_post['message']);

In xmlhttp.php, find:
$quoted_post['message'] = preg_replace("#\[attachment=([0-9]+?)\]#i", '', $quoted_post['message']);
Apply the same modification as above.
thanks dennis i'll try that when i can bite my fingers and let you know Wink

merry christmas