[HBD] Simple CSS Only Image Resize

Hoxxy

New Member
[HBD] Simple CSS Only Image Resize

This simple mod resizes images wrapped in [img ] [/img ] tags and resizes to full size on mouseover...
Note:
Editing a main .php file is needed to use this mod so only use if you feel comfortable doing so.

Open includes/class_bbcode.php find:
PHP:
 return '<img src="' .  $link . '" border="0" alt="" />';

Replace with:
PHP:
return '<img class="hbd_resize" src="' .  $link . '" border="0" alt="" />';

Open your styles manager
Admincp >> Styles & Templates >> Style Manager >> "Your style"

in the "Additional css box add:
Code:
/*  HBD IMG RESIZE  */
.hbd_resize
{
[COLOR="red"]width:40%;
height:40%;[/COLOR]
}

.hbd_resize:hover
{
width:100%;
height:100%;
}
Change highlighted css to your desired needs.

Known bugs/flaws:
  • If img is LARGER then postbit/_legacy when img is resized fully it leaks.
  • When img is resized fully and then resized back postbit/_legacy stays the same size (see 1st bug/flaw)
Don't ask for any screenshots as if you can't tell from the title what this does you don't need this mod in fact you shouldn't even be using vBulletin...lmao :)

Bug free alternative:
http://www.vbteam.info/vb-3-8-x-add.../22289-hbd-image-resize-opens-new-window.html
 
Top