Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Addons

Post Reply
 
Thread Tools
  #1  
Old 06-09-2006, 11:05 PM
jbulava's Avatar
jbulava Offline
forum loafer
 
Join Date: Jun 2006
Location: Manchester, NJ, US
Posts: 19
Addon: JBG Map v1.0 (Google Map addon)

JBG Map v1.0 (Google Map addon)

Download: jbgMap1.0.zip

Info and screen shots: http://www.jonbulava.com/projects/jbgmap.php

See the visitor side in use: http://photo.jonbulava.com/?x=jbgmap (My server is REALLY slow sometimes, just a heads up)

Description:
jbgMap is a robust Google Map addon that puts a great amount of control in your hands. Most importantly, it doesn't matter if your images have embedded GPS data or not.

It is a Pixelpost addon that allows the owner to give locations to their images regardless if you have GPS equipment or not. The addon was created with the casual photographer in mind, who may or may not know much about GPS.

The administration side allows the owner to navigate a Google Map and manually place a marker where each picture was taken. A later version will allow the owner to automatically use EXIF GPS tag data to skip this manual step or use it to 'tweak' a picture's position.

Once a photo has a location, it's ready to be shown on the main map that your viewers see.

Installation:
This is a two part installation (admin side and visitor side). As far as the files in the download are concerned, drop the 'admin_jbgMap.php' file into your 'addons' directory and place the two PNG images in your 'includes' directory. You will also need to get API keys from Google to use their maps, but that's all explained once you install the addon and read the manual. Follow the 'jbgMapManual.txt' file for a complete installation guide.

Bugs/Problems:
If you should find any bugs or problems with the addon, please let me know. I've had limited testing done waiting for others to upgrade to v1.5 of Pixelpost, but I've done exhaustive testing on every possible scenerio I could think of. Also, if you should have any ideas about how to make it better, please let me know as well!

Thanks, and enjoy.

Last edited by jbulava; 06-09-2006 at 11:10 PM. Reason: adding map link
Reply With Quote
  #2  
Old 06-09-2006, 11:42 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,700
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
Sounds and look cool
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #3  
Old 06-10-2006, 11:09 AM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via Skype™ to Joe[y]
yo. great work - just a shame it doesn't work for me:

receiving this error:

Quote:
Settings not updated. One or more values were invalid.
i know the api keys i've got work and i know they're version 2 because i tested them on a html page and the maps were produced just fine. could this be to do with the hidden forms such as map coordinates and zoom depth?

