Making imgl and imgr actually useful

ruttrutt Registered Users Posts: 6,511 Major grins
edited October 8, 2005 in Dgrin Forum Support
I've done some research and figured out two very simple things which will make these new custom vb tags much more useful:
  1. How to put a little spacing around the images so the text doesn't bump right up against them.
  2. How to define a new tag to cause a break below the current image. If you've played with these, so you know how important this is.

VBulletin translates VB tags into html which is what your browser needs to see. I gave Chris a link to a page with somewhat oversimplistic translations for imgl and imgr and also I didn't give him a description of how to make imgbrk (something to cause a break below all the images.)

Here is the link I posted and which is what I think he implemented:

http://www.vbulletin.com/forum/showthread.php?t=56841

To get a little space around the posted left, right images is very simple.
The html is like:

[html]
<img style="width: 605px; height: 800px; float: left;" alt=""
src="http://rutt.smugmug.com/photos/36995191-L.jpg&quot; hspace="10"
vspace="10">
[/html]

Notice the vspace="10" and hspace="10". Really that's all you need to add to the simple translation already entered. That will cause a little space around the images. It's a pixel count, so obvously it's rough. But it's something.

To cause a break below current images, the html is:

[html]
<br clear="all">
[/html]

So we want for a post to be able to add this. There is a problem, though. This really isn't a tag in that it doesn't have a close. If we make it a tag, we'll have to both open and close the tag with at least a space inbetween.

I think the better thing is to make this a replacement variable. See:

http://www.vbulletin.com/docs/html/main/style_replacement_add

You should be able to make a variable called:

[html]
[imgbrk]
[/html]

Notice the brackets. It should be replaced with:

[html]
<br clear="all">
[/html]

If it doesn't let you name a replacement variable [imgbrk], you should be ale
to call it "img_brk", which I think is pretty unlikely to screw anyone.
If not now, when?

Comments

  • StevenVStevenV Registered Users Posts: 1,174 Major grins
    edited October 4, 2005
    rutt wrote:
    There is a problem, though. This really isn't a tag in that it doesn't have a close. If we make it a tag, we'll have to both open and close the tag with at least a space inbetween.
    (substituting squares for angles)



    is valid xhtml, or are you talking about the vb tag not having a close?
  • ruttrutt Registered Users Posts: 6,511 Major grins
    edited October 4, 2005
    StevenV wrote:
    (substituting squares for angles)



    is valid xhtml, or are you talking about the vb tag not having a close?

    Yes. According to the manual, VB tags have to have closes.
    If not now, when?
  • BaldyBaldy Registered Users, Super Moderators Posts: 2,853 moderator
    edited October 4, 2005
    I added 8px of hspace & vspace.
  • ruttrutt Registered Users Posts: 6,511 Major grins
    edited October 4, 2005
    Baldy wrote:
    I added 8px of hspace & vspace.

    Thank you. What about some form of break below image?
    If not now, when?
  • ruttrutt Registered Users Posts: 6,511 Major grins
    edited October 8, 2005
    bump
    If not now, when?
Sign In or Register to comment.