Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 ... 6 7 8 9 [10] 11 12 13 14 15   Go Down

Author Topic: Google Map in Coppermine Gallery, version 2 (of mod and api)  (Read 327028 times)

0 Members and 1 Guest are viewing this topic.

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #180 on: September 18, 2007, 05:48:39 am »

Are you sure you ran update.php after updating the update.sql file?
Logged

carlo1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #181 on: September 18, 2007, 10:08:45 pm »

yes i am sure. everything is "already done"  yesterday i update from v1.4.12 to 1.4.13. i started again from the beginning. same problems :-( after changing lang/german.php and english.php the gallery starts with a lot of test, under this text there is my gallery, but it is not possible to change anything, i can only see pictures, no menu!
in my admin config i never see changes where i can place the api key from google. also i installed the master theme plugin. after this i checked my url/plugins/master_template/codebase.php, i got this error: Not in Coppermine...   i changed the codebase.php with the text a few posting before.

maybe it is possible to send me the changed files. i am a little bit frustrated in the moment. i use only the real 1.4.13 without any changes. the mod is so great and i hope it will work soon.

thanks for help.

Logged

carlo1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #182 on: September 23, 2007, 11:31:44 am »

nobody here to help me with my problem? :'(
Logged

Nibbler

  • Guest
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #183 on: September 23, 2007, 01:47:09 pm »

You probably edited the lang files incorrectly. Review your changes.
Logged

carlo1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #184 on: September 29, 2007, 01:01:19 pm »

i have checked this 5 times (see above)  !!! this is correct. i tried this with english and german.php but always the error with the very long text message. i donīt know what i should change more to find this error. my english is not so good and i hope someone can help me directly with icq or can change the files directly on my page.
so many thanks.


Open lang/english.php (or whatever language you want to use). If you are upgrading, replace the old gmap stuff with the following.

FIND:
Code: [Select]
?>
BEFORE it, ADD:
Code: [Select]
// ------------------------------------------------------------------------- //
// Google Maps API
// ------------------------------------------------------------------------- //

if (defined('GMAP_PHP')) {
$lang_gmap_php = array(
'title' => 'Gallery Map', //Google Maps API
'no_javascript' => '<b>JavaScript must be enabled in order for you to use Google Maps.</b>
However, it seems JavaScript is either disabled or not supported by your browser.
To view Google Maps, enable JavaScript by changing your browser options, and then
try again.', //Google Maps API
'credit_tutorial' => 'This was made possible thanks to a tutorial on how to generate
<a href="http://www.map-server.com/googlemaps/tutorial.html" target="_blank">Google Maps via PHP/Mysql</a>', //Google Maps API
'latitude' => 'Latitude', //Google Maps API
'longitude' => 'Longitude', //Google Maps API
'coordinates' => 'Coordinates', //Google Maps API
'map_permalink' => 'Permalink to map', //Google Maps API
'coord_instructions' => 'the coordinates will automatically appear in the Coordinates field when you double-click on the map', //Google Maps API
'all_albums' => 'All Albums', //Google Maps API
'view_markers' => 'View Markers for', //Google Maps API
);
}

2006-05-31: Added text to support new album-related filtering features.
2006-06-01: Revised the text for the link that switched between showing files and album markers.

Edit include/langfallback.inc.php. If you already added this for the v1 mod, you can skip this.

FIND:
Code: [Select]
?>
BEFORE it, ADD:
Code: [Select]
// ------------------------------------------------------------------------- //
// Google Map text
// ------------------------------------------------------------------------- //

if (defined('GMAP_PHP')) {
  $lang_gmap_php_en = cpg_get_default_lang_var('lang_gmap_php','english');
  $lang_gmap_php = array_merge($lang_gmap_php_en, $lang_gmap_php);
}



We'll want to be able to modify some settings in Config.

Also, in the language file:

FIND:
Code: [Select]
  array('Gallery is offline', 'offline', 1, 'f=index.htm&amp;as=admin_general_offline&amp;ae=admin_general_offline_end'), //cpg1.4

AFTER it, ADD:
Code: [Select]
  'Google Maps API settings', //cpg1.4
  array('API key', 'gmap_api_key', 0), //Google Maps API
  array('Name of map file', 'gmap_filename', 0), //Google Maps API
  array('Default zoom level', 'gmap_default_zoom', 0), //Google Maps API
  array('For default center, override average coordinates with manual setting', 'gmap_override_avg_coord', 1), //Google Maps API
  array('Default center (format: latitude,longitude)', 'gmap_default_center', 0), //Google Maps API
  array('Display coordinates when double-click on map', 'gmap_display_coordinates', 1), //Google Maps API
  array('Display permalink with coordinates', 'gmap_display_permalink', 1), //Google Maps API
  array('Display sidebar (list of map items)', 'gmap_display_item_list', 1), //Google Maps API
  array('Width of the sidebar (% only or things go wacky in IE and O)', 'gmap_sidebar_width', 0), //Google Maps API
  array('Display map for individual files in displayimage', 'gmap_displayimage_map', 1), //Google Maps API
  array('Display map in editOnePic', 'gmap_editOnePic_map', 1), //Google Maps API
  array('Display map in editpics', 'gmap_editpics_map', 1), //Google Maps API
  array('Default type for large map','gmap_type', 50), //Google Maps API
  array('Default type for small map','gmap_small_type', 50), //Google Maps API
  array('Max number of characters in tab title', 'gmap_tab_max_char', 0), //Google Maps API
  array('Use the latest development version instead of current stable one?', 'gmap_version', 1), //Google Maps API
  array('Display overview map', 'gmap_display_overview_map', 1), //Google Maps API
  array('Overview map size (width, height)', 'gmap_overview_map_size', 0), //Google Maps API
  //array('Icon','gmap_icon', 51), //Google Maps API
2006-06-01: Added gmap sidebar width configuration. Only works with a percentage value. Pixel values throw IE and Opera into a tizzy.


edit admin.php

FIND:
Code: [Select]
function create_form(&$data)
BEFORE it, ADD:
Code: [Select]
function form_gmap_type($text, $name)
{
    global $CONFIG;
    $value = $CONFIG[$name];
    $normal_selected = ($value == 'G_NORMAL_MAP') ? 'selected="selected"' : '';
    $satellite_selected = ($value == 'G_SATELLITE_MAP') ? 'selected="selected"' : '';
    $hybrid_selected = ($value == 'G_HYBRID_MAP') ? 'selected="selected"' : '';

    echo <<<EOT
        <tr>
            <td class="tableb" width="60%">
                $text
            </td>
            <td class="tableb" valign="top" width="50%">
                <select name="$name" class="listbox">
                    <option value="G_NORMAL_MAP" $normal_selected>Normal</option>
                    <option value="G_SATELLITE_MAP" $satellite_selected>Satellite</option>
                    <option value="G_HYBRID_MAP" $hybrid_selected>Hybrid</option>
                </select>
            </td>
            <td class="tableb" width="10%">
                &nbsp;
            </td>
        </tr>
EOT;
}


FIND:
Code: [Select]
                case 17 :
                    form_asc_desc($element[0], $element[1], $element[3]);
                    break;

AFTER it, ADD:
Code: [Select]
                case 50 :
                    form_gmap_type($element[0], $element[1], $element[3]);
                    break;


Now go to Config and modify settings accordingly. The most important thing is the api key. To get one, sign up for a Google Maps API key. It is free and is unique to your site.

The setting, Name of map file, is necessary if another file, like thumbnails.php, needs to know where to find the map file.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #185 on: September 29, 2007, 04:17:19 pm »

I'm not very familiar with language encoding issues, but I think something went wrong with your english.php file. In English, I see the contents of the english.php file at the top of the gallery. When I switched to german, the text wasn't there. Could you attach a copy of your english.php file? You will need to rename to english.txt or the forum will reject the file from being attached.
Logged

carlo1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #186 on: September 29, 2007, 10:35:41 pm »

hello again,
so after reinstall again i can now see in the admin - configuration all the google maps fields. i entered the api key and what i must write under  Name of map file ?
2. install master template. what i must write in codebase.php? http://hoelzlmani.pytalhost.de/cpg141/plugins/master_template/codebase.php i got an error "not in coppermine"
3. i changed displayimage.php as your discribtion, but after clicking a picture, the error with the text comes again :-(

i think only a little thing is wrong now. hope to get it work soon. thanks.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #187 on: September 29, 2007, 11:17:34 pm »

1. Name of map file is the filename that contains the code posted here: http://forum.coppermine-gallery.net/index.php?topic=31206.msg144439#msg144439

2. You must write the code as described here: http://forum.coppermine-gallery.net/index.php?topic=31206.msg144446#msg144446. You're not supposed to open it in the browser, but in a text editor.

3. Please review this step: http://forum.coppermine-gallery.net/index.php?topic=31206.msg144442#msg144442

There is something wrong with your english.php file. When I go to view-source:http://hoelzlmani.pytalhost.de/cpg141/lang/english.php it shows the contents of the file, which it should not do. The text from the first part of the code change is missing. I'm wondering if that's where the error is.

Logged

carlo1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #188 on: September 30, 2007, 01:30:59 pm »

hello,
i changed english.php again, no the text error is away :-)
also i made the changes in the codebase.php, thumbnails.php, displayimage.php, editOnePic.php.
if i click on one pic in this test album http://hoelzlmani.pytalhost.de/cpg141/thumbnails.php?album=224 i canīt see the google map.
all 3 pics have coordinates !
i checked again the api key, this one is correct.

Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #189 on: September 30, 2007, 04:57:30 pm »

Did you follow the part in the codebase.php instruction that looks like this?

//$uacct='NN-NNNNNN-N';

I know you feel like you followed the instructions but you haven't. This will work if you go through the steps correctly. Also, make sure you have uploaded the changed files to your server.
Logged

carlo1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #190 on: September 30, 2007, 05:44:48 pm »

o i forgot one little thing. thank you. now it works but only with IE and not with firefox. here i only can see a grey field.
also i must place all gps informations manually. i use the locr software to combine my gps positions with the exif from the pics. is it possible to change that, so i must this manual? it is a lot of work to do this with more than 1000 pics :-(
this pic is made with locr.com software http://hoelzlmani.pytalhost.de/cpg141/displayimage.php?album=lastup&cat=0&pos=1 so you can see the exif information in the pic. maybe you can help me again.
thank you very much.
Logged

carlo1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #191 on: September 30, 2007, 07:07:42 pm »

i modified again some files. now all works fine.also i can upload new pics and the gps exif where found and shows correct in my gallery. only a small part should be changed.
is it possible to set the thumbnails view to size 2 (google maps - see all the world) and when i like to see only the picture the map should be size 13. in config i can only change one thing for all.

thanks for the great mod and help. nice sunday.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #192 on: September 30, 2007, 11:22:51 pm »

is it possible to set the thumbnails view to size 2 (google maps - see all the world) and when i like to see only the picture the map should be size 13. in config i can only change one thing for all.
Sure, that's possible. You'd just need to change the size definition of the map you want to change. You can define it in the code or create a new config option and then use the new variable instead of the current one.
Logged

carlo1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #193 on: October 01, 2007, 10:01:20 am »

please can you tell me in which file and place i must change this to have the new option? i canīt php language.
thx.
Logged

BorOl

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #194 on: November 15, 2007, 10:54:05 am »

Hi there!
TranzNDance!! This is awesome mod! I really love your work. All my mates are very happy with this mode added to our private gallery. We have more then 10000 pics there and for now only 50 have coordinates but all new will have them.

I have some suggestions (you may call them reuests too  ;) ) and as I (and probably many of us reading this) am coding-ignorant I'd be very happy to see someone solve these:
- I'd like to see a localsearch control on maps in editpics and editonepic. I tried to implement it but I got some errors (marker doesn't show up and only one map is loaded in editpics). Could anyone try it? I can't do it, although I've added the typecontrol and it's working.
- the thing that really gets me furious is that in maps in editpics and editonepic the marker doesn't follow the map center as I grab and move the map. I have no idea how to change it.
- I think it would be great if zoom on map in map.php would be automaticaly changed to show all markers - no less and no more.
I've added to my gallery "Simple Google-Maps button" ( http://forum.coppermine-gallery.net/index.php?topic=47812.0 ) and right now everything looks perfect beside those things mentioned above.

