gjr-osweb / libratus

A Zenphoto theme.
GNU General Public License v2.0
9 stars 14 forks source link

Always show image thumbnail title within albums, or show with mouse rollover #30

Open ckfreeman opened 8 years ago

ckfreeman commented 8 years ago

First off love the theme, I originally posted this as a comment on fix #19 'always show name of sub album on thumbnail', but was hoping I might receive a response if I post it here. two issues

  1. the caption that shows the sub-album title and stats is not a link, I cannot click it to advance to the sub-album, and in some instances it covers the entire thumbnail, making it impossible to click on the sub album without reloading the page. This seems to happen because of the variable thumbnail size, the narrower the thumbnail image, the more of the thumb is covered. Can I change the custom css to regulate the size of the caption block?
  2. Also, is there a way to caption images, not just albums and subalbums, either with rollover or dedicated captions like the one on subalbums. Is there possibly a way to add something to custom css to do this, I do not have much experience editing code myself Thanks for any suggestions
fretzl commented 8 years ago

A quick and dirty way to turn the album thumb+caption into a link:

In the theme's index.php find this piece of code:

<?php while (next_album()): ?>
<div>
 <a href="<?php echo html_encode(getAlbumURL());?>">
  <?php printAlbumThumbImage(getBareAlbumTitle(),'check-flagthumb'); ?>
</a>
....
....etc.

and change it into this:

<?php while (next_album()): ?>
<div>
<a class="linkoverlay" href="<?php echo html_encode(getAlbumURL());?>"></a>
<?php printAlbumThumbImage(getBareAlbumTitle(),'check-flagthumb'); ?>
....
....etc.

Then in css/style.css add the following:

.linkoverlay {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 100;
}
ckfreeman commented 8 years ago

Finally got the chance to make these change, they didn't seem to work, they just make the photos completely unclickable and therefore the gallery unusable. I will continue to tinker with it but let me know if you have any suggestions. Thanks

fretzl commented 8 years ago

I tried to reproduce what you describe but all I can think of is that somehow the CSS change went wrong.

Also, you will have to make the same change (as on index.php) on every theme file where there is a next_album() loop. (index.php, album.php and search.php)

cbraymen commented 8 years ago

Thanks @fretzl ... I made the suggested changes (3 places) and it fixed the unclickable thumbnails for me.

cbraymen commented 8 years ago

Ah...but on Libratus there is an Admin button that drops a menu down over top of the album thumbs. I'm noticing now that the Admin drop down does not get the mouse focus in the portions of it that go over top of an album or picture thumb. Instead the underlying thumb is getting the focus..highlighting and unhighlighting as you hover over the menu, when it should be highlighting the menu items. I've not yet backed out the "linkoverlay" change to see if that is the cause...will do so tomorrow...

Update Jul 20: If I use z-index: 2 for .linkoverlay instead of z-index: 100 as @fretzl suggested above, the libratus admin drop down menu functions correctly. Just FYI. Thanks!