Different size thumbnails for albums and images...

fooj
fooj's picture

Joined: 2008-10-26
Posts: 6
Posted: Sat, 2008-11-01 14:18

Hello folks.

I originally posted this in the module development forum but wasn't sure if it was the right place. I will try here.

Can anyone give me any suggestions on where to start.

Also, I am using phpDesigner 2008 and I am trying to figure out how (if it is possible) to debug using it.

Sorry for the noobish questions and thanks in advance.

Fooj
*****

I am new to Gallery and I am trying to tweak the SquareThumbs module. I have copied the SquareThumbs folder and did a bunch of search replace to create a new module that seems to be functioning. However, I am not sure how to implement some of the changes I want. They are:

1. Have one size thumbnail (highlite?) for albums and another for photos. (similar to http://frommel.net/gallery/ )

I have been able to change the code to generate the "long landscape" aspect ratio that I want but it applies it to everything.
There is some code in the squarethumbToolkit.class file that assigns values to $arg, so I have been trying to wrap this in an if statement to check if it is an album but I have not had any luck.

if ($child.canContainChildren) {
	$args = ($width > $height*5/2) ? array( 100*(1-(5*$height/2)/$width)/2, 0, 100*(5*$height/2)/$width, 100 ) : array( 0, 100*(1-((2*$width/5)/$height))/2, 100, 100*((2*$width/5)/$height) );
}
else{
	$args = ($width > $height) ? array( 100*(1-$height/$width)/2, 0, 100*$height/$width, 100 ) : array( 0, 100*(1-$width/$height)/2, 100, 100*$width/$height );
}

2. I would also like to move the inputs for specifying sizes from the "edit album" page to the "Site Admin" page for this new module.

So, any help with this would be greatly appreciated.

Thanks,

fooj