forum.coppermine-gallery.net

Support => cpg1.5 plugins => cpg1.5.x Support => cpg1.5 plugin contributions => Topic started by: Αndré on November 30, 2010, 06:12:09 pm

Title: Picture navigation plugin for cpg1.5.x
Post by: Αndré on November 30, 2010, 06:12:09 pm
If you install this plugin you can go to the prev/next image by clicking on the appropriate area of next to the image. If a full-sized picture exists, you can access it by clicking in the middle of the picture. The mouse cursor will change its icon so you can easily see what will happen when you click.

It's probably a great plugin if you have visitors with MIDs or smart phones, because your gallery now has much bigger areas where the visitor can touch/click.


Note: if you're also using the Panorama Viewer plugin, move this plugin below the Panorama Viewer plugin in the plugin manager. Otherwise it won't work on 360° panoramas.

Note: if the panorama viewer plugin is installed, the buttons use a fixed width of 50px. Otherwise they'll use as much space as possible.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: hanzon2010 on December 15, 2010, 03:16:44 pm
Thanks for the effort, I love the concept.   It is a more pleasant experience to move from one image to the next or previous.  Unfortunately, I wish it was limited to the screen area where the picture is.  As it is, on my Rainy Day theme, all other clickable options are disabled, like "Return To Start", "Skip To End", "Add To Favorites", "SlideShow", etc. 
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on December 15, 2010, 03:29:33 pm
Unfortunately, I wish it was limited to the screen area where the picture is.
I thought it is? Maybe it just works as expected because I developed that plugin while I have installed many others. Can you please post a link to your gallery where I can see what happens? Thanks.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: hanzon2010 on December 15, 2010, 03:46:28 pm
I just re-enabled the plugin, you can check it out at my gallery below.  I do not use intermediate images, but direct to full-size.  I use Chrome.

On the 1st page, the whole rightmost side of the screen is affected.  On the Next page and so on, it takes over both left and right sides ...

http://www.soundscapehifi.com/client-systems/displayimage.php?album=14&pid=217#top_display_media


Thanks

Title: Re: Picture navigation plugin for cpg1.5.x
Post by: hanzon2010 on December 16, 2010, 02:57:24 am
I have disabled the plugin again as it is on a live gallery, just let me know if you need it re-enabled again, thanks.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on December 16, 2010, 09:12:16 am
Confirmed. Works as expected when the annotate plugin is installed. I'll fix that and release a new version asap.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on December 16, 2010, 10:50:30 am
Please try again version 1.2 (attached to initial post).
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: hanzon2010 on December 16, 2010, 12:21:50 pm
Perfect !  Thanks a lot, lovely plugin ...
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: nickelas on January 04, 2011, 12:13:14 pm
Thanks, looks great on FF. But on IE I get the four arrows for cursor
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on January 04, 2011, 12:26:21 pm
Seems that IE doesn't allow png files as cursor (you can test that here (http://www.css4you.de/example/cursor.html)). I haven't included own graphics, but use the default arrows from Coppermine's images directory. That's why I just used some system default cursors as fallback. This could of course be fixed, but I just recognized that you cannot click on the div elements in IE, but just on the small arrows (which is not intended). Maybe I'll release a new version in the next time.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: bigdrago on January 10, 2011, 12:57:38 am
It's looking good in Firefox :)  But not in IE :(
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on January 19, 2011, 03:12:18 pm
you cannot click on the div elements in IE, but just on the small arrows (which is not intended).
I had no luck to fix that issue. Maybe someone can help me to fix it for IE?