TranzNDance, once again - thanks for the mod.
Logged

BorOl

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #195 on: November 15, 2007, 11:20:24 am »

Well, I don't see "edit" option :( Would be great if someone merged my posts.

- As I view an image with coordinate's there's a map in displayimage (I don't use it but it's not important now) but on this map there's a marker only for this picture. I think it would be great if there were markers for other pictures (e.g. in different colour) - we could easily go to all picture's taken near the one we display at the moment.
Here's a sample ( http://transport.asi.pwr.wroc.pl/2-202083.html ) using custom markers.
Logged

rubenix

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 43
    • Rubrenix Gallery
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #196 on: December 14, 2007, 02:24:43 pm »

Hello TranzNDance I'm writing to you as I really want the AWESOME mod you created here working in my site.

After several instalations and code-rechecks with no succed I wonder if you can gimme a hand with this; or even two hands  ;)

Im pretty sure I followed all the steps VERY carefully; so Im starting to think that might be a problem with my API key or a conflict with the master template or with the free webhost Im using for my website :'(

As Im not very familiar with the master template thats why I need to ask you  something:

Is this plugin correctly working if the 'mycoppermine' image doesn't show up??Ive seen this image showing on other users and I wonder If I did something wrong or if the plug itself its in conflict with another one.

Any way I tried to skip the master template plugin installation and just pasted the css code in my style.css as there's only one theme in my site... I suppose still correct, yeah?? didn't succeed in any way: with and without the master template, so it might not be the root problem I guess.

