I have problems with the
`
<?php printCustomAlbumThumbMaxSpace(getAlbumTitle(),200,200); ?>
`
see here in this dummy gallery I am working on to put on my main page when ready.
http://www.olihar.com/album/Screenshot
http://img.skitch.com/20081011-g9dgaytk5jgfw454rusa8p5hwu.jpgif you do a refresh few time you will see sometimes the thumbs are bigger then they should be, for some odd reason.
ZenPage Question...
Is it possible to use Iframes when posting? The reason I am asking is I have some panoramas in Zoomify I would like to manually put Google maps to it like I have on my current web page.
I did try few times with iFrames with no luck
see here.
http://www.olihar.com/album/pages/Hafnarfjorduror would you suggest some other way of implementing manual Google maps with these photos
this is how its now on my old page.
http://olihar.com/gallery/index.php?p=pano01_001
Comments
2. I see actually no reason why iFrames should not work with the codeblocks. Any kind of code should be possible. But why don't you leave the images in the album as on the old site? Do they need to be a post?
I can't really help with Google Maps in general, I never used them and do not know how the code works.
I might try with deleting all the files and put up new ones and see what happens, I have tried clearing the cache few times but same results.
2.
When I put iFrame into codeblock and I save it changes the code from
`
`
to
`
The reason I want to change from how it is to being pages is all the manual work involved in making these pages and links.
if `"` is deleted and left with nothing, like so.
``
it works just fine.
I am getting to love ZenPage.
Good that you solved it. Sorry, I forgot to mention/think of that only single quotes can be used. I will add it both to the FAQ on the project site and to the comment in Zenpage itself.
Btw, did you try that code within TinyMCE? Actually it is just html so it might work even there (the google video on hte project site is just within that.)
Have you managed to look into the
`<?php printCustomAlbumThumbMaxSpace(getAlbumTitle(),200,200); ?>`
I am still getting these funky sizes as thumbs mainly on the index page. It never happens with the ImageThumbMaxSpace only the Album one.
`
" title="<?php echo gettext('View album:'); ?> <?php echo getAnnotatedAlbumTitle();?>"><?php printAlbumThumbImage(getAnnotatedAlbumTitle()); ?>
`
EDIT: I am getting these strange thumbs cache bugs now as well with this standard way of doing things. I have done Purge cache and rebuild as well.
`
<?php printCustomAlbumThumbMaxSpace(getAlbumTitle(),200,200); ?>
`
is the perfect solution I am looking for, if not looked at the 2 bugs I have reported about it, the random cache as stated here before and the problem with the video files.
I Decided to have a better look at the Custom(Album)ThumImage.
`
<?php printCustomAlbumThumbImage(getAlbumTitle(),NULL, '200' , '200', NULL, NULL, NULL, NULL); ?>
`
When this is used I get a 200px crop, crop is something I am trying to get away from as it cuts the photos in many ways, especially people's heads off on the thumbs.
When used with only height or width I get very bad results as there are mix between the portrait and landscape photos in the same folder.
What I have been looking into the printCustomAlbumThumbMaxSpace is how it creates the thumbs. I have found it interesting at how random it picks if it puts the given number to width or height. We say the given number is '200' sometimes it makes thumbs in the sizes 200x280 , 300x200 , 299x200, 356x200, 200x300.
I had a little look at the code...
`
function printCustomAlbumThumbMaxSpace($alt='', $width=NULL, $height=NULL, $class=NULL, $id=NULL) {
global $_zp_current_album;
$albumthumb = $_zp_current_album->getAlbumThumbImage();
$albumdata = $albumthumb->data;
$fullwidth = $albumdata['width'];
$fullheight = $albumdata['height'];
$percentuser = $width / 100;
$heightpercent = round($height / $percentuser);
$fullpercent = $fullwidth / 100;
$fullheightpercent = round($fullheight / $fullpercent);
if($fullwidth === $fullheight OR $fullheightpercent > $heightpercent) {
printCustomAlbumThumbImage($alt, NULL, null, $height, NULL, NULL, NULL, null, $class, $id);
} else {
printCustomAlbumThumbImage($alt, NULL, $width, null, NULL, NULL, NULL, null, $class, $id);
}
}
`
Just a quick question is all this math necessary?
The only thing that is needed is saying
`
if width > height in the original THUMB
print the width into the thumb and leave height out.
else print the height into the thumb and leave width out.
`
or
`
if width > height in the original IMAGE
print the width into the thumb and leave height out.
else print the height into the thumb and leave width out.
`
Or is this whole problem related to the cache.
I have been playing around with this a little bit but not really found any thing out of the ordinary.
`
function printCustomAlbumThumbMaxSpace($alt='', $width=NULL, $height=NULL, $class=NULL, $id=NULL) {
global $_zp_current_album;
$albumthumb = $_zp_current_album->getAlbumThumbImage();
$albumdata = $albumthumb->data;
$fullwidth = $albumdata['width'];
$fullheight = $albumdata['height'];
if($fullheight > $fullwidth) {
printCustomAlbumThumbImage($alt, NULL, null, $height, NULL, NULL, NULL, null, $class, $id);
} else {
printCustomAlbumThumbImage($alt, NULL, $width, null, NULL, NULL, NULL, null, $class, $id);
}
}
`
Well it doesn't really matter what I force into this code the problem stays the same.
Like
`
$fullwidth = '50';
$fullheight = '100';
`
it makes no difference even with the changed code I had here before. witch sound a bit strange to me as that should force it to at least go one way of the rule. Maybe I am just making up stuff I don't know.
But the good news is I think I found why it does that! The original function `printCustomAlbumThumbImage` does add a either a height or a width attribute to the img tag that is printed. That seems to cause the funny results. I threw that out for testing and now it seems to work. These atributes are actually there for the defaultimage.png if there is no actual thumb so that it fits since it is not cropped...
EDIT: You can try it yoursefl. The function is in line 1240 of template-functions. Set $sizing to "" in the if/else construct and see if it solves that for you, too
`printCustomAlbumThumbMaxSpace`
When I go into folders or subfolders with images and no folders everything is just fine it seems.
When ImageMaxSpace is used.
`printCustomSizedImageMaxSpace`
You can have a look here in this dummy I put up.
http://www.olihar.com/chris/
I see somehow the function use sometimes width when it should use height. Don't know why, that must lay in the internal class functions I am, I have to admit, not that familiar with. I have to consult sbillard on that, I guess.
EDIT: A thing I forgot to mention is that I not only set $sizing="" but also added the $height/$widht within the albumthumbmaxspace one also to the size paramenter like this `printCustomAlbumThumbImage($alt, $height, null, $height, NULL, NULL, NULL, null, $class, $id);`.
This seems to help... Please try that, too (we try anything these days, do we..:-))
but no fix, tough. it only makes the error thumbnails have worse quality.