[map module] Album Thumb as link to Map

DavidF

Joined: 2006-02-27
Posts: 11
Posted: Thu, 2006-03-09 01:33

In Larry's gallery, http://tautologous.com/gallery2/main.php (using map THEME), there is an album thumb that links to the map.

Is there an easy way to implement this in the Map Module?

David.

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Thu, 2006-03-09 04:11

The latest version of the module has this in the theme settings.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2006-03-09 04:18

I expect what you want is not something to implement in The Map Module
itself; but rather, in Gallery. I think, maybe, The Link Item Module
would be what you would look into. I further believe this module is
for Gallery 2.1 only, so you would need to go to that version (maybe it's
included as a standard module - I have not looked as yet). Read about
it in THIS thread.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-03-09 04:53

Actually I have tricked my own gallery into doing just that :-)

Here is what I have done:

- Created a new "album"
- When prompted for the name I entered "Map" (you can enter whatever)
- Then I assign a custom thumbnail to this album (using a screenshot of my actual map and resized)
- Then I activated the rule provided with the module in rewrite which translate /gallery2/v/Map into /gallery2/main.php?g2_view=map.ShowMap

If you name the "album" folder something else, you have to change the rule (which really takes only a few sec)

The current rule point to Map/%Group% and you can rename that to GoogleMap/%Group% or Whatever/%Group%

it should work just fine ;)

See you
-------------------------
The Termite :-)

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2006-03-09 05:43

The Amazing Termite strikes again. :-)
It will use a default map won't it? In other words,
it will not filter on just that album?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-03-09 14:31

Yep that is true :-)

If you wish for it to filter on a album it's a bit different, you would have to go back to the older solution I had in place which basicaly mean writting the rewrite rule manually in .htaccess

It's not too hard but it requires a bit of thinking :-)

The idea is to rewrite a Map/albumname -> /gallery2/main.php?g2_view=map.ShowMap&g2_album=%albumname%

after that you can just create subalbum of the Map folder that would be fake albums as well with the right name and it would filter for you :-)

After re-reading this it seems confusing but in fact it's pretty straight forward :):):):)

-------------------------
The Termite :-)

 
DavidF

Joined: 2006-02-27
Posts: 11
Posted: Thu, 2006-03-09 15:12

This is exactly what I wanted to do. Thanks for the quick and clear response!

I started out hacking together my own Google Maps app that does the basics of the Map Module, but after looking at the Module, it is exactly what I need (and more).

David.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-03-09 15:32

Glad this can help you out :)

-------------------------
The Termite :-)

 
DavidF

Joined: 2006-02-27
Posts: 11
Posted: Thu, 2006-03-09 19:45

So, I am now trying to implement your suggestions.

I have created an album named Map. I have activated the rule under the Google Map line in URL Rewrite, the one with 'Map/%Group%' in the box.

Is this all that I need to do? Please forgive my ignorance on the Rewrite Module, what specifically do I need to edit on the Rewrite page to accomplish what you said below?

'- Then I activated the rule provided with the module in rewrite which translate /gallery2/v/Map into /gallery2/main.php?g2_view=map.ShowMap'

When I hit the link to the 'Map' album on the Gallery page, it just sends me into the empty album called 'Map'.

All help is greatly appreciated.

David.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Thu, 2006-03-09 20:54

OOOOooo yeah ....

The rule actually transform /gallery2/Map/ into /gallery2/main.php?g2_view=map.ShowMap :-)

So you do have to modify the .htaccess slightly mine looks like this:

RewriteCond %{THE_REQUEST} \ /gallery2/v/Map/(G{1}[0-9]+)*(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !main\.php
RewriteRule . /gallery2/main.php?g2_view=map.ShowMap&g2_Group=%1 [QSA,L]

That should do it :-)

-------------------------
The Termite :-)

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Wed, 2006-03-22 19:11

I was following this thread, I used the Link Item Module and the thumbnail module and it works fine.

 
oodi

Joined: 2006-03-28
Posts: 11
Posted: Fri, 2006-03-31 15:41