Attached screenshots of the admin section, editpics and the map screen as it shows in my site....so, no map is showing at all; I re-fill the API key but still not showing anything!!

Can you please check if the master template is currently working 'fine' and if the config for your mod is well filled up in the admin section??
Am using coppermine v 1.4.14 (latest I thing) and here is my map file. As you can see nothings shows in where the map supposed to appear...map reads the coordinates for the files I entered coordinated...just by filling the coord field tho!

well I just have to say THANK YOU SO MUCH for this mod. I would like to have it working in my site, would be LOVELY  :P

Just check it whenever you get the time, no need for a rush, I understand you might get lots of emails and forum questions regarding issues like that and theres no need for a rush, really!!

Thank you again!
Logged

rubenix

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 43
    • Rubrenix Gallery
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #197 on: December 14, 2007, 04:42:02 pm »

map renamed to gmap.php so location its here: http://www.rubenix.net/gmap.php

Thanks!
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #198 on: December 14, 2007, 05:06:50 pm »

Hi rubenix,

Could you please reread the instructions? I stated the following:

Quote from: Thu
* The master template plugin is now required in order to place the javascript code correctly within the Coppermine template

That is why the google maps code is not showing up in your page's source and thus no map will show. You can check the source for my map and look for the part of the html source that starts with:
Code: [Select]
<script src="http://maps.google.com/maps?
to determine if the map is on the way to being properly installed.
Logged

rubenix

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 43
    • Rubrenix Gallery
Re: Google Map in Coppermine Gallery, version 2 (of mod and api)
« Reply #199 on: December 14, 2007, 05:35:05 pm »

Thanks for your quick reply!! wasn't expecting it that fast.

for clarification: I do have the master templated installed see attached pic, and yes you are right I can't find the code you mentioned on my map.

Could this happen because I have a plugin or javascrit conflict??

I'm using the Google Analytics so I left the code without commenting out the line:

Code: [Select]
$uacct='NN-NNNNNN-N'; is that right??

I dunno what else try...I'm pretty sure I followed the instructions

Thanks again!!

Logged
Pages: 1 ... 6 7 8 9 [10] 11 12 13 14 15   Go Up
 

Page created in 0.054 seconds with 16 queries.