Hi,
I would like to setup a gallery and present my albums on a map instead of a folders listing.
I've seen that there is a theme "Map" based on the plugin which uses Google Map.
To test it I've used Gallery v2.2 RC 1, Apache 2.2.6 and PHP v5.2.5.
Alas, when used with the latest version of Gallery, it seems that it does not work : the theme is not underlined, when the mouse is over the name, no example is displayed, and clicking on "install" do nothing.
Google Map module is working, it's possible to display albums & pics on a map... So I think the problem comes from the theme (v2.1 compliant only ?)
Have you got any information about it ?
Thanks
Posts: 27300
Nobody has maintained the map theme once the map module came about. So I suspect that is is only G2.1 compliant.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 14
Well
Is there any tutorial to maintain it ?
A migration guide which let me easily to how to upgrade it ?
Posts: 508
What I would like to do is to split out some of the functionality into a common module which simply has the latitude & longitude coordinates (call it geodata maybe?). Then the data could be used by either the theme or the module, or by any other future plugin. If we did that, then it would make sense to bring the map theme up to Gallery 2.3 standards. I don't know if Termitenshort will support this idea, though.
Posts: 14
In fact, do you want to make a new simplier implementation of the Google Maps API ?
I mean, the Map module what lastly updated on 2007-12-27... it might not be as deprecated as people can think using it theme !
Posts: 27300
Making modules dependent on other modules is not a good idea. (splitting some function of the map module to let the map theme use) It gets hard to maintain and we see that already with the map theme not being maintained. If we did that then there would be 3 items to maintain and there simply is not enough people to go round.
There is not a tutorial to maintain things (modules and themes) but there is some API documentation that the average theme developer would not get anyway:
http://codex.gallery2.org/Gallery2:API I would start with looking at existing themes and see what code have changed between versions. Also with Google map code changing from V1 to V2 a developer has to be knowledgeable on that API as well.
Sure we know documentation is lacking but there is only so much time in a day & there is only a few of us on the team.
steph33560, Do you have experience in creating themes? First you would have to be good at that, before tying to upgrade a theme that has not been maintained..
What functionality is lacking in the module that the theme had?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
I don't understand. Do you want a simpler module?
What features in the module are you looking for that the theme had?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 14
I totally agree this but...
In fact, Map module depends on another module : this module is Google Map... maybe the difficulty would come from interfaces : if Google changes it between version X and version Y, it will really be unmaintainable. Then, maybe another module between Map Module and Goole Map API, with a solid protoype, would be usefull to hide changes from Google Maps core and then help Map Module easily upgradable ? I say this, but I still didn't have time to open the box...
I'm a newbie, but I've got some experiences in developping applications (it's my job) so with a little bit of time and patience I think I will understand how it works. Open Source is used to be undocumented, it's not a problem ;)
Well, If I managed to make it work, I would say it
I'll have a look at this tomorrow if I've got an hour or two.
Not at all. This module is OK for me, and I see it's the only one for Maps...
- Stéphane
Posts: 508
Dave, if the geodata module were extremely simple it would not need much maintenance. It's just moving code around. It's like the Upload Applet depends on the Gallery Remote module to be installed. What's really missing is a way for the plugin mechanism to automatically install dependencies. That would solve a lot of the user questions (but good error messages go a long way).
Posts: 27300
We did experience that when google changed from V1 to V2. The map module have to be re written and updated.
We have zero control over the google map API ( other than suggestions) so if they make a change we have to change as well. I guess a solid prototype in between the Google API and the module/theme could be doable but somebody has to do it.
sounds like a good idea. Want to do it?
A good admin interface would help this along the way. The comments module now has a Askimet spam filter as a non required dependency, similar as you get a key form Akisment and key from google. But the comments still functions without that dependency.
Some activation code could check for a module and not allow you to activate it until you have the correct sub-module.
All takes time and I hope you are willing to tackle this with Termite.
Dave
PS. thanks for the support on the map module.
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 508
Yes, I do want to do it. Proper handling on activation will be the key. Fortunately there is already an example to follow. Like you said, the key is going to be getting Termitenshort on board.
Sorry if support has been lagging a bit lately. I've been writing some Java code for OpenSteetMap.org, and I'm also looking for a new job since I'm in a slow-motion layoff.
Posts: 14
HI,
Starting with 1.0.7 version, I've successfully modified theme.inc file (that was the easiest piece) ; the Map Theme is now installed in Gallery v2.2
Nevertheless, I have some difficulties with templates...
In album.tpl, I don't understand how it can display a worldwide map on the header...
Furthermore, I do not see any map printed in the main area of my page. How make it appear ?
Edit: While reading module templates, I've understood some things. Is it possible to have source code templates from http://tautologous.com ?
Can you help me ?
Thanks.
Posts: 508
Sorry, I probably can't help. I've never looked at the theme code. As for getting code from another website (it's using the module, by the way), you'll have to ask the site owner.
Posts: 27300
I installed map theme 1.0.7 from the themes codex page and did not make any changes.
Seems to work for me:
http://langleycom.com/gallery2/v/map/
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 14
Hey... I've downloaded it and copied on my filesystem.
Is there another way to do get this theme ?
Posts: 27300
no. Not that I am aware of. What version of Gallery do you have?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 14
I've downloaded latest version of Gallery v2...
Posts: 27300
Latest... as in SVN version, a nightly or 2.2.4?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 14
Well, see my first post :
But I did not said that I've downloaded this 2.2RC1 directly from http://codex.gallery2.org/Downloads
Posts: 27300
Now I am confused.
Site admin -> Maintenance -> System information; run now. Post what is says
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 14
My Last test version was 2.2.4. Here what says system info (translated by me...)
To be sure of what I've done, I've reinstalled a totally new version (new filesystem files, new database) from blank. I've donwload v1.07 theme, put it on my filesystem,; click on Install... it does nothing ...
Then I've download Google Map Module version 0.5.6 from community, configured and activated it, clicked on "Install" from the Map Theme... nothing...
I've tested this both on Firefox and IE... The Map theme does not work with gallery v2.2.4, sorry...
How is it possible for you to work ?
Can you give me a (adress via pm ?) a zip file from your filesystem ??
Thanks !
Posts: 27300
http://langleycom.com/gallery2/v/map_001/
A zip file of my g2 install?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 14
Well, I'm really confused too...It works...
Yes, may you give me a zip file of your complete G2 install (without config file if you want ;))
Posts: 666
here you can see how the map module works within Gallery2 2.2.4. Even with the newest releasse of Google Earth 4.2 it works. I use FF 2.0.11.
Open Google Maps or Earth in the sidebar.
I'm still experimenting with the module and not everyting is setup as I want.
Sorry for jumping into this thread without having read it totaly.
rgds/oceco
Edit: the 2nd quote got the wrong content from my clipboard. Now its correct.
Posts: 14
Am I the only one person on (google) earth experiencing problems on using theme map ?
I don't know what does not work on my way of using this :
1/ Download latest gallery2 version
2/ create a database
3/ setup gallery2
4/ get map module with the administration backend
5/ install the module and configure it (get key)
6/ download the map theme & unzip it themes' folder
7/ try to click install => bug => click does nothing
I'll try later to make it work...
Posts: 27300
PM me admin user info and turn debug on in config.php and I will have a look.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 666
OK, meanwhile I've read the whole thread, read it again and then I was confused...
Stepn33560, are you aware that the maps module and the maps theme are two completly different and independent elements?
BTW: I've no experience with the maps theme because it's development stopped when the maps module came up.
But I assume steph33560 wants to achive the same as I want, and a good example of this is shown here: http://tautologous.com/gallery2/travel/
Looking at this example each subalbum there has a Google Map in the header with markers (geotags) of its subalbums or photos which are geotaged.
Therefore we will need a capability to geotag albums (and maybe also your photos/images). This is possible with the maps module. The maps module is able to show a map within an album page with markers for each of its geotaged elements (subalbums and / or photos). Thats what you can see on my page.
But, steph, if I understood you correctly, you want to have this map in the header of the album page. Correct? At least it's my intention for my gallery.
So the question is: How to bring the map from the maps module in the header of an album page?
That I haven't investigated that so far. I'm sorry! But sooner or later I will.
rgds/oceco
Posts: 666
Why do you do that? What you want to achieve with it? See also my previous posting.
Rgds/oceco
Posts: 14
@oreco :
The Map Module isn't the Theme Map Module.
I would like to see this theme working, to build mine from it.
Sorry, but I do not understand what you say in your last post...Do you mean that theme map is useless to display albums on a map ? I agree if you build your own theme... is that what you've done on your site ?
if you have build your own theme can you share it please ?
Posts: 666
@steph
as I have no experience with the map theme i would never say its useless, but it's maintenance is stopped because of the maps module!
Therefore I think sooner or later you will run into problems anyway!
Why don't you use the maps module and modify a standard theme?
Again: What you want to achieve?
rgds/oceco
Posts: 666
@steph
if you look at my website here you will notice that all the functionality is there: geotaged albums and photos. For all of them I can get a map with markers in it and even export an album to Google Earth. This is all done with the maps module which can be used in any theme!!!
have fun with my gallery!
rgds/oceco
Posts: 666
That's exacly what I try to explain you from the beginning! Forget the maps theme, it's a dead end.
Why do you install the map module and the maps theme? The maps theme is replaced by the maps module!!!
I use a standard theme (carbon slightly modified).
I still asume you want to get a page like this one here: http://tautologous.com/gallery2/travel/
Correct?
Then the only trick is how to modify your template to have the maps module display the map in the header of your page instead of in the content area.
rgds/oceco
Posts: 666
Where to modify the header of your page?
In your template theme.tpl (make a copy into the local folder before modifying!)
We have to modify the section where the header of your album is generated. It looks like this
Now we now where! Next question is: Replace whith what?
Or more precisly: How does the maps module write its output (the map) into a page?
An investigating oceco
Posts: 666
How and where is the content of a site generated?
In theme.tpl in this section:
As the maps module is a module it most probably will use this part of the above:
the maps module uses therefore the module.tpl
further investigating oceco
Posts: 666
module.tpl is quite short, basically just this:
Somebody any idea where I'll find some more information about this?
Posts: 508
You could try adding this block statement to show the mini map:
{g->block type="map.MiniMap" item=$theme.item mapHeight=200 mapWidth="100%" mapType=3 showControls=false useParentCoords=true albumMarker=true albumItems=true}
Obviously adjust the parameters to suit your needs.
Posts: 666
Hi SiliconFiend
Thanks for your reply! I'm not quite sure if I understand you, therefore: Do I have to put this in theme.tpl in the <div id="gsHeader"> ....</div> and this map will then show all my geotaged elements in the site header?
Thanks again/oceco
Posts: 508
You can experiment with its placement. I tried putting it just above the {if $theme.pageType == 'album'} line (in the Matrix theme). You might want to also fine-tune it so it doesn't show up in Admin pages, so surround it with an if block like so:
Note that you have to have the Map module installed, and you have to have a valid Google Maps API key for this to work (see the Google Map Admin section). If you can see your main map page, then you should be good.
Posts: 666
Ooohhh ... I see what you mean: GREAT! And THANKS a lot!!!
But may I bother you one more time? I'd like to see also an if-stmt if there are no geotaged elements in the album or photo page the block should not be shown.
I'm a newcomer and haven't learned enough about the concept, structure etc. of Gallery2. My gallery is up and running only since three weeks now and im still an user scratching only on its surface and still trying to understand all the features of this GREAT maps module. So far I have only used its functionality for one of my albums and to export the kml-file to Google Earth. The result is amazing and impressed all my friends!!! (beside the fact that my graphic card crashed).
It's a pitty that no one takes care of this module anymore and there are not many threads in the forums, to learn more about this great feature. I know you were one of the early adopters of this module and therefore I'm more than happy that you support me, a dummy!
My final intention is to capture such a Google Earth trip and integrate it in my video editing program (a beta test was already successful), but for this I realized that I will need a newer generation graphics card anyhow ;-)
rgds/oceco
Posts: 666
@siliconFiend
meanwhile I integrated your suggestion in my template and it works as expected! GREAT! For me, it proves that what I've tried to explain to steph33560 was correct. And I believe you confirmed this with your contribution above somehow.
I did it. And further experiments will follow, for sure! And I'm sure further questions as well will arise because my imaginations / ideas are endless ;-)
But I also believe, this great module deserves it, also for an overall demonstration of the Gallery2 advanced capabilities.
A very special thank also goes to Termitenshort who made the basics of this great module. His only fault was probably that his contribution of this module was to early and therefore most people didn't recognize its value. Sincerely i hope to have him back in here somewhere!
Posts: 508
Oh, you hurt my feelings! I'm maintaining the map module now. And if you look through this forum, you'll see lots of map module threads. Termitenshort pops in periodically, but I have SVN commit access and can release versions. The map theme has not been maintained, though.
I wrote the code for the Mini Map block that you are now using in your header. I also (re)wrote the Google Earth export. Note that it will export your gallery album structure rooted from whichever album you're at when you select the "View in Google Earth" link. So, if you want to see your entire gallery, click the link in your root album.
By the way, you shouldn't need to do anything to hide the block if the photo or album you're viewing has no coordinates. The Mini Map block already does that. You might look at some of the options, though, to customize what's shown (i.e., use the parent album coordinates if the item doesn't have its own). Look at the blocks.inc file in modules/map/templates/blocks for explanation of the options. By the way, you can just go to the Theme Admin page and add the Mini Map block to a photo or album page if you want. You might not be able to get it in the header, though, depending on the theme you're using.
Posts: 666
I'm sorry that I hurt you! Was not my intention.
It was just my impression because in the old forum one could see the progress or development of this module. Since this forum is closed its hard to track what's going on.
I integrated your block in my template and it worked well. But I couldn't check anymore if it's not there if there are no geotaged items, because the notification module crashed my gallery! And I have no idea how to bring it alive again.
Nevertheless THANK YOU for this great block!!!
Posts: 508
You didn't really hurt my feelings. It's true that development has slowed significantly on this module. It needs a ground-up restructuring before we can add really cool features. It's a really big task, and I don't know when I'll have time to do it. I'm planning to start soon, but the downside is that the users won't really notice much difference for all the work I need to put into it. Ah, well.