The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Modifying built in bb codes
The built in IMG bb code does not provide a means to specify the alt text string that goes with the image.
I can write an IMG bb code that works correctly to use the {option} variable to receive the alt text. It would work like: [img="Alternate text for the hovering cursor"]http://url_for_image.gif[/img]. Can I just create this bb code in custom bb codes and have it replace the built in bb code, or does that require some other hack somewhere? |
#2
|
||||
|
||||
If you create an custom IMG bbcode, as long as you set it to use the option variable it will do what is called "overloading". bbCode overloading means that you have two bbcodes with the same name, but one of them uses an option and the other doesn't. In this way, people can still use the bbCode without the option, or with it.
|
#3
|
||||
|
||||
Jake answered this quesion on vBulletin.com about the same time as you did here.
I put in the bb code, but there is still a bit of a problem. The parser stops when it sees the first space in the option string. Quotes of either kind, curly's,  , %20 and so forth do not help. I don't know if I want to fool with the parser, but the option token should be parsed to the closing square bracket, I believe. Jake suggested that I ask someone here to tell me how to fix the code in the parser. |
#4
|
||||
|
||||
You have it backwards. You should reverse it. Make the Option Code into the IMG URL and the text in the value section. This way it's just like the URL bbCode...
http://www.google.com The All Knowing Google [img=http://www.google.com/intl/en_ALL/images/logo.gif]Google's Logo[/img] Can you dig it? |
#5
|
||||
|
||||
You are right that the change would work. However, it would then be very different from the native IMG code. Maybe that doesn't really matter.
I was thinking of it as a modification of the existing code. I could just make up a new name entirely and avoid any confusion. |
#6
|
||||
|
||||
Quote:
If you really wanted to modify the way the IMG bbCode is handled, you can try using a plugin... But it would be overly complicated and unnecessary. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|