View Full Version : Removal of IMG tag upon quoting
68 Z-28
07-15-2004, 05:19 PM
I think i've seen this on some vb 2.x.x boards, but forget. Anywho, what I'd like is that when someone quotes a post that has images, it removes the IMG tags and just puts up a link instead. This way if people quote a post 5 times you won't have to keep scrolling through the image, it'll just be a link in the quote.
Xenon
07-15-2004, 05:49 PM
try that one:
open newreply.php
find:
eval('$newpost[\'message\'] = "' . fetch_template('newpost_quote', 1, 0) . '";');
and BEFORE add:
$newpost['message'] = preg_replace('/(\[img])(.*)(\[\/img])/siU', '\1', $newpost['message']);
i think that should work :)
68 Z-28
07-16-2004, 02:44 AM
OK, just tested again... It removes the IMG completely if I'm quoting a quote. I'd like this to change the IMG to a URL from the original post.
Edit: I brainfarted for a second... of course the IMG will be removed from the second quote..... so in short that code didn't work...
Thank you for helping me with this.
Xenon
07-16-2004, 12:51 PM
well, removing nested quotes is vb's standard behaviour.
you have to remove the strip_quotes part to allow that.
68 Z-28
07-16-2004, 05:18 PM
YEah, I wsa kinda confusing myself yesterday so my apologies for confusing you as well. The code that you provided didn't work.... Instead of replacing the code how would I get it to just drop the IMG tags and keep the link? I realize that the board is set to autoparse URL's so, I think it will do this by default if there is no IMG tag around it.
68 Z-28
07-19-2004, 10:26 PM
Any other suggestions?
68 Z-28
07-29-2004, 02:00 AM
Any other ideas?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.