Module: Thumb navigator - 1.8

snackmaster
snackmaster's picture

Joined: 2005-11-20
Posts: 135
Posted: Mon, 2011-04-11 12:56

Thanks Serge. I found that I was working off outdated Wind base template. Updated and got these two items, otherwise a code compare shows these, my CSS & JS, my header and footer.

<!-- LOOKING FOR YOUR JAVASCRIPT? It's all been combined into the link below -->
<?= $theme->get_combined("script") ?>
<!-- LOOKING FOR YOUR CSS? It's all been combined into the link below -->
<?= $theme->get_combined("css") ?>

I've tried switching to Wind and Grey Dragon, clearing cache trying different browsers etc but have the same issue (IE9, Chrome 10.x, FF 4.0). Something up on my end for sure but strangely only seems to affect this one module. I've copied the styles into my CSS for now for a MacGyver fix.

 
snackmaster
snackmaster's picture

Joined: 2005-11-20
Posts: 135
Posted: Wed, 2011-04-13 01:34

Working now, not sure what fixed it...

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Wed, 2011-04-13 02:54

caching

 
raidscsi

Joined: 2011-04-26
Posts: 3
Posted: Tue, 2011-04-26 20:21

I cant enable the sidebar block module, I check the box to enable it and click update, and it refreshes the page with the module still disabled.

Sidebar block: Adds thumb navigation option in Photo View.
Version 1.7

Adds support for FancyBox Media Viewer.
Version 1.5

Adds keyboard navigation to the gallery.
Version 1.9

Grey Dragon Theme - 3.0.6

Gallery -
Version: 3.0.1 (Menlo Park)
Albums: 13
Photos: 432

Platform information
Host name: LPA1137
Operating system: Linux 2.6.32-21-generic-pae
Apache: Apache/2.2.14 (Ubuntu)
PHP: 5.3.2-1ubuntu4.7
MySQL: 5.1.41-3ubuntu12.10
Server load: 0.16 0.08 0.04
Graphics toolkit: imagemagick

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Tue, 2011-04-26 20:24

most likely you have uploaded module incorrectly
make sure that there is only one level of folder with the name "thumbnav"

 
Ray64

Joined: 2011-05-24
Posts: 6
Posted: Tue, 2011-05-24 02:20

I use a modified version of Thumbnav 1.7 on my site which maintains the aspect ratio of the thumbnails. The thumbs are centered on a black background with thinner gridlines between blocks.

screenshot:
[img]http://i.imgur.com/83Zen.jpg[/img]

Below are the code changes if anyone is interested.

modified thumbnav.css:

