The Arcive of vBulletin Modifications Site. |
|
IMG to URL BBCode Converter (In Quotes) Details »»
|
|||||||||||||||||||||||||||
|
IMG to URL BBCode Converter (In Quotes)
Developer Last Online: Mar 2012
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 :up: 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 Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Reserved, just in case I need to update something
|
|
#3
|
|||
|
|||
|
Subscibed first,installed later
thanks for the mod
|
|
#4
|
||||
|
||||
|
You don't really need a file modification to do this...It can be done via plugins.
|
|
#5
|
|||
|
|||
|
nice thanks.
|
|
#6
|
|||
|
|||
|
Glad it can be useful for others :up:
Well I do not know how to do plugins, if you wish to create one using the code above, feel free to do so and post it here. I did not write the code, it was written by masalaman, like I said in the first post. I just posted the code here so that other can use it since if you search for it you really have to do some digging until you find it on the forums. |
|
#7
|
||||
|
||||
|
thnx...would be really nice if it could be done via plugins (previously it was done by HeLLcat)
if [img] likes [Img] or [iMg] or [IMG] or [imG] will that work too? asking cos hellcat's plugin had that error ..tho later on it was fixed by him. waiting fr a plugings |
|
#8
|
|||
|
|||
|
Zai, Im not going to be releasing a Plugin Version, so if you're gonna be waiting for that, you should ask someone else to see if they are willing to make a plug in. I might do it in the future, but I'm too busy right now to learn how to do Plugins, so I wont be dong it anytime soon.
As far as the error on the [img], [Img], [iMg], [IMG], [imG] that is not a problem with this Modification. It converts it anyway. |
|
#9
|
|||
|
|||
|
Quote:
|
|
#10
|
||||
|
||||
|
|
![]() |
|
|