Making PGlightbox popup thumbnail script more search engine friendly?

ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Fri, 2012-08-31 13:45

Hi there,

My PGlightbox theme version has popup image thumbnail feature which can be enabled when the right/lefthand side of the image is rolled over. Unfortunately the way they are implemented I can't use the popup thumbs because it has a detrimental effect on image search. When the popup thumbs are turned on the code actually turns the image into a background image, which google can't index. I was wondering if there is a way to change the code so that the javascript doesn't hide the image in the background but keeps it on the page so it can be indexed?

Gallery version = 2.2-svn core 1.1.16
PHP version = 5.2.13 apache2handler
Toolkits = LinkItemToolkit, Thumbnail, Gd, ImageMagick
Acceleration = full/86400, full/86400
Default theme = PGlightbox

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2012-08-31 15:42

PGlightbox was never updated for 2.3.x so I cannot test for you.
You're going to have to figure out the script by yourself instead of asking the same question several times.

I did a quick and dirty example:

        <style>
            #gsImageView > a {
                display: inline-block;
                position:relative;
            }
            .icon {
                z-index:9999;
                display:none;
                border: 1px solid #999;
                background-color: rgba(255, 255, 255, .4);
                border-radius: 17px 16px;
            }
            .left {
                position:absolute;
                top:47%;
                left:0;
            }
            .right {
                position:absolute;
                top:47%;
                right:0;
            }
        </style>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
        <script>
            var left = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAABqklEQVRYhcXXS46jMBCAYR9kFiMgBgPmEYzAwQ4VErHmxj6Cj9DLHKAPULOY9iitJlGrMzEl/dvSJ6/KhDwx8zwn8zznz+x4egAgmabperlcYEsEnE4nM00Tns/nZTMEABgAwI/8QwAAxnE04ziiyztEKQVaa3M8HvE2rbU/iENorXElPxClFCiljFIK1/ICUUrBMAxmGAa8l5TytZC+70FKaQ6HAz7qpRApZSKlvEop8RtdpZRvP63rul93X6Lve9P3PXrq9yqi6zrTdR366gtECAFt25q2bdFnnyBCCBBCGCEE+u4fxCGapsEtqqrqL6RpmqVpGrs5xGHqurb7/R599wlCCCFVVS11Xdu6rtFnXyAOU5alLcsSfbUKIYQQzvlSFIUtigJ9dBdyi+Gc46t7CHGYPM9tnuf4KM75688AxtiSZZnNsgzvxRjzcxgxxpY0TW2apriWN4jDMMYsYwxX8ns8U0qXOI5tkiR4G6XU/3fCYeI4RtcmEIehlFpKKX60DYQQQsIwXHa7nY2iCMMw3A5CCCFBEKgoit6jKIJNIQ4TBIH4H7v+AK3T3o1H8lOwAAAAAElFTkSuQmCC';
            var right = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAB4ElEQVRYhcXUyY7TQBCA4TpwYOfKjpI4dryvnXZ77bSjSLnzGLwHDJkZH4HZXoBDP8I8Co/BsbiQKDCegJRMu6T/WvoOpQLYc5qmeb/vjoNM0zTXQoi2bwcIIaQQAoUQp/P5/FlvEM655Jwj5xxns9npcrl82gukrmtZ1zVudUIpVY+p61pWVYXblWV5kuf5E6WQsixlWZb4d1VVHSvFFEUhi6LAWzrmnD9WBsnzHHe0UoLJskxmWYa7yvN8tVgsHu1cxBhbMcZ+7NFPxhj+R7ufHqW0TdMUVUQp/RzH8cNbIZRSVFWapkedGEJISwhBlU2n0yPG2IMbkCRJUHWEkE+c8/sbSJIkbRzH2FMfN5goivqEfCGEPN9AoijCHvq6QQAABEHQhmGIKguC4Fscxy/+OFbP81rf91FhNxFriOd5qKizMAxfdj4013Vb13VRQWe+77/qRBxiHMeRjuPgPzq/U8QaYts27ujc87zXd4oAALAsS1qWhV3Ztn2hBAEAYJqmNE0TO7pwHOeNEgQAgGEYcjKZ4HamaV4qRawhhmHgVpe2bb9VigAA0HVd6rqOuq6jYRhXw+FQPQIAQNM0qWkajsfjq8Fg8K4XxG/ItaZp3znn93pDAACMRqMPh0D8ApCV3bgU7e+YAAAAAElFTkSuQmCC';
            
            $(document).ready(function(){
                /* Bind some events */
                $(document).on('mouseenter', '#gsImageView > a', function(){
                    $('.icon').fadeToggle('fast');
                }).on('mouseleave', '#gsImageView > a', function(){
                    $('.icon').fadeToggle('fast');
                }).on('click', 'span.left', function(e){
                    e.preventDefault();
                    location.href = $('.block-core-Navigator .previous').attr('href');
                }).on('click', 'span.right', function(e){
                    e.preventDefault();
                    location.href = $('.block-core-Navigator .next').attr('href');
                });
                if($('.block-core-Navigator .previous').length > 0){
                    $('#gsImageView > a').append('<span class="icon left"><img src="'+left+'" /></span>');
                }
                if($('.block-core-Navigator .next').length > 0){
                    $('#gsImageView > a').append('<span class="icon right"><img src="'+right+'" /></span>');
                }
                
            });
        </script>

