IMG to URL BBCode Converter (In Quotes)
This modification is in the archives.
Hey Guys,
I know I was searching for a feature like this for the longest time and had no luck. Well I decided to do some digging and after a while I was able to find the code that you can use to remove the [IMG] Tag from Quotes in Posts under vB 3.6.0 and up. This specific Modification will change all [IMG] Tags into [URL] Tags when they are inside a Quote. I guess that's pretty self explanatory. Special thanks to masalaman for the code, I'm just posting it here for others to use it as they may be searching for it and it took me a while to find it. I guess this will just make you life's easier ![]() Modification Instructions: 1) Open includes/class_bbcode.php 2) Find the following line: Code:
eval('$html = "' . fetch_template($template) . '";'); Code:
// Start IMG to URL BBCode Converter if ($this->contains_bbcode_img_tags($html)) { $html = preg_replace('#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')", $html); } // End IMG to URL BBCode Converter 5) Save & Overwrite the File to your Server ... That's it! Enjoy! - Danny Download No files for download. |