The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
how to insert image before [img] bb code
I have a need to insert a image before images inserted via bbcode. It will sort of serve as a header before the images are viewed.
For example it could be a image, that says this image is resized. (that is not exactly my plan, but a good example) How or where can I insert this call to pull the image in, only when a [img] bb code is used? |
#2
|
||||
|
||||
Have you tried looking at the class_bbcode.php file and at the function for the image bbcode?
|
#3
|
||||
|
||||
Good suggestion.
That is abit out of my reach, but I am willing to try for it. do I append my image to this area? I tried a few things but failed. Code:
// do [img]xxx[/img] $bbcode = preg_replace('#\[img\]\s*(https?://([^*\r\n]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_img_match('\\1')", $bbcode); |
#4
|
||||
|
||||
I don't know exactly where to do it since I really don't understand exactly what you are trying to do. I'm just suggesting that that may be the function you want to try to modify to do what you want.
|
#5
|
||||
|
||||
maybe a graphic will help convey my thoughts better.
|
#6
|
||||
|
||||
OK, well you can try to add it around where that code it. After they do the preg_replace, I suppose you can just append your code to the front of it.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|