View Full Version : <IMAGE_HEIGHT2>
Hi all, i just wanted to hear if somebody could help me, what i want to do is create a new tag that for instance is called <IMAGE_HEIGHT2>, this tag will contain the original height minus 30 px..
so if <IMAGE_HEIGHT> is 400px
<IMAGE_HEIGHT2> will be 370px
would it be possible to make a quick addon that would allow this new tag?
MUAHAHAA i figured it out.. if anybody wants to use this for whatever reason its quite simple this is how i did:
at this place in index.php
$image_width = $image_extra['0'];
$image_height = $image_extra['1'];
$tpl = str_replace("<IMAGE_WIDTH>",$image_width,$tpl);
$tpl = str_replace("<IMAGE_HEIGHT>",$image_height,$tpl);
i just added $image_height2 and the replace tag.
$image_width = $image_extra['0'];
$image_height = $image_extra['1'];
$image_height2 = $image_height - 30;
$tpl = str_replace("<IMAGE_WIDTH>",$image_width,$tpl);
$tpl = str_replace("<IMAGE_HEIGHT>",$image_height,$tpl);
$tpl = str_replace("<IMAGE_HEIGHT2>",$image_height2,$tpl);
Dennis
12-20-2006, 06:11 AM
Remember you have to implement this hack again when the core files are updated.
That is why this hack would be good to place in the simple addon.
Yeah i just need to figure out how to do addons, i haven't really tried it yet so...
Dennis
12-22-2006, 04:38 PM
$image_height2 = $image_height - 30;
$tpl = str_replace("<IMAGE_HEIGHT2>",$image_height2,$tpl);
well you could drop this in a php file and in the addon's folder and it works. To make it nicer you can use these:
These are displayed in a users admin panel under addons:
$addon_name
$addon_description
$addon_version
thanks alot, i thought it was more complicated, but i'm glad to see its not.. i think i'll start working on a admin panel of some sort so you can easily add more properties from the admin panel.
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.