-s
All New jQuery Minislideshow for G2/G3

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Tue, 2012-09-04 17:23

Hi Supr,

I tried the script you posted and I wasn't sure where it should all go. I put the <style> tags in my theme.css file as putting into the header of theme.tpl caused an error. I loaded the jquery script in the header of theme.tpl...no problem there. However, when I added the actual rollover script I get a fatal error:

Fatal error: Smarty error: [in gallery:themes/PGlightbox/templates/theme.tpl line 49]: syntax error: unrecognized tag: $(document).on('mouseenter', '#gsImageView > a', function(){ $('.icon').fadeToggle('fast'); (Smarty_Compiler.class.php, line 439) in /public_html/gallery2/lib/smarty/Smarty.class.php on line 1095

I'm not sure how to resolve smarty unrecognized tag errors...do I have to define the tag in Smarty_Compiler.class.php or Smarty.class.php?

Thanks for your help!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-09-04 17:35

gallery interprets curly bracket as smarty tags
wrap your javascript in literal

{literal}
<script>
blah blah
</script>
{/literal}

-s
All New jQuery Minislideshow for G2/G3

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-09-04 17:37

we are styling div id="gsImageView"
and looking for block-core-Navigator links
I don't know if your theme uses thos elements.
If you supply a link to your gallery, I can adjust the script.

-s
All New jQuery Minislideshow for G2/G3

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Tue, 2012-09-04 17:59

Oh I see...I think my theme does use block-core-Navigator links. The gallery is the entire website here: http://andrewprokos.com. Is that what you need or you need a link to something in the gallery install folder on the server?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-09-04 18:48

try:

            var left = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAABqklEQVRYhcXXS46jMBCAYR9kFiMgBgPmEYzAwQ4VErHmxj6Cj9DLHKAPULOY9iitJlGrMzEl/dvSJ6/KhDwx8zwn8zznz+x4egAgmabperlcYEsEnE4nM00Tns/nZTMEABgAwI/8QwAAxnE04ziiyztEKQVaa3M8HvE2rbU/iENorXElPxClFCiljFIK1/ICUUrBMAxmGAa8l5TytZC+70FKaQ6HAz7qpRApZSKlvEop8RtdpZRvP63rul93X6Lve9P3PXrq9yqi6zrTdR366gtECAFt25q2bdFnnyBCCBBCGCEE+u4fxCGapsEtqqrqL6RpmqVpGrs5xGHqurb7/R599wlCCCFVVS11Xdu6rtFnXyAOU5alLcsSfbUKIYQQzvlSFIUtigJ9dBdyi+Gc46t7CHGYPM9tnuf4KM75688AxtiSZZnNsgzvxRjzcxgxxpY0TW2apriWN4jDMMYsYwxX8ns8U0qXOI5tkiR4G6XU/3fCYeI4RtcmEIehlFpKKX60DYQQQsIwXHa7nY2iCMMw3A5CCCFBEKgoit6jKIJNIQ4TBIH4H7v+AK3T3o1H8lOwAAAAAElFTkSuQmCC';
            var right = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAB4ElEQVRYhcXUyY7TQBCA4TpwYOfKjpI4dryvnXZ77bSjSLnzGLwHDJkZH4HZXoBDP8I8Co/BsbiQKDCegJRMu6T/WvoOpQLYc5qmeb/vjoNM0zTXQoi2bwcIIaQQAoUQp/P5/FlvEM655Jwj5xxns9npcrl82gukrmtZ1zVudUIpVY+p61pWVYXblWV5kuf5E6WQsixlWZb4d1VVHSvFFEUhi6LAWzrmnD9WBsnzHHe0UoLJskxmWYa7yvN8tVgsHu1cxBhbMcZ+7NFPxhj+R7ufHqW0TdMUVUQp/RzH8cNbIZRSVFWapkedGEJISwhBlU2n0yPG2IMbkCRJUHWEkE+c8/sbSJIkbRzH2FMfN5goivqEfCGEPN9AoijCHvq6QQAABEHQhmGIKguC4Fscxy/+OFbP81rf91FhNxFriOd5qKizMAxfdj4013Vb13VRQWe+77/qRBxiHMeRjuPgPzq/U8QaYts27ujc87zXd4oAALAsS1qWhV3Ztn2hBAEAYJqmNE0TO7pwHOeNEgQAgGEYcjKZ4HamaV4qRawhhmHgVpe2bb9VigAA0HVd6rqOuq6jYRhXw+FQPQIAQNM0qWkajsfjq8Fg8K4XxG/ItaZp3znn93pDAACMRqMPh0D8ApCV3bgU7e+YAAAAAElFTkSuQmCC';
            
            $(document).ready(function(){
                /* Bind some events */
                $(document).on('mouseenter', '.gsSingleImageNoF', function(){
                    $('.icon').fadeToggle('fast');
                }).on('mouseleave', '.gsSingleImageNoF', function(){
                    $('.icon').fadeToggle('fast');
                }).on('click', 'span.left', function(e){
                    e.preventDefault();
                    location.href = $('.iconPrev').attr('href');
                }).on('click', 'span.right', function(e){
                    e.preventDefault();
                    location.href = $('.iconNext').attr('href');
                });
                if($('.iconPrev').length > 0){
                    $('.gsSingleImageNoF').append('<span class="icon left"><img src="'+left+'" /></span>');
                }
                if($('.iconNext').length > 0){
                    $('.gsSingleImageNoF').append('<span class="icon right"><img src="'+right+'" /></span>');
                }
                
            });

your page already has an icon class, so if they clash you will have to change any reference to icon in my css/script to something else like icons or arrow or something

-s
All New jQuery Minislideshow for G2/G3

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Tue, 2012-09-04 22:00

It'a live on the site now...no more smarty errors but the script isn't doing anything. The images aren't clickable and no icons. Do I have to edit the CSS to get it to work?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-09-04 23:39

you're missing a </script> tag

<script type="text/javascript" src="/gallery2/themes/PGlightbox/theme.js">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>

should read

<script type="text/javascript" src="/gallery2/themes/PGlightbox/theme.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>

-s
All New jQuery Minislideshow for G2/G3

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Tue, 2012-09-04 23:45

Ok fixed that...the arrows are showing up now but they are on either side of the page, not the image. I left it live so you can see it on any full size image. You can't click the image because the defined area is too far from the image...

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Tue, 2012-09-04 23:47

I see that when you roll over the image that the PHLightbox nav buttons also appear...I think this is a CSS error, perhaps what you said before about renaming the 'icon' class. I have to disable it for now and will try editing rhe CSS and let you know how it works

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-09-05 00:48

also add to the css:

.gsSingleImageNoF { position:relative; }

-s
All New jQuery Minislideshow for G2/G3

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Wed, 2012-09-05 14:17

THis is what I have so far in the header of theme.tpl:

{literal}<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script>
var left = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAABqklEQVRYhcXXS46jMBCAYR9kFiMgBgPmEYzAwQ4VErHmxj6Cj9DLHKAPULOY9iitJlGrMzEl/dvSJ6/KhDwx8zwn8zznz+x4egAgmabperlcYEsEnE4nM00Tns/nZTMEABgAwI/8QwAAxnE04ziiyztEKQVaa3M8HvE2rbU/iENorXElPxClFCiljFIK1/ICUUrBMAxmGAa8l5TytZC+70FKaQ6HAz7qpRApZSKlvEop8RtdpZRvP63rul93X6Lve9P3PXrq9yqi6zrTdR366gtECAFt25q2bdFnnyBCCBBCGCEE+u4fxCGapsEtqqrqL6RpmqVpGrs5xGHqurb7/R599wlCCCFVVS11Xdu6rtFnXyAOU5alLcsSfbUKIYQQzvlSFIUtigJ9dBdyi+Gc46t7CHGYPM9tnuf4KM75688AxtiSZZnNsgzvxRjzcxgxxpY0TW2apriWN4jDMMYsYwxX8ns8U0qXOI5tkiR4G6XU/3fCYeI4RtcmEIehlFpKKX60DYQQQsIwXHa7nY2iCMMw3A5CCCFBEKgoit6jKIJNIQ4TBIH4H7v+AK3T3o1H8lOwAAAAAElFTkSuQmCC';
var right = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAB4ElEQVRYhcXUyY7TQBCA4TpwYOfKjpI4dryvnXZ77bSjSLnzGLwHDJkZH4HZXoBDP8I8Co/BsbiQKDCegJRMu6T/WvoOpQLYc5qmeb/vjoNM0zTXQoi2bwcIIaQQAoUQp/P5/FlvEM655Jwj5xxns9npcrl82gukrmtZ1zVudUIpVY+p61pWVYXblWV5kuf5E6WQsixlWZb4d1VVHSvFFEUhi6LAWzrmnD9WBsnzHHe0UoLJskxmWYa7yvN8tVgsHu1cxBhbMcZ+7NFPxhj+R7ufHqW0TdMUVUQp/RzH8cNbIZRSVFWapkedGEJISwhBlU2n0yPG2IMbkCRJUHWEkE+c8/sbSJIkbRzH2FMfN5goivqEfCGEPN9AoijCHvq6QQAABEHQhmGIKguC4Fscxy/+OFbP81rf91FhNxFriOd5qKizMAxfdj4013Vb13VRQWe+77/qRBxiHMeRjuPgPzq/U8QaYts27ujc87zXd4oAALAsS1qWhV3Ztn2hBAEAYJqmNE0TO7pwHOeNEgQAgGEYcjKZ4HamaV4qRawhhmHgVpe2bb9VigAA0HVd6rqOuq6jYRhXw+FQPQIAQNM0qWkajsfjq8Fg8K4XxG/ItaZp3znn93pDAACMRqMPh0D8ApCV3bgU7e+YAAAAAElFTkSuQmCC';

$(document).ready(function(){
/* Bind some events */
$(document).on('mouseenter', '.gsSingleImageNoF', function(){
$('.icon').fadeToggle('fast');
}).on('mouseleave', '.gsSingleImageNoF', function(){
$('.icon').fadeToggle('fast');
}).on('click', 'span.left', function(e){
e.preventDefault();
location.href = $('.iconPrev').attr('href');
}).on('click', 'span.right', function(e){
e.preventDefault();
location.href = $('.iconNext').attr('href');
});
if($('.iconPrev').length > 0){
$('.gsSingleImageNoF').append('<span class="icon left"><img src="'+left+'" /></span>');
}
if($('.iconNext').length > 0){
$('.gsSingleImageNoF').append('<span class="icon right"><img src="'+right+'" /></span>');
}

});
</script>
{/literal}

This is the css in theme.css:

#gsImageView > a {
display: inline-block;
position:relative;
}
.iconz {
z-index:9999;
display:none;
border: 1px solid #999;
background-color: rgba(255, 255, 255, .4);
border-radius: 17px 16px;
}
.left {
position:absolute;
top:47%;
left:0;
}
.right {
position:absolute;
top:47%;
right:0;
}
.gsSingleImageNoF {
position:relative;
}

I renamed icons to iconz in the css just to be safe. I wasn't sure if I needed to change it in the js as well so I tried it with an without. Either way the script isn't quite functioning...the arrows appear fixed on either side of the image (no fade in) and when you click on them it moves to the next image. The arrows are a dark grey with no circle around them this time. OR the arrows appear when cursor is not over the image, and when the cursor is over the image the icons disappear as well as the "next image" and "previous image" links I use below. That would indicate that "icon" is used elsewhere in the css for those nav links. I don;t understand why the script doesn't function when I do change the css to icons though. Should the css and the js match? Also, what I am going for is having the arrows on the left/right of the image (not over the image), and they can change color on rollover. That way people realize immediately that there are nav arrows there without having to rollover the image. Is it possible to define the left/right half of the image plus some extra space over the background so anywhere they rollover near the left or right side the icons light up? Thanks!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-09-05 14:28

<span class="icon right"> should now be <span class="iconz right">
and
<span class="icon left"> should now be <span class="iconz left">

-s
All New jQuery Minislideshow for G2/G3

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Wed, 2012-09-05 17:29

When I change icon left/right to iconz left/right something else happens...the arrows don't appear at all anymore and the image is not clickable. When I roll over the image the nav links below the image disappear

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-09-05 17:49
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
{literal}
<script>
    var left = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAABqklEQVRYhcXXS46jMBCAYR9kFiMgBgPmEYzAwQ4VErHmxj6Cj9DLHKAPULOY9iitJlGrMzEl/dvSJ6/KhDwx8zwn8zznz+x4egAgmabperlcYEsEnE4nM00Tns/nZTMEABgAwI/8QwAAxnE04ziiyztEKQVaa3M8HvE2rbU/iENorXElPxClFCiljFIK1/ICUUrBMAxmGAa8l5TytZC+70FKaQ6HAz7qpRApZSKlvEop8RtdpZRvP63rul93X6Lve9P3PXrq9yqi6zrTdR366gtECAFt25q2bdFnnyBCCBBCGCEE+u4fxCGapsEtqqrqL6RpmqVpGrs5xGHqurb7/R599wlCCCFVVS11Xdu6rtFnXyAOU5alLcsSfbUKIYQQzvlSFIUtigJ9dBdyi+Gc46t7CHGYPM9tnuf4KM75688AxtiSZZnNsgzvxRjzcxgxxpY0TW2apriWN4jDMMYsYwxX8ns8U0qXOI5tkiR4G6XU/3fCYeI4RtcmEIehlFpKKX60DYQQQsIwXHa7nY2iCMMw3A5CCCFBEKgoit6jKIJNIQ4TBIH4H7v+AK3T3o1H8lOwAAAAAElFTkSuQmCC';
    var right = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAB4ElEQVRYhcXUyY7TQBCA4TpwYOfKjpI4dryvnXZ77bSjSLnzGLwHDJkZH4HZXoBDP8I8Co/BsbiQKDCegJRMu6T/WvoOpQLYc5qmeb/vjoNM0zTXQoi2bwcIIaQQAoUQp/P5/FlvEM655Jwj5xxns9npcrl82gukrmtZ1zVudUIpVY+p61pWVYXblWV5kuf5E6WQsixlWZb4d1VVHSvFFEUhi6LAWzrmnD9WBsnzHHe0UoLJskxmWYa7yvN8tVgsHu1cxBhbMcZ+7NFPxhj+R7ufHqW0TdMUVUQp/RzH8cNbIZRSVFWapkedGEJISwhBlU2n0yPG2IMbkCRJUHWEkE+c8/sbSJIkbRzH2FMfN5goivqEfCGEPN9AoijCHvq6QQAABEHQhmGIKguC4Fscxy/+OFbP81rf91FhNxFriOd5qKizMAxfdj4013Vb13VRQWe+77/qRBxiHMeRjuPgPzq/U8QaYts27ujc87zXd4oAALAsS1qWhV3Ztn2hBAEAYJqmNE0TO7pwHOeNEgQAgGEYcjKZ4HamaV4qRawhhmHgVpe2bb9VigAA0HVd6rqOuq6jYRhXw+FQPQIAQNM0qWkajsfjq8Fg8K4XxG/ItaZp3znn93pDAACMRqMPh0D8ApCV3bgU7e+YAAAAAElFTkSuQmCC';
    
    $(document).ready(function(){
        /* Bind some events */
        $(document).on('mouseenter', '.gsSingleImageNoF', function(){
            $('.iconz').fadeToggle('fast');
        }).on('mouseleave', '.gsSingleImageNoF', function(){
            $('.iconz').fadeToggle('fast');
        }).on('click', 'span.left', function(e){
            e.preventDefault();
            location.href = $('.iconPrev').attr('href');
        }).on('click', 'span.right', function(e){
            e.preventDefault();
            location.href = $('.iconNext').attr('href');
        });
        if ($('.iconPrev').length > 0) {
            $('.gsSingleImageNoF').append('<span class="iconz left"><img src="' + left + '" /></span>');
        }
        if ($('.iconNext').length > 0) {
            $('.gsSingleImageNoF').append('<span class="iconz right"><img src="' + right + '" /></span>');
        }
    });
</script>
{/literal}

CSS:

.gsSingleImageNoF {
    position: relative;
}
.iconz {
    z-index: 9999;
    display: none;
    border: 1px solid #999;
    background-color: rgba(255, 255, 255, .4);
    border-radius: 17px 16px;
}
.left {
    position: absolute;
    top: 47%;
    left: 0;
}
.right {
    position: absolute;
    top: 47%;
    right: 0;
}

-s
All New jQuery Minislideshow for G2/G3

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Wed, 2012-09-05 18:16

Great that is working now thanks! I was wondering if a fews mods are possible though...
1) To make the entire right/left side of the image clickable? Right now the arrows appear when you rollover the right/left side but you have to actually click on the arrow to move forward/back
2) To offset the arrows outside of the image, rather than over the image?
3) To leave the arrows always visible to the right/left of the image and just make them change color or something when the right/left of the image is rolled over (as in the example link I posted at top)
4) To use different icons for the arrows? I'm not sure how these are being rendered...the long encrypted code after "var left ="?

