Skip to content

Commit

Permalink
1.4.7 fixes along with thumb crop bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gjr-osweb committed Feb 12, 2015
1 parent 80cafbc commit 9f0e0ef
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 17 deletions.
7 changes: 6 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
--------------------
Currently for use with Zenphoto version 1.4.6
Currently for use with Zenphoto version 1.4.7

1.0 2/11/15
- Fixed album menu for 1.4.7 (Thanks Acrylian!).
- Fixed bug when crop thumbnails is enabled, setting incorrect ch and cw, not sure why. Changed image function when cropping.
- Version updates.

1.0 8/19/14
- Added mobile menu. (header.php and style.css)
Expand Down
26 changes: 22 additions & 4 deletions zpbase/album-grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
<?php while (next_album()): ?>
<div class="image-unit">
<a class="album-thumb" href="<?php echo html_encode(getAlbumURL());?>" title="<?php printBareAlbumTitle();?>">
<?php printAlbumThumbImage(getBareAlbumTitle(),'remove-attributes'); ?>
<?php if (getOption('thumb_crop')) {
printCustomAlbumThumbImage(getAnnotatedAlbumTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes');
} else {
printAlbumThumbImage(getAnnotatedAlbumTitle(),'remove-attributes');
} ?>
</a>
<h3><?php printBareAlbumTitle();?></h3>
<p class="album-desc"><?php echo strip_tags(truncate_string(getAlbumDesc(),120,'...')); ?></p>
Expand All @@ -63,15 +67,29 @@
<div class="image-unit">
<?php if ( (getOption('zpbase_magnific_grid')) || (getOption('zpbase_nodetailpage'))) {
if (getOption('zpbase_magnific_target') == 'imagepage') { ?>
<a class="image-thumb popup-page" href="<?php echo html_encode(getImageURL()); ?>?show=imagepage" title="<?php printBareImageTitle();?>"><?php printImageThumb(getBareImageTitle(),'remove-attributes'); ?></a>
<a class="image-thumb popup-page" href="<?php echo html_encode(getImageURL()); ?>?show=imagepage" title="<?php printBareImageTitle();?>">
<?php if (getOption('thumb_crop')) {
printCustomSizedImage(getAnnotatedImageTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes',null,true);
} else {
printImageThumb(getBareImageTitle(),'remove-attributes');
} ?>
</a>
<?php } elseif (isImagePhoto($_zp_current_image)) { ?>
<a title="<?php echo getBareImageTitle(); ?>" class="image-popup" <?php if (!(getOption('zpbase_nodetailpage'))) { ?>data-source="<?php echo html_encode(getImageURL()); ?>" <?php } ?>href="<?php echo htmlspecialchars(getDefaultSizedImage()); ?>"><?php printImageThumb(getBareImageTitle(),'remove-attributes'); ?></a>
<?php } else { ?>
<?php printImageThumb(getBareImageTitle(),'remove-attributes'); ?>
<?php if (getOption('thumb_crop')) {
printCustomSizedImage(getAnnotatedImageTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes',null,true);
} else {
printImageThumb(getBareImageTitle(),'remove-attributes');
} ?>
<?php } ?>
<?php } else { ?>
<a class="image-thumb" href="<?php echo html_encode(getImageURL()); ?>" title="<?php printBareImageTitle();?>">
<?php printImageThumb(getBareImageTitle(),'remove-attributes'); ?>
<?php if (getOption('thumb_crop')) {
printCustomSizedImage(getAnnotatedImageTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes',null,true);
} else {
printImageThumb(getBareImageTitle(),'remove-attributes');
} ?>
</a>
<?php } ?>
</div>
Expand Down
18 changes: 15 additions & 3 deletions zpbase/album-masonry.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@
<div class="masonry-style-padding">
<h3><?php printAlbumTitle(); ?></h3>
<a class="album-thumb" href="<?php echo html_encode(getAlbumURL()); ?>" title="<?php printBareAlbumTitle(); ?>">
<?php printAlbumThumbImage(getBareAlbumTitle(),'remove-attributes'); ?>
<?php if (getOption('thumb_crop')) {
printCustomAlbumThumbImage(getAnnotatedAlbumTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes');
} else {
printAlbumThumbImage(getAnnotatedAlbumTitle(),'remove-attributes');
} ?>
</a>
<p class="album-desc"><?php echo strip_tags(truncate_string(getAlbumDesc(),140,'...')); ?></p>
<div class="album-stats">
Expand All @@ -70,10 +74,18 @@
<div class="masonry-style-item">
<div class="masonry-style-padding">
<?php if (getOption('zpbase_nodetailpage')) {
printImageThumb(getBareImageTitle(),'remove-attributes');
if (getOption('thumb_crop')) {
printCustomSizedImage(getAnnotatedImageTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes',null,true);
} else {
printImageThumb(getBareImageTitle(),'remove-attributes');
}
} else { ?>
<a href="<?php echo html_encode(getImageURL()); ?>" title="<?php printBareImageTitle(); ?>">
<?php printImageThumb(getBareImageTitle(),'remove-attributes'); ?>
<?php if (getOption('thumb_crop')) {
printCustomSizedImage(getAnnotatedImageTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes',null,true);
} else {
printImageThumb(getBareImageTitle(),'remove-attributes');
} ?>
</a>
<?php } ?>
<?php if ((getOption('zpbase_magnific_masonry')) || (getOption('zpbase_nodetailpage'))) {
Expand Down
6 changes: 5 additions & 1 deletion zpbase/inc/index-grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
<?php while (next_album()): ?>
<div class="image-unit">
<a class="album-thumb" href="<?php echo html_encode(getAlbumURL());?>" title="<?php printBareAlbumTitle();?>">
<?php printAlbumThumbImage(getBareAlbumTitle(),'remove-attributes'); ?>
<?php if (getOption('thumb_crop')) {
printCustomAlbumThumbImage(getAnnotatedAlbumTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes');
} else {
printAlbumThumbImage(getAnnotatedAlbumTitle(),'remove-attributes');
} ?>
</a>
<h3><?php printBareAlbumTitle();?></h3>
<p class="album-desc"><?php echo truncate_string(strip_tags(getAlbumDesc()),120,'...'); ?></p>
Expand Down
6 changes: 5 additions & 1 deletion zpbase/inc/index-masonry.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
<div class="masonry-style-padding">
<h3><?php printAlbumTitle(); ?></h3>
<a class="album-thumb" href="<?php echo html_encode(getAlbumURL()); ?>" title="<?php printBareAlbumTitle(); ?>">
<?php printAlbumThumbImage(getBareAlbumTitle(),'remove-attributes'); ?>
<?php if (getOption('thumb_crop')) {
printCustomAlbumThumbImage(getAnnotatedAlbumTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes');
} else {
printAlbumThumbImage(getAnnotatedAlbumTitle(),'remove-attributes');
} ?>
</a>
<p class="album-desc"><?php echo truncate_string(strip_tags(getAlbumDesc()),140,'...'); ?></p>
<div class="album-stats">
Expand Down
44 changes: 37 additions & 7 deletions zpbase/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@
<div class="masonry-style-padding">
<h3><?php printAlbumTitle(); ?></h3>
<a class="album-thumb" href="<?php echo html_encode(getAlbumURL()); ?>" title="<?php printBareAlbumTitle(); ?>">
<?php printAlbumThumbImage(getBareAlbumTitle(),'remove-attributes'); ?>
<?php if (getOption('thumb_crop')) {
printCustomAlbumThumbImage(getAnnotatedAlbumTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes');
} else {
printAlbumThumbImage(getAnnotatedAlbumTitle(),'remove-attributes');
} ?>
</a>
<p class="album-desc"><?php echo strip_tags(truncate_string(getAlbumDesc(),140,'...')); ?></p>
<div class="album-stats">
Expand All @@ -102,10 +106,18 @@
<div class="masonry-style-item">
<div class="masonry-style-padding">
<?php if (getOption('zpbase_nodetailpage')) {
printImageThumb(getBareImageTitle(),'remove-attributes');
if (getOption('thumb_crop')) {
printCustomSizedImage(getAnnotatedImageTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes',null,true);
} else {
printImageThumb(getBareImageTitle(),'remove-attributes');
}
} else { ?>
<a href="<?php echo html_encode(getImageURL()); ?>" title="<?php printBareImageTitle(); ?>">
<?php printImageThumb(getBareImageTitle(),'remove-attributes'); ?>
<?php if (getOption('thumb_crop')) {
printCustomSizedImage(getAnnotatedImageTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes',null,true);
} else {
printImageThumb(getBareImageTitle(),'remove-attributes');
} ?>
</a>
<?php } ?>
<?php if ((getOption('zpbase_magnific_masonry')) || (getOption('zpbase_nodetailpage'))) {
Expand Down Expand Up @@ -159,7 +171,11 @@
<?php while (next_album()): ?>
<div class="image-unit">
<a class="album-thumb" href="<?php echo html_encode(getAlbumURL());?>" title="<?php printBareAlbumTitle();?>">
<?php printAlbumThumbImage(getBareAlbumTitle(),'remove-attributes'); ?>
<?php if (getOption('thumb_crop')) {
printCustomAlbumThumbImage(getAnnotatedAlbumTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes');
} else {
printAlbumThumbImage(getAnnotatedAlbumTitle(),'remove-attributes');
} ?>
</a>
<h3><?php printBareAlbumTitle();?></h3>
<p class="album-desc"><?php echo strip_tags(truncate_string(getAlbumDesc(),120,'...')); ?></p>
Expand All @@ -174,13 +190,27 @@
if (getOption('zpbase_magnific_target') == 'imagepage') { ?>
<a class="image-thumb popup-page" href="<?php echo html_encode(getImageURL()); ?>?show=imagepage" title="<?php printBareImageTitle();?>"><?php printImageThumb(getBareImageTitle(),'remove-attributes'); ?></a>
<?php } elseif (isImagePhoto($_zp_current_image)) { ?>
<a title="<?php echo getBareImageTitle(); ?>" class="image-popup" <?php if (!(getOption('zpbase_nodetailpage'))) { ?>data-source="<?php echo html_encode(getImageURL()); ?>" <?php } ?>href="<?php echo htmlspecialchars(getDefaultSizedImage()); ?>"><?php printImageThumb(getBareImageTitle(),'remove-attributes'); ?></a>
<a title="<?php echo getBareImageTitle(); ?>" class="image-popup" <?php if (!(getOption('zpbase_nodetailpage'))) { ?>data-source="<?php echo html_encode(getImageURL()); ?>" <?php } ?>href="<?php echo htmlspecialchars(getDefaultSizedImage()); ?>">
<?php if (getOption('thumb_crop')) {
printCustomSizedImage(getAnnotatedImageTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes',null,true);
} else {
printImageThumb(getBareImageTitle(),'remove-attributes');
} ?>
</a>
<?php } else { ?>
<?php printImageThumb(getBareImageTitle(),'remove-attributes'); ?>
<?php if (getOption('thumb_crop')) {
printCustomSizedImage(getAnnotatedImageTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes',null,true);
} else {
printImageThumb(getBareImageTitle(),'remove-attributes');
} ?>
<?php } ?>
<?php } else { ?>
<a class="image-thumb" href="<?php echo html_encode(getImageURL()); ?>" title="<?php printBareImageTitle();?>">
<?php printImageThumb(getBareImageTitle(),'remove-attributes'); ?>
<?php if (getOption('thumb_crop')) {
printCustomSizedImage(getAnnotatedImageTitle(),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),getOption('thumb_size'),null,null,'remove-attributes',null,true);
} else {
printImageThumb(getBareImageTitle(),'remove-attributes');
} ?>
</a>
<?php } ?>
</div>
Expand Down

0 comments on commit 9f0e0ef

Please sign in to comment.