View Full Version : remove [img] tag with a quote
floleb7
02-08-2002, 10:31 AM
if someone post an image and someone quote this post the [img] tag will be automatically remove and juste the url will stay.
Does someone have this or knows how to do this ?
Admin
02-08-2002, 06:09 PM
Not really tested, but give it a try.
In newreply.php, add right after:
$pagetext = preg_replace("/(\[quote])(.*)(\[\/quote])/si", "", $pagetext);
this:
$pagetext = preg_replace("#(\)(.*)(\[\/img\])#si", "[u[i]rl]\\2[/url]", $pagetext);
floleb7
02-08-2002, 07:57 PM
it works however if it's not a quote from previous message the img tag will be replace by url
Admin
02-09-2002, 08:07 AM
Huh? Can you give me an example please?
floleb7
02-09-2002, 10:29 AM
example :
in my post i put this : http://www.football365.fr/mediastore/foot/photos_articles/divers/DIVERS_JO_SPOREVER.jpg
if someone quote my post he will have
http://www.football365.fr/mediastore/foot/photos_articles/divers/DIVERS_JO_SPOREVER.jpg
without [img] quote (with this you don't have the image in other post for nothing)
but if he wants to add an image with [img] it will not replace the [img] tag only for post quote
Admin
02-09-2002, 10:33 AM
Sorry but I still don't understand... (help?)
You mean that if the user is adding an image in his own post, it will remain an image and won't be turned into a link?
floleb7
02-09-2002, 11:09 AM
i add an image to my post
if someone use quote and not reply my image will become a link.
But wit your modification if someone put an image (another than mine) he will have a link and nothing else
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.