module for thumb navigation like pg theme

dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Wed, 2005-12-07 17:51

Its been requested a few times and the pgtheme does incorporate a nice microthumbnail on the photopages, how hard would it be to implement this feature as a module that could be used in other themes, ive found the code he uses to do it but I have no idea how to make a module out of it. I think this feature would be great addition to be able to add to other themes.

 
carmosin

Joined: 2003-11-18
Posts: 15
Posted: Sat, 2006-02-25 22:17

What I did was this:

I've copied the theme.js and the navigatorThumbs.tpl to the directory of the theme I use, I've modified the code in navigatorThumbs.tpl slightly to make the bar fit with my theme and then I've made a reference to it in photo.tpl. I don't know how to make a module out of this though, I'm sorry.

/Jenny

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Sun, 2006-02-26 18:30

nice that sounds like a simple solution, I think I can handle modifying the tpl to look proper, can you tell me what code you used to reference it in photo.tpl?

thanks:)

 
carmosin

Joined: 2003-11-18
Posts: 15
Posted: Mon, 2006-02-27 18:39

* Copy PGtheme/theme.js to the root folder of your theme.
* Copy PGtheme/templates/navigatorThumbs.tpl to yourtheme/templates/local/navigatorThumbs.tpl
* Copy yourtheme/templates/Photo.tpl to yourtheme/templates/local/Photo.tpl
* In photo.tpl, right where you want the bar to show up, put:

{g->theme include="navigatorThumbs.tpl"}

to include the navigatorThumbs.tpl.
*Change yourtheme/templates/local/navigatorThumbs to your liking.

I assign constants to the variables in the beginning of navigatorThumbs.tpl like so:

{assign var="thumbsSize" value="62"}

I once changed the code around so that I could access the variables through the admin interface, but it broke during an upgrade and I haven't bothered with fixing it again. I think you have to go into theme.inc for your theme to enable this, (if I remember correctly). If you'd like to do this, just compare theme.inc in PGtheme with the theme.inc that you have for your theme and you should get the general idea.

I know this isn't a pretty hack, but it works for me ;)

/Jenny

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Thu, 2006-03-02 16:57

worked great thanks, maybe ill post this as a mini theme

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Mon, 2006-03-06 05:37

So Ive been working with this but have just noticed that It only displays a maximum of 7 thumbnails for some reason, any idea why its doing that? and not displaying all the thumbs per album? Ive tried editing several parts of the code yet it always shows only 7.

 
azn_oohwee

Joined: 2006-03-06
Posts: 24
Posted: Tue, 2006-03-07 20:57

How would one go about putting this in the sidebar?

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Tue, 2006-03-07 23:50

I havent tried this but most likely putting

{g->theme include="navigatorThumbs.tpl"}

into your sidebar.tpl