Google Map in Coppermine Gallery, version 2 (of mod and api) - Page 6 Google Map in Coppermine Gallery, version 2 (of mod and api) - Page 6
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Google Map in Coppermine Gallery, version 2 (of mod and api)

Started by Tranz, May 07, 2006, 10:05:44 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

arlon

The host solved the problem, now the page is showing up, but the map isn't there (actually, no content is there). On the "editOnePic" file, I can see the navigation images and google logo, but nothing else is there.
I've tried to change the Google API key just to be sure that that was not the problem.. but that didn't help. :-(
Does anybody have any ideas?

Tranz

I think the problem has to do with this part of the instructions:
http://forum.coppermine-gallery.net/index.php?topic=31206.msg144446#msg144446

Basically, the css got commented out. Could you please make sure you followed the instructions?

Also, it looks like the map code isn't getting inserted at the bottom of the source so something else is missing. I think the answer is in that post, too.

rphMedia

Thu, just for info, this [fantastic] mod conflicts with the potd/potw plugin.  When trying to editonepic (editpics is fine), I receive this error.

Critical error

Script called without the required parameter(s).

...gallery/plugins/potd/codebase.php - Line: 126



Just info only.  I removed the potd/potw plugin and all is well.

It's a shame, I love both mods !

If I get time later, I'll try to narrow the conflict, unless you know immediately.



Tranz

Hey Ron,

I'm not sure what the conflict could be. Did you have the potd plugin before the maps mod? I'm wondering if the potd issue is independent of the mod. Could you try backing up your modified editonepic file and test with a fresh unedited copy?

Thanks for the compliment. It means a lot considering your contributions. :)

rphMedia

Yes, I think you're right.  The POTD/POTW plugin is the culprit by itself.  Your mod - so far, so good !



A small problem - I can't get the scrollbar to show in the sidebar  ???

I have the Master_Template plugin installed, modified codebase.php; I can see where the scroll should be activated, but it's the only part of the css that's not working:

#gmap_sidebar { /* contains thumbnails that link to points on the map. scrollbar appears if the content is too long */
background-color: black;
width: 100%;
height: 500px;
overflow: auto;
text-align: center;
}


I'm using a slightly modified Classic (colors mostly) Theme.  I can send you a link via PM, site is not public yet - only if you have time of course :)

I'm going to continue to play with it, but again, if you know what could cause it :) ...

Tranz

I'd have to see it to figure out what the problem could be. Please send me the link.

Tranz

Thanks for the link. Well, the scrollbar shows up fine in Firefox. It doesn't show up in IE. However, it works for my map in IE, so the issue is unlikely with the map mod. I can't pinpoint the issue, but it might have to do with the 3 body tags in your source code. Are you including the gallery in a template?

rphMedia

Quote from: TranzNDance on November 11, 2006, 10:18:39 PM
Thanks for the link. Well, the scrollbar shows up fine in Firefox. It doesn't show up in IE. However, it works for my map in IE, so the issue is unlikely with the map mod. I can't pinpoint the issue, but it might have to do with the 3 body tags in your source code. Are you including the gallery in a template?

Yeah, that was done a few weeks ago when I was experimenting with the header/footer in CPG. Thanks for reminding me to clean that up.

Alas, after cleaning it up, still have the (MY) problem.  Sorry to clutter the thread - it's probably not related to your mod or coppermine for that matter.  Off to troubleshoot.  Thanks for looking !



EDIT: found it (I think) - well, my configuration anyway - just in case it may help someone.  Had to change -

#gmap_sidebar ...
width: 100%;
...

to

#gmap_sidebar ....
width: 95%;
...

I'm sure it's an IE anomaly only :-\

pocketmon


Some trouble happened to me when I start to using the "exif" function.
I have post a issue in "support/misc" group. The issue will result in wrong
GPS locations. Please check it before using.

If you cannot wait, you can try this temp. solution.

Please try before you use it. It should work in some conditions, and would not work in another.
It works for me, while I am using RoboGeo.


find in include/makers/gps.php

                        $data = $hour+$minutes/60+$seconds/3600;

replace it with

   if ( $hour != 0 && $seconds == 0)
   {
               $data = $hour+$minutes/60+$seconds/3600;
         }
   else
   {
      $data = $seconds+$minutes/60+$hour/3600;
   }


Garibaldi