Maybe just having a a bad week, but I am not getting it.

I have a album with a bunch of photos, added all the coordinates using the "Google Map" tab for each item. Going to "View Album on a Map" shows me a nice map with a row of thumbnails on the top. Just what I want.

If I use mod_rewrite to send the album link to the map image it breaks all access to the pictures themselves. If I attempt to retrieve the resized or fullsized images it just redirects me back to the map. Based on my understanding of rewrite rules this isn't all unexpected. So I removed that rewrite rule

Next I used the LinkModule and created " Link to External URL:" with the URL to the Google Map. This works great, except I have this ugly chain link image, is there no way to stick a thumbnail in there instead of the link image? All I would need to do is hide the album with the actual images and all would be well.

Thanks,
Adi

 
oodi

Joined: 2006-03-28
Posts: 11
Posted: Fri, 2006-03-31 15:44
oodi wrote:
Next I used the LinkModule and created " Link to External URL:" with the URL to the Google Map. This works great, except I have this ugly chain link image, is there no way to stick a thumbnail in there instead of the link image? All I would need to do is hide the album with the actual images and all would be well.

Actually, the link way breaks the breadcrumb trail. No easy way to get back to the map via links, just the browsers back button.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2006-03-31 16:30
oodi wrote:
...except I have this ugly chain link image, is there no way to stick a thumbnail in there instead of the link image?...

Try 'item actions/edit link' and upload a custom thumbnail.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2006-03-31 16:40
oodi wrote:
Actually, the link way breaks the breadcrumb trail. No easy way to get back to the map via links, just the browsers back button.

Back to the map? Do you mean that you assigned coordinates to
the "link" and it appears on the map? In any case, even going
to an album and clicking "View Album on a Map" will display a
map where the breadcrumb trail is truncated to the top level
of the gallery. In other words, the link item is not breaking
the trail. Maybe something can be done in The Map Module about
this; although, I don't know.

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Fri, 2006-03-31 16:56

If you dont have the upload custom thumbnail option in your settings, youll need to download that module, don't think its a part of minimal install.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2006-03-31 16:58
dotnature wrote:
If you dont have the upload custom thumbnail option in your settings, youll need to download that module, don't think its a part of minimal install.

Good point!

 
oodi

Joined: 2006-03-28
Posts: 11
Posted: Fri, 2006-03-31 20:58
galmoid wrote:
Back to the map? Do you mean that you assigned coordinates to the "link" and it appears on the map? In any case, even going to an album and clicking "View Album on a Map" will display a map where the breadcrumb trail is truncated to the top level of the gallery. In other words, the link item is not breaking the trail. Maybe something can be done in The Map Module about this; although, I don't know.

No, not like that. My map shows the map and above the map is the row of thumbnails. When I click on a marker or a thumbnail the marker expands to a larger thumbnail on the map. So far so good. If I now click on the image to get the resized image or fullsize image I get into the actual album that contains the images from my map. So the breadcrumb trail and all other links refer to the album and no longer the link that showed the map.

What I was hoping to accomplish is essentially an album that instead of showing thumbnail, shows the map with the thumbnail row above. If there is a way to make this happen, I'd love to hear about it!

dotnature wrote:
If you dont have the upload custom thumbnail option in your settings, youll need to download that module, don't think its a part of minimal install.

I installed the "Thumbnail Manager Module" and a link to upload a thumbnail now magically appeared on the "Edit Link" page.

Many thanks, while the link doesn't 100% provide what I had hoped it certainly works very well now. One cosmetic issue left is that on the matrix theme each album page has a greyish background, yet the link has not. I wonder if this can be changed?

Thanks,
Adi

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2006-03-31 22:03
oodi wrote:
...What I was hoping to accomplish is essentially an album that instead of showing thumbnail, shows the map with the thumbnail row above...

Please, I don't quite understand this.

oodi wrote:
...One cosmetic issue left is that on the matrix theme each album page has a greyish background, yet the link has not...

I created a link within an album and the background color of
the page completely encomapsses the thumbnail (the thumbnail
has a little arrow in the lower lefthand corner). I may be
missing your point here.

 
oodi