The code is quite simple:
Code: [Select]
    $buttons = '';
    if ($prev_tgt != 'javascript:;') {
        $buttons .= '<div onclick="window.location.href=\''.$prev_tgt.'\';" onmouseover="$(\'#pn_prev\').attr(\'src\',\'images/navbar/prev.png\');" onmouseout="$(\'#pn_prev\').attr(\'src\',\'images/navbar/prev_inactive.png\');" style="position: absolute; top: 0px; left: 0px; width: '.$width_button.'px; height: '.$CURRENT_PIC_DATA['pheight'].'px; text-align: left; cursor: url(images/navbar/prev.png), w-resize;"><div style="padding: '.($height/2-8).'px 10px;"><img id="pn_prev" src="images/navbar/prev_inactive.png" /></div></div>';
    }
    if ($fullsize_available_allowed) {
        $pic_html = str_replace('onclick="MM_openBrWindow', 'style = "cursor: url(images/icons/search.png), move;" onclick="MM_openBrWindow', $pic_html);
    }
    if ($next_tgt != 'javascript:;') {
        $buttons .= '<div onclick="window.location.href=\''.$next_tgt.'\';" onmouseover="$(\'#pn_next\').attr(\'src\',\'images/navbar/next.png\');" onmouseout="$(\'#pn_next\').attr(\'src\',\'images/navbar/next_inactive.png\');" style="position: absolute; top: 0px; right: 0px; width: '.$width_button.'px; height: '.$CURRENT_PIC_DATA['pheight'].'px; text-align: right; cursor: url(images/navbar/next.png), e-resize;"><div style="padding: '.($height/2-8).'px 10px;"><img id="pn_next" src="images/navbar/next_inactive.png" /></div></div>';
    }
which mainly adds
Code: [Select]
<div onclick="..."> <!-- big div which is as height as the picture and about 1/3 or 1/4 as width as the picture - you can click on the whole div to load the next/prev image  -->
  <div>             <!-- a small div to set the position of the embedded image -->
    <img />         <!-- the little arrow image -->
  </div>
</div>
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on May 20, 2011, 03:11:47 pm
Version 1.3 (attached to initial post) improves the compatibility with the Panorama Viewer plugin and also fixes some minor issues.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Mikaelft on May 21, 2011, 12:35:19 pm
The "arrow" displayes to early in Firefox 4.
The mouse-arrow don't work in IE

http://www.nordmoregatebilklubb.com/bilder/displayimage.php?album=190&pid=6644#top_display_media
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on May 21, 2011, 02:13:09 pm
The "arrow" displayes to early in Firefox 4.
Please elaborate. It displays exactly as expected imo.


The mouse-arrow don't work in IE
I had no luck to fix that issue. Maybe someone can help me to fix it for IE?
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Mikaelft on May 21, 2011, 02:51:14 pm
Look at the picture
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on May 21, 2011, 04:12:06 pm
Works exactly as expected.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: mitko on October 06, 2011, 09:37:40 pm
Dear Andre!
Question re to this plugin.
I have found that arrows left and right are working not only in the image area but also below in the file information section at the same level as they are working in the image. You can see this here e.g. http://www.lightphotos.net/photos/displayimage.php?album=8&pid=42 just move the mouse left-right in the file descripton part below the image.
Is this bug or feature?
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: mitko on October 06, 2011, 09:39:37 pm
may be this link better to reproduce the problem http://www.lightphotos.net/photos/displayimage.php?album=32&pid=131 cause previous one was first photo in album
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on October 07, 2011, 10:49:25 am
That's a bug. The div area uses the height of the full-sized picture instead of the height of the intermediate-sized version. I also recognized some issues when using this plugin and the panorama viewer plugin when you look at 360° panoramas. So I'll try to fix both issues and release a new version asap.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on October 07, 2011, 11:49:25 am
Version 1.4 attached to initial post.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: mitko on October 07, 2011, 11:58:43 am
Confirmed, Andre, in ver.1.4 everything is ok, many thanks for prompt help!
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: olli80 on November 24, 2011, 01:53:05 pm
I dont know if i´m right here but i have a feature suggestion for this plugin.

