Reply
Thread Tools
Posts: 99 | Thanked: 63 times | Joined on Jul 2008
#1
This question relates to vBulletin boards, like this one. The reason I'm asking here is because in order to get help with vBulletin, you have to be the purchaser of the product, and I'm just a member, so I can't actually post this question to the vBulletin help boards -- I tried to.

My question: Is there any way to get [CODE] tags to work when surrounding [IMG] tags?

When I type [CODE] tags around [IMG] tags around a URL to a pic, like this:


What I get is the picture from that URL inside a code box, like this:
Code:
But what I want is the code of the IMG tags as well as the address inside the Code box, like this:


I've tried everything I can think of, including checking my cp settings and unchecking the box "automatically parse links in text" which is what I thought would do the trick but doesn't. The only thing that works is purposely breaking the [IMG] tag like this: [.IMG] (as seen in the last pic).

Thanks for your help.

Joe.

Last edited by Justjoe; 2009-08-12 at 18:45.
 
timsamoff's Avatar
Posts: 1,605 | Thanked: 1,601 times | Joined on Mar 2007 @ Southern California
#2
Sorry, I don't think it's possible unless a vB admin adds a tag to disable BB Code within other BB Code. E.g.,

Code:
[nocode][img]{link to image}[/img][/nocode]
Of course, if you don't need the actual link to the image, you can always just do it that ^ way:

Code:
[img]{link to image}[/img]
~or~

Code:
[img]{http://www.sitv.com/files/premium-uploads/sitv_latino%20sports_david%20hasselhoff522.jpg}[/img]
Tim
__________________
http://samoff.com
 
Posts: 99 | Thanked: 63 times | Joined on Jul 2008
#3
Thanks Tim. I was coming to the conclusion that it wasn't possible, and your verification saves me from entering my third hour on this problem.

Thanks again, really.

Joe.
 
Posts: 5,335 | Thanked: 8,187 times | Joined on Mar 2007 @ Pennsylvania, USA
#4
Originally Posted by Justjoe View Post
My question: Is there any way to get [CODE] tags to work when surrounding [IMG] tags?
Have you tried using the character entities "& #91;" (left square bracket) and "& #93;" (right square bracket) for the opening and closing IMG tags? (Remove the spaces from between the "&" and "#". I'm having my own problem with displaying code without interpretation.) It seems to work so long as you post immediately. If you re-edit the post though, vBulletin "helps" by converting the character entities to square brackets.

Code:
[IMG]http://www.blah.tld/image.png[/IMG]
__________________
maemo.org profile

Last edited by sjgadsby; 2009-08-12 at 18:47.
 
Posts: 99 | Thanked: 63 times | Joined on Jul 2008
#5
Thanks sjgadsby, that's perfect, I'll just make sure I won't need to edit the post later.

The subject of this thread is inaccurate: any chance it's possible for a mod to change it to "Getting [CODE] tags to work around [IMG] tags?"

Thanks again, guys.

Joe.
 
timsamoff's Avatar
Posts: 1,605 | Thanked: 1,601 times | Joined on Mar 2007 @ Southern California
#6
Originally Posted by sjgadsby View Post
Have you tried using the character entities "& #91;" (left square bracket) and "& #93;" (right square bracket) for the opening and closing IMG tags? (Remove the spaces from between the "&" and "#". I'm having my own problem with displaying code without interpretation.) It seems to work so long as you post immediately. If you re-edit the post though, vBulletin "helps" by converting the character entities to square brackets.

Code:
Ah ha!

Tim
__________________
http://samoff.com
 
Reply

Tags
vbulletin tag, [code] tag

Thread Tools

 
Forum Jump


All times are GMT. The time now is 08:09.