/* Thumb Navigator ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

.g-thumbnav { text-align: center; padding: 0; }
.g-navthumb { background: #000; filter:alpha(opacity=55); opacity:.55; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=55)"; }

.g-thumbnav ul { display: inline-block; padding: 0; margin: 0 0.5em; }
.g-thumbnav li { width: 60px; height: 60px; float: left; border: transparent 1px solid;}
.g-thumbnav li.g-current { border-color: #ddd; }

.g-thumbnav li.g-current .g-navthumb,
.g-navthumb:hover { background: #fff; filter:alpha(opacity=100); opacity:1; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; }

diff of changes to thumbnav_block.php:

--- old_thumbnav_block.php      2011-05-23 20:36:49.000000000 -0500
+++ thumbnav_block.php  2011-05-23 20:36:59.000000000 -0500
@@ -45,13 +45,38 @@

           for ($i = $first; $i <= $last; $i++):
             if ($i == $current):
-              $content .= '<li class="g-current">';
+              $content .= '<li class="g-current" style="margin-bottom:0px;">';
             else:
-              $content .= '<li>';
+              $content .= '<li style="margin-bottom:0px;">';
+              $content .= '<a href="' . $siblings[$i - 1]->url() . '" title="' . html::purify($siblings[$i - 1]->title) . '" target="_self">';
             endif;
-            $content .= '<a href="' . $siblings[$i - 1]->url() . '" title="' . html::purify($siblings[$i - 1]->title) . '" target="_self">';
-            $content .= $siblings[$i - 1]->thumb_img(array("class" => "g-navthumb"), 60);
-            $content .= '</a></li>';
+
+            list ($height, $width) = $siblings[$i - 1]->scale_dimensions(60);
+
+            if ($height < 60):
+              $margin_top = intval((60 - $height) / 2);
+              $height = 60 - (2 * $margin_top);
+              $extra_attrs["style"] = "padding-top: {$margin_top}px; padding-bottom: {$margin_top}px;";
+            elseif ($width < 60):
+              $margin_left = intval((60 - $width) / 2);
+              $width = 60 - (2 * $margin_left);
+              $extra_attrs["style"] = "padding-left: {$margin_left}px; padding-right: {$margin_left}px;";
+            endif;
+
+            $attrs = array_merge($extra_attrs,
+                array(
+                      "class" => "g-navthumb",
+                      "src" => $siblings[$i - 1]->thumb_url(),
+                      "alt" => $siblings[$i - 1]->title,
+                      "width" => $width,
+                      "height" => $height)
+                );
+
+            $content .= '<img' . html::attributes($attrs) . '/>';
+            if ($i != $current):
+              $content .= '</a>';
+           endif;
+            $content .= '</li>';
           endfor;
         endif;
 
psycoxl

Joined: 2011-08-06
Posts: 1
Posted: Sat, 2011-08-06 13:50

I can't get it to work. I'm new to gallery but i've followed the steps indicated. I've installed : fancybox, Thumb Navigator, shadowbox and Kbd Navigation activated them in de admin module. But nothing happens. Deactivated them en reactivated them didn't help. Please can someone help

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Sat, 2011-08-06 17:38

Is best to start one by one
Pick one module, activate it
What theme do you use?
Are modules unpacked in right location?

 
juliomgm

Joined: 2011-08-09
Posts: 4
Posted: Tue, 2011-08-09 14:43

Hi
I am also new in gallery and i am trying to activate Thumb navigator.

I have intaled : Thumbnav, fancybox, shadowbox, kbd_nav
All modules are active but i cant get it to work.

I have a clean install of gallery 3.

My theme is the basic one.
Also i tryed the Greydragon and nothing.

I dont now if it needs to be there but in the admin - Manage sidebar i dont have any option to use Thumbnav.

Thanks.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Tue, 2011-08-09 16:25

thumb navigator is only visible in Photo page
you should see it as available block in Manage Sidebar. If not it means that problem is with upload
module folder goes into "modules" folder of the gallery and you should see something like this

gallery or gallery3
- modules
-- thumbnav
--- module.info

if your tree is any different below gallery, it means you have uploaded it wrong

 
juliomgm

Joined: 2011-08-09
Posts: 4
Posted: Wed, 2011-08-10 10:01
 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Wed, 2011-08-10 14:20

I do not think it is...
clues:
* no sidebar module called "Navigator" mentioned
* ThumbNav module is first in the list (image 2)
* Folder name is in cammel case, try renaming it to lower case. (image 3). Any unicode chars in the folder name since you created it by hand?

I will suggest the following:
* download module's ZIP
* delete your current folder for Thumbnav
* unpack it. since it is windows enviroment, make sure that no new folders created by unzip process on its own. you would notice that "thumbnav" module is there by default.
* copy folder as is.
* activate it
* check if "Navigator" sidebar module is now present
* ...

 
juliomgm

Joined: 2011-08-09
Posts: 4
Posted: Wed, 2011-08-10 17:25

Thanks it was the cammel case...

Now it works.

 
grubernd
grubernd's picture

Joined: 2011-11-11
Posts: 4
Posted: Fri, 2011-11-11 09:14

thank you for this module. nice.

i have found one bug:

thumbnav does not honor the user-rights to folders, meaning it reserves a slot for a folder, has an active link to it, shows alt/title but no thumb-image. in my intended usage this is very disturbing because i want my gallery mostly folder-free, but would use one or two folders accessable only to me for administration purposes. take a look at my test-install to see what i mean:

http://bilder.grubernd.at

on the same topic i would really like to have an option in the admin-section to hide folders from thumbnav altogether.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Fri, 2011-11-11 16:42

I simply loop through items for the page
security should have been applied already
will need to check
on the option side... will keep it in mind :)

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Fri, 2011-11-11 20:33

@grubernd: Ok, there it goes
this is unofficial release for you to test
let me know if it working and I will publish it

Edit: attachment removed

 
grubernd
grubernd's picture

Joined: 2011-11-11
Posts: 4
Posted: Fri, 2011-11-11 17:48

you rock! it works. almost.. ;)

it leaves out folders (very cool) but gets the thumb-count wrong.
so we get "empty slots" or missing thumbs or how i should call it..
although with a little weird math.. ;)

1 folder = 1 thumb missing
2 folders = 2 missing
but:
5 folders = 4 missing (???)
and:
it always shows a minimum of two thumbs, no matter how many folders, or how high or low the settings in the admin-area are.

and: the tickbox "Hide albums in list" in the admin area doesnt change what is displayed. probably on purpose for the test version.

PS: i just found out that hidden folders are also part of the paginator in the greydragon theme,
which i understand is your masterpiece.. might want to look into that..

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Fri, 2011-11-11 20:00

I see it, you are talking about paging... will check on that
Pagination in the theme itself, interesting did not see it like that
I usually put all protected items in the end of the list, so it just become irrelevant :) will check

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Tue, 2012-05-15 20:48

Ok, let's try next iteration

About page paginator, this is more complex. I would have to think about this.

 
grubernd
grubernd's picture

Joined: 2011-11-11
Posts: 4
Posted: Fri, 2011-11-11 23:08

i think you did it. awesome!! thanks a lot for work, highly appreciated.

i'll follow up on the paginator in the correct thread of the theme.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Wed, 2012-01-11 21:36

Version 1.8 is up

  • ADMIN: Added option to hide albums from the list
  • Module info adjusted to match new format in G3 3.0.2+
  • Fix: Added translation logic for help info
  • Fix: Added check for security access to the photo
  • Added support for modules which "hack" the item logic - instead of using access functionality, changed to use ->viewable()
 
Goulou

Joined: 2008-03-17
Posts: 1
Posted: Sun, 2012-03-18 10:45

Is there any hope to seeing the feature suggested (and with patch!) in comment http://gallery.menalto.com/node/95116?page=1#comment-374741 ?
My gallery has many portraits, and the thumbbar would be very useful, but with all the faces resized, it is quite odd...

Goulou.

 
eeldivad

Joined: 2005-09-19
Posts: 42
Posted: Mon, 2012-05-14 21:16

would love to see pagination, or at least just arrows to go to next or previous page of thumbs.

also an option to maintain aspect ratio would be nice. awesome module by the way!

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Mon, 2012-05-14 21:33
eeldivad wrote:
would love to see pagination, or at least just arrows to go to next or previous page of thumbs.

also an option to maintain aspect ratio would be nice. awesome module by the way!

not sure what you mean.
this is pure kbd based functionality, no visual aspects

Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter

 
eeldivad

Joined: 2005-09-19
Posts: 42
Posted: Mon, 2012-05-14 21:48

the thumb navigator allows us to display a set of thumbs on the photo page so that we can navigate by clicking on the thumbs. the default number of thumbs to display is 9 so its visual.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Mon, 2012-05-14 22:19
eeldivad wrote:
the thumb navigator allows us to display a set of thumbs on the photo page so that we can navigate by clicking on the thumbs. the default number of thumbs to display is 9 so its visual.

argh, brain freeze... mixed with kbd-navigator module

no, I do not plan to support pagination yet. I know what you mean though
about aspect ratio, it is possible, I just did not have time to implement it.
but there is a hack mentioned above - http://gallery.menalto.com/node/95116?page=1#comment-374741

Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter

 
eeldivad

Joined: 2005-09-19
Posts: 42
Posted: Mon, 2012-05-14 22:23

sweet! thx man!

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Sun, 2012-06-17 06:12

Can I display thumbnails at "re-size thumbnails" instead of "square thumbnails"?

Thanks.

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Sun, 2012-06-17 06:22

And an additional question: How to display this block under photo?

Thanks again.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Sun, 2012-06-17 19:59
bigu_c wrote:
Can I display thumbnails at "re-size thumbnails" instead of "square thumbnails"?

there is no autoresize option but if you scroll up you will see hack to use actual image ratio

Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Sun, 2012-06-17 20:00
bigu_c wrote:
And an additional question: How to display this block under photo?

you mean like with navcarusel module?

Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Mon, 2012-06-18 02:23
Serge D wrote:
bigu_c wrote:
Can I display thumbnails at "re-size thumbnails" instead of "square thumbnails"?

there is no autoresize option but if you scroll up you will see hack to use actual image ratio

Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter

Can you tell me how to do this?

Quote:
you mean like with navcarusel module?

Yes.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Mon, 2012-06-18 18:08
bigu_c wrote:
Serge D wrote:
bigu_c wrote:
Can I display thumbnails at "re-size thumbnails" instead of "square thumbnails"?

there is no autoresize option but if you scroll up you will see hack to use actual image ratio

Can you tell me how to do this?

Please find details here - http://gallery.menalto.com/node/95116?page=1#comment-374741

bigu_c wrote:
Quote:
you mean like with navcarusel module?

Yes.

You can use that module instead and not install thumb nav

Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Tue, 2012-06-19 07:09

Thanks for that tip.

Here is why I want to use your module: http://gallery.menalto.com/node/107076

Thanks.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Wed, 2012-06-20 21:22

For the aspect ratio suggestion:

please try it here - http://photo.dragonsoft.us/california/yosemite/2007_04200038
Suggestions?

@bugu_c: not sure about navcarousel expectations. As Dave said you need to choose which module you want to use - one of the carousel's or thumb navigator. I do not support paging

Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter

 
eeldivad

Joined: 2005-09-19
Posts: 42
Posted: Wed, 2012-06-20 21:48

perfect! please let us know when next update is avaialable.

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Mon, 2012-06-25 14:59

I copied thumbnav_block.html.php to /themes/greydragon/views

And put this code to photo.html.php

<? include("thumbnav_block.html.php"); ?>

But not working :(

Could you please how to do this?

Thanks.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Tue, 2012-06-26 00:22
bigu_c wrote:
I copied thumbnav_block.html.php to /themes/greydragon/views

And put this code to photo.html.php

<? include("thumbnav_block.html.php"); ?>

But not working :(

Could you please how to do this?

Thanks.

it will not work like that, sorry.
still trying to understand what you are trying to achieve

Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Tue, 2012-07-03 10:08

Hi,

My sidebar block currently like this:
[img]http://gallery.menalto.com/files/1_24.jpg[/img]

How to change to like this?
[img]http://gallery.menalto.com/files/2_14.jpg[/img]

(Display thumbnails in full width of sidebar?!?)

Thanks.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Tue, 2012-07-03 17:17
bigu_c wrote:
How to change to like this?

(Display thumbnails in full width of sidebar?!?)

Thanks.

you need to make CSS changes (probably adding it into custom.css, if you use GD)

Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Tue, 2012-07-03 17:26

I'm using GD but I don't know what I need to change.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Sat, 2012-07-07 05:20
bigu_c wrote:
I'm using GD but I don't know what I need to change.

url needed to suggest precise changes

Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Sat, 2012-07-07 05:25

My URL

Thanks.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Mon, 2012-07-09 17:43
bigu_c wrote:
My URL

Closest I've got after quick look - add the following in your custom.css

#g-thumbnav-block .g-block-content, #g-thumbnav-block-inline .g-block-content { width: 230px; }
.g-navthumb { width: 112px; height: 112px; }

Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Wed, 2012-07-11 11:02

Hi Serge,

Thanks for your code, it works well here :)

But its seem this: http://gallery.menalto.com/node/95116?page=1#comment-374741 not working with 1.8?

Any idea? Are you planning make an options on Admin for this?

Thank you so much.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Wed, 2012-07-11 16:52

I am looking to introduce this as an option

Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Mon, 2012-10-08 17:42

Hi,

How can I display this block in somewhere I want?

Thanks.

 
Ray64

Joined: 2011-05-24
Posts: 6
Posted: Mon, 2012-12-31 07:07
bigu_c wrote:
But its seem this: http://gallery.menalto.com/node/95116?page=1#comment-374741 not working with 1.8?

Attached are the changes I made to integrate my customizations with Thumbnav 1.8:

  • same modified thumbnav.css as for 1.7
  • diff of changes to thumbnav_block.php