Maybe you can add the function to go next picture instead of closing the window?
This should only be added to the full-screen photo size (the biggest one)..........
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on November 24, 2011, 02:00:19 pm
That won't work if the next file is no picture, as there's nothing to display in that case. If you want a full-size navigation you should try the LightBox plugin or the EnlargeIt! plugin.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on July 18, 2012, 03:21:54 pm
I've re-written the plugin completely in JavaScript (version 2.0 is attached to the initial post). The prev/next buttons are now displayed next to the picture and also for non-picture files. If the panorama viewer plugin is installed, the buttons use a fixed width of 50px. Otherwise they'll use as much space as possible.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: André Müller on February 23, 2013, 08:24:02 pm
Dear all,

after installing version 2.0 of this plugin, I experience problems with the slideshow function. The slideshow works as expected with the old version, as well as with the plugin deactivated. Does anyone experience similar problems?

Gallery: www.fotowald.de
CPG 1.5.22


Thanks for any help.

Cheers,
André
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on February 25, 2013, 09:51:05 am
Version 2.1 (attached to initial post) fixes the slideshow issue. Thanks for the report.
Title: Re: Re: Picture navigation plugin for cpg1.5.x
Post by: André Müller on February 25, 2013, 10:19:48 am
Version 2.1 (attached to initial post) fixes the slideshow issue. Thanks for the report.
Thanks a lot. Works as expected now.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: pols1337 on March 09, 2013, 05:28:05 am
Thanks for the v2.1 update  :)
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: allvip on October 17, 2013, 07:46:17 pm
how can I use my own images for this plugin?

what should I edit in the plugin files?
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on October 31, 2013, 10:58:51 am
Open picture_navigation.js and replace the content of the variables
Code: [Select]
        icon_prev = $('.navmenu_pic img[src*=prev]').parent().html().match(/src="(.*?)"/);
        icon_prev = icon_prev[1];
        icon_prev_inactive = icon_prev.replace('prev', 'prev_inactive');
and
Code: [Select]
        icon_next = $('.navmenu_pic img[src*=next]').parent().html().match(/src="(.*?)"/);
        icon_next = icon_next[1];
        icon_next_inactive = icon_next.replace('next', 'next_inactive');
with valid paths of your images.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: allvip on February 02, 2014, 02:01:16 am
OK.Thanks
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: allvip on February 02, 2014, 02:02:52 am
I just don't know with what to replace $('.navmenu_pic img[src*=start]').parent().html().match(/src="(.*?)"/);
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on February 03, 2014, 12:13:27 pm
You need to hardcode it like this:
Code: [Select]
icon_prev = 'themes/xxx/foo/bar1.png';
icon_prev_inactive = 'themes/xxx/foo/bar2.png';
icon_next = 'themes/xxx/foo/bar3.png';
icon_next_inactive = 'themes/xxx/foo/bar4.png';
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: allvip on February 03, 2014, 04:26:18 pm
I see the word foo all over the internet in web tutorials.

What does that mean anyway?
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on February 03, 2014, 04:31:40 pm
That's really an off-topic question. Answer here: http://en.wikipedia.org/wiki/Foobar
Title: Re: Theme 'mobile_light' for cpg1.5.x
Post by: Αndré on September 02, 2015, 04:20:15 pm
Is it possible to disable in the theme particular plugin and keep it working in another theme?

That may be possible, but it's way easier to add a check in the picture navigation plugin. Open plugins/picture_navigation/codebase.php, find
Code: [Select]
$superCage = Inspekt::makeSuperCage();and above, add
Code: [Select]
    global $CONFIG;
    if ($CONFIG['theme'] == 'mobile_light') {
        return;
    }