Thanks again for your help. I hope this helps others too who might want the same feature

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-09-05 18:42
Quote:
1) To make the entire right/left side of the image clickable? Right now the arrows appear when you rollover the right/left side but you have to actually click on the arrow to move forward/back

This is a simple CSS adjustment

Quote:
2) To offset the arrows outside of the image, rather than over the image?

Harder as when your mouse leaves the image container the arrows disappear

Quote:
3) To leave the arrows always visible to the right/left of the image and just make them change color or something when the right/left of the image is rolled over (as in the example link I posted at top)

You could always copy his script

Quote:
4) To use different icons for the arrows? I'm not sure how these are being rendered...the long encrypted code after "var left ="?

the icons I chose were in dataUri format. you can convert yours here.

-s
All New jQuery Minislideshow for G2/G3

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Wed, 2012-09-05 18:50

Wow never heard of a data to URI conversion, very interesting I'll try it. I first tried copying his script and using that, but seeing that I didn't understand half of what was going on it didn't work. Maybe now I'll understand it better. Which portion of the css do I edit to make a larger area clickable, this?:

.left {
position: absolute;
top: 47%;
left: 0;
}
.right {
position: absolute;
top: 47%;
right: 0;

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-09-05 19:21
        <style>
            
            .gsSingleImageNoF {
                position: relative;
            }
            
            .iconz {
                z-index: 9999;
                display: none;
                width: 50%;
                height: 100%;
            }
            
            .iconz > img {
                position: absolute;
                top: 47%;
            }
            
            .left > img {
                left: 0;
            }
            
            .right > img {
                right: 0;
            }
            
            .left {
                position: absolute;
                top: 0;
                left: 0;
            }
            
            .right {
                position: absolute;
                top: 0;
                right: 0;
            }
        </style>

-s
All New jQuery Minislideshow for G2/G3

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Wed, 2012-09-05 19:27

This puts the arrows at the top left/right corners of the browser window

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-09-05 19:32

did you copy the css as I posted?

-s
All New jQuery Minislideshow for G2/G3

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Wed, 2012-09-05 21:10

I thought I did...but I repasted it in and made sure to remove the extra spacing and it works fine now. Before there was a white semi-transparent circle around the icon, now it's gone...which is better.
The clickable portion of the image is better now....if they click anywhere on the left or right half of the image it moves back and forth, which is more intuitive. If you look on the site I changed the icons to white arrows as I think it shows better. I made them at 60% opacity in Photoshop but the transparency isn't coming through to the icons. Is the opacity of the icon handled by the CSS?

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Wed, 2012-09-05 21:18

I also realized one thing that would be helpful, if the arrow shows up just over the half of the image that you are hovering over and not both arrows at the same time. For example...if you want to go forward, when hovering over the right half of the image only the right icon should show up. If you move the cursor to the left half of the image the right cursor should disappear and the left one should appear. That would be more intuitive I think. Hard to do?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-09-05 21:25
Quote:
That would be more intuitive I think

I disagree. The current way indicates that the option to go both directions is available.

Quote:
Is the opacity of the icon handled by the CSS?

Could be, but its not.

.iconz > img {
    opacity: .5;
}

http://www.w3schools.com/cssref/css3_pr_opacity.asp

-s
All New jQuery Minislideshow for G2/G3

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Wed, 2012-09-05 21:49

I disagree, I think it makes more sense to activate each side independently. I showed a friend and he said it made sense either way so so be it. I added the opacity this way:

Quote:
.iconz > img {
position: absolute;
top: 47%;
opacity: .5;
}

50% opacity works in Firefox but not Chrome or IE9. emptied cache and restarted browser and still didn't work. Also, in IE the entire script is very slow to load making the arrows hard to use...maybe you want to try on IE and see what happens.

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Wed, 2012-09-05 21:55

It's working...emptied the cache and restarted again and opacity is now 50% ;-)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-09-05 21:56

works across all browsers Clear your caches(webkit hold shift while refreshing) - no apparent opacity in IE9 (I no longer test below 9) Still does not look bad in IE9 at full opacity.

-s
All New jQuery Minislideshow for G2/G3

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-09-05 21:57

top: 47%; worked well with my shorter arrows, you may want to adjust to get a better center.

-s
All New jQuery Minislideshow for G2/G3

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Wed, 2012-09-05 22:02

I noticed that it's slightly off center I'll play with it...I stopped trying to design for IE at all, my hope is it will vanish soon enough. Used to be 85% of my visitors used IE, now it's 16% and dropping. Thanks so much for your help Supr. I think we have a solid contribution here for people who want this type of nav feature.

 
ichthyous

Joined: 2006-06-16
Posts: 324
Posted: Thu, 2012-09-06 14:02

In testing the pages with Google Page Speed I would also recommend the following:

1) Switch to the minifed version of jquery, it's 32kb vs. 132kb:

Quote:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>

2) Load the script at the end of the page, not at the top

Thanks!