|
#1
|
||||
|
||||
|
<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? |
|
#2
|
||||
|
||||
|
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 Code:
$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);
Code:
$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);
|
|
#3
|
||||
|
||||
|
Remember you have to implement this hack again when the core files are updated.
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
|
|
#5
|
||||
|
||||
|
Yeah i just need to figure out how to do addons, i haven't really tried it yet so...
|
|
#6
|
||||
|
||||
|
Code:
$image_height2 = $image_height - 30;
$tpl = str_replace("<IMAGE_HEIGHT2>",$image_height2,$tpl);
Code:
These are displayed in a users admin panel under addons: $addon_name $addon_description $addon_version
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
|
|
#7
|
||||
|
||||
|
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.
|
| Post Reply |
| Thread Tools | |
|
|