Quote:
PHP-version 4.4.0 (Pixelpost's min requirement: PHP version: 4.3.0 )

MySQL version 4.1.19-standard (Pixelpost's min requirement: MySQL: 3.23.58 )
__________________
Web Design North Wales
Reply With Quote
  #4  
Old 06-10-2006, 01:42 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,707
Send a message via Yahoo to raminia
cool,
please add your addon to the addon list on wiki
http://wiki.pixelpost.org/index.php?...xelpost_Addons
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #5  
Old 06-10-2006, 06:21 PM
jbulava's Avatar
jbulava Offline
forum loafer
 
Join Date: Jun 2006
Location: Manchester, NJ, US
Posts: 19
Joe[y],

This is an error that is displayed when validating the input for three things after 'Update Settings' is pressed: API version, Width and Height. I use the 'eregi' php function to make sure these three values are numeric. If the comparison fails, which would be on any non-numeric character being present or the field being left blank, then the message should show.

Make sure that your values are simply numbers. In other words, don't put 'px' in the boxes for width or height, just numbers. Check for spaces as well since they count as invalid characters.

I am running PHP-version 4.3.10 and MySQL version 4.1.12-log so I don't believe there is a problem there. The hidden maps and zoom levels should not be connected to this error message since they are hidden variables that do not need validation. The comparison used is shown below.

Quote:
// Validate numeric input
$pattern = "^[0-9]+$";
if ( eregi($pattern,$apiVer) && eregi($pattern,$userWidth) && eregi($pattern,$userHeight) ) {
...table is updated...
else { ... show that error message ... }
Let me know if this works.
Reply With Quote
  #6  
Old 06-10-2006, 07:59 PM
Connie
Guest
 
Posts: n/a
this is a great step forwards, I am strongly interested in these possibilities
congratulation!

But please help me to find out:

is there a way to add this info to each photo instead of using one map as additonal page?

I would like to have features like this but in the last 12 months I was in

Russia, Armenia, Italia, Switzerland, Netherlands beside Germany...

how to get these photos to the map?
Reply With Quote
  #7  
Old 06-11-2006, 10:41 AM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via Skype™ to Joe[y]
i understand that and i've checked for spaces and everything but i simply can't update the stuff via the addons page - i have to go into phpmyadmin and change stuff from there.

perhaps there is something small in the code which just isn't compatible with my php version etc. i wouldn't know where to start in spotting this though.
__________________
Web Design North Wales
Reply With Quote
  #8  
Old 06-11-2006, 10:44 AM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via Skype™ to Joe[y]
ok. quick point here.. god knows why it's producing querys like this but maybe you will know:

Code:
UPDATE `pixelpost_jbgMap` SET `user_width` = '700',
`user_height` = '500' WHERE `id` =1 AND CONVERT( `user_api_key` USING utf8 ) = 'ABQIAAA***********************j1ZLlPXh3-9w8d6NxQMh7pUuHXMwz4FwrCCjfKprnhmog' AND CONVERT( `admin_api_key` USING utf8 ) = 'ABQIAAAA_*****************eZ7zMgmoVRSpWfyr-ayDseFj2xckyIYVIH1Y6A' AND `api_ver` =2 AND CONVERT( `icon_type` USING utf8 ) = 'default' AND `map_type` =0 AND CONVERT( `info_thumb` USING utf8 ) = ' checked' AND CONVERT( `info_headline` USING utf8 ) = ' checked' AND CONVERT( `info_date` USING utf8 ) = ' checked' AND CONVERT( `info_time` USING utf8 ) = '' AND CONVERT( `info_categories` USING utf8 ) = '' AND `user_zoom` =3 AND CONVERT( `user_center` USING utf8 ) = '(39, -94.4)' AND `user_width` =800 AND `user_height` =532 AND `admin_zoom` =3 AND CONVERT( `admin_center` USING utf8 ) = '(39, -94.4)' LIMIT 1 ;
__________________
Web Design North Wales
Reply With Quote
  #9  
Old 06-12-2006, 03:42 AM
jbulava's Avatar
jbulava Offline
forum loafer
 
Join Date: Jun 2006
Location: Manchester, NJ, US
Posts: 19
From this query, it seems like there may be a collation type issue. I know in newer versions of the phpmyadmin you can set/view the collation for each field. If you can, check to see what it is set for each in the jbgmap table. By default, I thought it was latin1 which should cover any characters needed, however, if your fields are utf8, then the query may be trying to convert the latin1 values to utf8 values to fit in the database.

If you would like to give something a try, edit line 59 in the admin_jbgMap.php file (this should be the end of the create table). We can try and force the database to use the latin1 charset/collation by replacing:

)";

with:

) DEFAULT CHARSET=latin1";

After that, drop the current jbgMap table and go back to the addon page in Pixelpost to create the table with this new line. Hopefully that should stop the convert function from being called and altering the values.
Reply With Quote
  #10  
Old 06-12-2006, 06:01 PM
dorowski Offline
forum loafer
 
Join Date: Jun 2005
Posts: 3
Send a message via ICQ to dorowski Send a message via AIM to dorowski Send a message via Yahoo to dorowski
This is awesome, it works perfectly. Very easy to install, thanks
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 02:15 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. | Style Design: d3 designs