Back to vBulletin 3.6 Add-ons

IMG to URL BBCode Converter (In Quotes)
Mod Version: 1.00, by Dannyloski

This modification is in the archives.
vB Version: 3.6.8 Rating: (2 votes - 5.00 average) Installs: 18
Released: 19 Aug 2007 Last Update: Never Downloads: 26
Not Supported  

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) . '";');
3) After this line add the following:
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
4) Repeat steps 2-3 for every place that the line on Step 2 appears in the class_bbcode.php file (Four Times)
5) Save & Overwrite the File to your Server ... That's it! Enjoy!

- Danny

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024