PS: this question would have been better placed in the picture navigation announcement thread ;)
Title: Re: Re: Theme 'mobile_light' for cpg1.5.x
Post by: mitko on September 02, 2015, 10:28:40 pm
Andre, there is a problem, if i add what you suggest - the picture also dissappears :)
Title: Re: Re: Theme 'mobile_light' for cpg1.5.x
Post by: Αndré on September 02, 2015, 10:31:35 pm
That doesn't make sense. Please provide a list which plugins you have installed.
Title: Re: Re: Theme 'mobile_light' for cpg1.5.x
Post by: mitko on September 02, 2015, 10:37:18 pm
Tried different plug-in orders - no difference. You can check now accessing from mobile, i still keep the changes. 
List of plugins:
autorotate
bbcode_control
CopperRank
description_metas
dupechecker
easy_rss
email_comments
fav_button
file_replacer
filename2tooltip
geodata
hot_pictures
html5slideshow
html5upload
imsharpen
keyboard_navigation
keywords_add
onlinestats
pic_download_link
picture_navigation
recaptcha
sitemap_generator
social_sharing
socialshare
theme_switch
Title: Re: Re: Theme 'mobile_light' for cpg1.5.x
Post by: Αndré on September 03, 2015, 11:11:57 am
Another approach. Please open plugins/picture_navigation/codebase.php, find
Code: [Select]
    if (!$superCage->get->keyExists('slideshow')) {and replace with
Code: [Select]
    global $CONFIG;
    if (!$superCage->get->keyExists('slideshow') && $CONFIG['theme'] != 'mobile_light') {
Title: Re: Re: Theme 'mobile_light' for cpg1.5.x
Post by: mitko on September 03, 2015, 11:41:26 am
Seems i found the problem, i didn't use the latest version of the plugin. Really sorry, shame on me  :-[
Now everything is working fine and i also can switch it off if necessary for this theme. Thank you Andre as usial for your kind support!
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: mitko on September 03, 2015, 12:00:24 pm
Problem with the plugin on the standard theme. See the pictures
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on September 03, 2015, 12:09:21 pm
Do you get the issue with the unmodified plugin or with one of my last 2 modifications?
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: mitko on September 03, 2015, 12:21:34 pm
Unmodified.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on September 03, 2015, 12:31:32 pm
Works as expected in my gallery, but I haven't installed that amount of plugins like you. Please temporary uninstall your plugins one by one and check when it starts to work as expected to find the culprit.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: mitko on September 03, 2015, 03:50:37 pm
Andre, disabled all plugins except this - same story. Could this be a reason that i slightly changed the single-image page (moved custom field and title above the image) plus some other minor things.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on September 03, 2015, 03:56:29 pm
Please test with an unmodified theme, like curve or water_drop.

This code adds the buttons next to the image:
Code: [Select]
$('td.display_media').html($('td.display_media').html().replace('<tr>', '<tr>' + btn_prev).replace('</tr>', btn_next + '</tr>'));
Not sure how it should delete anything, as it just adds code. If you have a look at the HTML code of your intermediate-sized view (the browsers' built-in code viewer always display the actual HTML code, without any JavaScript processing), the picture should be there, as the whole picture navigation plugin is written in JavaScript.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: mitko on September 03, 2015, 04:02:09 pm
I have a feeling that then the page loads the picture appears for the half-second and then disappears and instead i have double tittle and custom field. Strange behavior.
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on September 03, 2015, 04:06:14 pm
You have two td items with class "display_media". I assume this is the culprit. Try to remove that class from
Code: [Select]
                                        <td class="display_media" style="word-wrap: break-word"><h1 class="pic_title">
                                                Adriatic Sea / Golfo di Trieste / Monfalcone / Entrance Channel Lights on the naval chart provided by the Marina Militare Italiano - servizio Fari<br />Chart
                                        </h1></td>
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: mitko on September 03, 2015, 04:30:29 pm
Removed. Picture is showing now, but plugin doesn't work (it is activated - you can have a look)
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: Αndré on September 03, 2015, 04:36:35 pm
You removed the class from the wrong element ;)
Title: Re: Picture navigation plugin for cpg1.5.x
Post by: mitko on September 03, 2015, 04:41:13 pm
Ahhh, silly me :) Thanks Andre, all is okay now!