Joined: 2006-03-28
Posts: 11
Posted: Fri, 2006-03-31 23:19

I am not creating the link within an album. I have the link replacing the album. The album still exists but its permissions are such that only admin can see it.

If you go to any item (photo) from the map page, there is no link that takes you back to the map. Instead it takes you back to the album with all the thumbnails.

So what I was originally after is replacing the album with the map. Insted of having a page inside the album with all the thumbnails, 9 to a page, there is a single page with the map.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2006-03-31 23:33

Are you amenable to clicking on the thumbnail in the maps infowindow
and having a new window open with the specific item and all your
theme puts with it? If you leave that window be, go back to the
window with your map and click a different marker/thumbnail, have
that be sent to the same window. I this seems to, somewhat, be
acceptable, you might try one of the 'g' (gdefault, g2centered,
g3tabbed, etc) infowindow templates. Be aware the is a missing " ' "
(single quote) on a line in the 'g2default' template that will cause
your map no to display.

 
oodi

Joined: 2006-03-28
Posts: 11
Posted: Fri, 2006-03-31 23:54

This works quite well. Will have to play with that.

Yet another issue I noticed is the "Show Album on a Map" appears on every page. I thought setting it to "Dynamic" should only show the link if there are items that have coordinates. Yet, no matter which album I go to, I always get that link. Is there an option to turn it off? I could comment the relevant section in the source, but it would be nicer to have an option to only show it to album owner or simply turn it on and off like the "Export to GE link". Maybe a topic for a different thread?

Thanks for all the help! Things are certanly coming together.

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sat, 2006-04-01 00:26

Here is a LINK you need to know about... since
you're so full of great ideas. :-)

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Sat, 2006-04-01 02:10

If you want to change the grey thumbnail background or add borders or customize it, you can do so in your css by editing the #thumbs or .thumbbar.
I also will probably use the open in new window option for clicking on the infowindow image, It will most likely just open the actual photo not wrapped in the theme, maybe have a link to imageor album's actual page as an option. I prefer this because the map is somewhat slow to load going back and forth.

 
oodi

Joined: 2006-03-28
Posts: 11
Posted: Sat, 2006-04-01 02:55
dotnature wrote:
I also will probably use the open in new window option for clicking on the infowindow image, It will most likely just open the actual photo not wrapped in the theme, maybe have a link to imageor album's actual page as an option. I prefer this because the map is somewhat slow to load going back and forth.

I went through all availabe "Map InfoWindow Template" options. They all open the image wrapped in the theme. How would I go about opening it (the scaled version) in a new window just by itself?

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sat, 2006-04-01 03:14
oodi wrote:
I went through all availabe "Map InfoWindow Template" options. They all open the image wrapped in the theme. How would I go about opening it (the scaled version) in a new window just by itself?

You would need to modify the link in the infowindow and possibly use a module called directimage (or something similar) that permits to create links directly to a picture.

let me know if you need more precision :)

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Sat, 2006-04-01 05:05

when I have time Ill look into this maybe tomorrow

 
oodi

Joined: 2006-03-28
Posts: 11
Posted: Sat, 2006-04-01 05:12
oodi wrote:
Yet another issue I noticed is the "Show Album on a Map" appears on every page.

Attached are the changes I made to allow the "Show Album on a Map" to be turned off.

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Sat, 2006-04-01 05:42

nice thanks, I assumed the dynamic link worked , if not maybe we can get it going by checking out the code that is posted for dynamic slideshow here http://gallery.menalto.com/node/36939#comment-138995

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2006-04-01 06:45
dotnature wrote:
I also will probably use the open in new window option for clicking on the infowindow image, It will most likely just open the actual photo not wrapped in the theme, maybe have a link to imageor album's actual page as an option. I prefer this because the map is somewhat slow to load going back and forth.

I think it would be cool to have some of the PG Themes icons under the thumb in the infowindow for:

    * resized popup.
    * Full popup
    * album link ( wraped in theme)
    * photo link ( wraped in theme)

Dave