View Full Version : BBCode Image
patt1293
12-20-2010, 03:47 AM
Basically what i want to do is have a bbcode setup and have an image set in the editor.
When a user clicks on it...
it will insert
[image] in the post editer box...
then in the final post it will have the physical image displayed that is assigned to that bbcode.
Any suggestions?
I'm not sure I follow - is [image] just an example (that is, would the tag always be [image], or would it be some other word)?
It kind of sounds like you're describing smilies.
patt1293
12-20-2010, 04:37 AM
that is an example.. [info] would display an image that had information on the image. etc etc.
OK. Could you just define a custom bbcode and make the replacement value be the html for the image? The code inserted would be like but otherwise I think it would do what you're describing.
patt1293
12-20-2010, 04:47 AM
i have had that setup before just fine
but people would want to put something in the middle and it would break.
i was wondering if i could eliminate the second half of the bbcode
patt1293
12-21-2010, 09:13 PM
anyone?
I wasn't going to respond again because I don't have a good answer, but since you started the second thread...
If you define your bbcode replacement as <img src="something" />{param} then if someone puts something in the middle it should just put the image first (but maybe you already tried that).
If you really wanted single tags you would have to modify the javascript to get a button to insert a single tag, then you would also have to add a plugin to process the tag.
Or you could somehow use the smilies since I think they do exactly what you want (except I don't know what would happen to the smilies menus if you used large images).
BirdOPrey5
12-23-2010, 01:25 AM
i have had that setup before just fine
but people would want to put something in the middle and it would break.
i was wondering if i could eliminate the second half of the bbcode
If you don't put {param} in the BB Code replacement then whatever is put between the tags (test) will just be ignored- it shouldn't break anything.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.