Great work! Thank you very much for creating this very useful MOD! I've been able to successfully install it and have added coordinates on a few pictures but I am having a problem with the main map page:
http://www.wiscollectorcar.com/coppermine/cpg132/map.php?album=14

As you can see, when I have the sidebar enabled it pushes my map way over to about 5% of the screen, for no apparent reason. When I disable the sidebar, the map displays fine across the whole screen. Here's my debug information for the page:
USER:
------------------
Array
(
    [ID] => 8c75fb63216a28b025a4acd9300b6a64
    [am] => 1
    [liv] => Array
        (
            [0] => 7526
            [1] => 5497
            [2] => 7528
            [3] => 1366
            [4] => 1365
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 2
    [user_name] => Garibaldi
    [groups] => Array
        (
            [0] => 102
            [1] => 102
            [2] => 105
            [3] => 169
            [4] => 158
            [5] => 190
            [6] => 195
            [7] => 277
            [8] => 602
            [9] => 642
        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 10
    [num_URI_upload] => 5
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 102
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg132_filetypes; (0.001s)
    [1] => select * from cpg132_plugins order by priority asc; (0.001s)
    [2] => SELECT * FROM cpg132_bridge (0.001s)
    [3] => SELECT u.user_id AS user_id, u.user_password AS password, u.user_level FROM `betaforum`.phpbb_users AS u, `betaforum`.phpbb_sessions AS s WHERE u.user_id=s.session_user_id AND s.session_id = '61b23fe6dcf4a1a7292fdb445d8bed0c' AND u.user_id > 0 (0.005s)
    [4] => SELECT u.user_id AS id, u.username AS username, u.user_password AS password, ug.group_id AS group_id FROM `betaforum`.phpbb_users AS u, `betaforum`.phpbb_user_group AS ug WHERE u.user_id=ug.user_id AND u.user_id='2' (0.001s)
    [5] => SELECT ug.group_id+100 AS group_id FROM `betaforum`.phpbb_users AS u, `betaforum`.phpbb_user_group AS ug, `betaforum`.phpbb_groups as g WHERE u.user_id=ug.user_id AND u.user_id='2' AND g.group_id = ug.group_id (0.005s)
    [6] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg132_usergroups WHERE group_id in (102,102,105,169,158,190,195,277,602,642) (0.001s)
    [7] => SELECT group_name FROM  cpg132_usergroups WHERE group_id= 102 (0.001s)
    [8] => SELECT user_favpics FROM cpg132_favpics WHERE user_id = 2 (0.001s)
    [9] => DELETE FROM cpg132_mod_online WHERE last_action < NOW() - INTERVAL 5 MINUTE (0s)
    [10] => REPLACE INTO cpg132_mod_online (user_id, user_name, user_ip, last_action) VALUES ('2', 'Garibaldi', '199.197.123.130', NOW()) (0s)
    [11] => SELECT * FROM cpg132_highslide_config (0.001s)
    [12] => DELETE FROM cpg132_banned WHERE expiry < '2006-12-12 09:03:27' (0s)
    [13] => SELECT * FROM cpg132_banned WHERE (ip_addr='199.197.123.130' OR ip_addr='199.197.123.130' OR user_id=2) AND brute_force=0 (0.001s)
    [14] => SELECT COUNT(*) FROM cpg132_pictures WHERE approved = 'NO' (0.006s)
    [15] => SELECT albums.*, pictures.*, albums.title AS title, COUNT(*) AS n
FROM cpg132_albums AS albums, cpg132_pictures AS pictures
WHERE
pictures.aid = albums.aid
AND ABS(pictures.latitude) + ABS(pictures.longitude) > 0

GROUP BY albums.aid
ORDER BY albums.title
; (0.034s)
    [16] => SELECT pictures.*, albums.*, pictures.title AS pic_title, pictures.latitude AS pic_latitude, pictures.longitude AS pic_longitude
FROM cpg132_pictures AS pictures, cpg132_albums AS albums

WHERE approved = 'YES'
AND pictures.aid = albums.aid
AND ABS(pictures.latitude) + ABS(pictures.longitude) > 0
AND albums.aid = 14


ORDER BY pictures.latitude DESC,pictures.longitude

; (0.002s)
)

==========================
GET :
------------------
Array
(
    [album] => 14
)

==========================
POST :
------------------
Array
(
)

==========================
VERSION INFO :
------------------
PHP version: 4.4.4 - OK
------------------
mySQL version: 4.1.16-standard-log
------------------
Coppermine version: 1.4.8(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 2
Client API version 5.0.16
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.2
Linked Version 1.2.2
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/local/lib/php | .:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | me@localhost.com | me@localhost.com
sendmail_path | /usr/sbin/sendmail -t -i  | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | -1 | -1
upload_max_filesize | 7M | 7M
post_max_size | 8M | 8M
==========================
Page generated in 0.245 seconds - 17 queries in 0.061 seconds - Album set : ; Meta set: ;


Also this information is displayed:
/plugins/master_template/codebase.php

    * Notice line 63: Undefined variable: uacct
    * Notice line 122: Undefined variable: uacct
    * Notice line 127: Undefined variable: uacct

/map.php

    * Notice line 59: Undefined variable: album_array
    * Warning line 59: implode() [function.implode]: Bad arguments.
    * Notice line 67: Undefined variable: query
    * Notice line 76: Undefined variable: parameter
    * Notice line 80: Undefined variable: lineBreak
    * Notice line 80: Undefined variable: lineBreak
    * Notice line 80: Undefined variable: return
    * Notice line 81: Undefined variable: lineBreak
    * Notice line 94: Undefined variable: lineBreak
    * Notice line 94: Undefined variable: lineBreak
    * Notice line 94: Undefined variable: lineBreak
    * Notice line 98: Undefined variable: lineBreak
    * Notice line 100: Undefined variable: lineBreak
    * Notice line 101: Undefined variable: lineBreak

/include/map.inc.php

    * Notice line 39: Undefined index: gmap_version
    * Notice line 51: Undefined index: gmap_display_overview_map
    * Warning line 66: implode() [function.implode]: Bad arguments.
    * Notice line 139: Undefined variable: addFrom
    * Notice line 145: Undefined variable: album_set_string
    * Notice line 147: Undefined variable: limit
    * Notice line 154: Undefined index: album_thumb
    * Notice line 162: Undefined index: album_description
    * Notice line 165: Undefined index: view_album
    * Notice line 168: Undefined index: view_profile
    * Notice line 214: Undefined variable: point_code
    * Notice line 239: Undefined variable: view_param
    * Notice line 247: Undefined variable: link
    * Warning line 247: mysql_close(): supplied argument is not a valid MySQL-Link resource
    * Notice line 287: Undefined index: gmap_sidebar_width

/include/media.functions.inc.php

    * Notice line 56: Undefined index:

/include/functions.inc.php

    * Notice line 1930: Undefined index: url_prefix
    * Notice line 1930: Undefined index:
    * Notice line 1930: Undefined index: filepath
    * Notice line 1931: Undefined index: filename


Any ideas? Thanks

Tranz

The sidebar width isn't set, so it defaults to 100%. Check that you have that setting in Config. I'm using 20%. You can adjust it to suit your needs.

Garibaldi

Excellent, that was the answer I needed! For some reason that line had not been added to my database, so when I would put a number in that field it wasn't being stored. Its now working great:
http://www.wiscollectorcar.com/coppermine/cpg132/map.php

Garibaldi

One other question:
Is it possible to have text on the sidebar either on top of or below the images (ie the image title) so people can identify what they are? What could would I have to add?
Thanks

Tranz

It should be possible. You might want to look at map.inc.php to see how the detail text is generated for the infowindows. Keep in mind the potential for clutter if you were to add the text.

Garibaldi

Is this the place in map.inc.php where I would have to add code for the image (line 287):
<td valign="top" width="{$CONFIG['gmap_sidebar_width']}">
<div id="gmap_sidebar" class="thumbnails"></div>
</td>

It seems like the whole sidebar is defined with CSS and a class. Would I have to edit something there instead?

Garibaldi

I have tried changing:

<div id="gmap_sidebar" class="thumbnails"></div>

To:

<div id="gmap_sidebar" class="thumbnails">$details</div>


This has the desired effect but it only displays the information for one of the images and at the top, not by the image. How can I make it display it for every image and in line with that image?

Garibaldi

Quote from: TranzNDance on December 13, 2006, 07:44:46 AM
It should be possible. You might want to look at map.inc.php to see how the detail text is generated for the infowindows. Keep in mind the potential for clutter if you were to add the text.
Where exactly in map.inc.php does it generate the sidebar? I can't find a place that creates them, so I don't know where to insert the code to add the title.
Thanks

rafynet

is it possible to set album coordinates from the album properties? modifyalb.php

Tranz

Sorry, it's still not available (listed under Known Issues).