Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 12-19-2006, 06:32 PM
Ubbe's Avatar
Ubbe Offline
pixelpost guru
 
Join Date: Apr 2006
Location: Denmark
Posts: 151
<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?
__________________
Best Regards
Ubbe - UbbeDall.dk | Photoblog
Reply With Quote
  #2  
Old 12-19-2006, 06:46 PM
Ubbe's Avatar
Ubbe Offline
pixelpost guru
 
Join Date: Apr 2006
Location: Denmark
Posts: 151
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);
i just added $image_height2 and the replace tag.
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);
__________________
Best Regards
Ubbe - UbbeDall.dk | Photoblog
Reply With Quote
  #3  
Old 12-20-2006, 06:11 AM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
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
Reply With Quote
  #4  
Old 12-20-2006, 06:48 AM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
That is why this hack would be good to place in the simple addon.
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #5  
Old 12-21-2006, 08:58 PM
Ubbe's Avatar
Ubbe Offline
pixelpost guru
 
Join Date: Apr 2006
Location: Denmark
Posts: 151
Yeah i just need to figure out how to do addons, i haven't really tried it yet so...
__________________
Best Regards
Ubbe - UbbeDall.dk | Photoblog
Reply With Quote
  #6  
Old 12-22-2006, 04:38 PM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
Code:
$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:
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
Reply With Quote
  #7  
Old 12-27-2006, 10:32 PM
Ubbe's Avatar
Ubbe Offline
pixelpost guru
 
Join Date: Apr 2006
Location: Denmark
Posts: 151
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.
__________________
Best Regards
Ubbe - UbbeDall.dk | Photoblog
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 08:53 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs