Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-03-26 16:19:13

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

plh_export_markers : list of markers from articles for google map

Hi everybody,

this is my first plugin.
Current version : v0.3

Will generate a list of markers from your articles (provided a latitude and longitude fields are present) and export them as a list of json objects to your javascript directory.
As many markers as you want !
The plugin help provide an example of how to use it on a gogle map.
Options allows selection of fields and section/category choice.

Download link

  • 2012/04/25 : v0.4 bug fix
  • 2012/04/26 : v0.5 help modification & better test of options
  • 2012/04/26 : v0.6 fix url for option button in markers_list tab
  • 2012/04/26 : v0.7 string translation

Last edited by planeth (2012-04-26 21:17:50)

Offline

#2 2012-03-28 17:12:05

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: plh_export_markers : list of markers from articles for google map

Hello Aleth, Love the idea of your plugin. When I tried to check it out I got the following errors. Not all of my articles have lat/long data so maybe that’s what went wrong?

Notice: Array to string conversion in /home/mysite/public_html/textpattern/lib/txplib_misc.php on line 23


Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/mysite/public_html/textpattern/lib/txplib_misc.php(653) : eval()'d code on line 325

My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#3 2012-03-29 07:02:35

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

Re: plh_export_markers : list of markers from articles for google map

Hi Matt,
i don’t think so as the plugin return only article with populated lat/long data.
Just to be sure , did you run the plugin prefs ? (options on plugin admin page)

Offline

#4 2012-04-25 16:12:54

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: plh_export_markers : list of markers from articles for google map

I get those errors after saving on the prefs page. I tried uninstalling and reinstalling and got the same errors after saving on the prefs tab.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#5 2012-04-25 19:57:23

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

Re: plh_export_markers : list of markers from articles for google map

Ok i got it.
Correction is out .
plh_export_markers v0.4

Last edited by planeth (2012-04-25 19:59:37)

Offline

#6 2012-04-25 21:43:39

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 390

Re: plh_export_markers : list of markers from articles for google map

nice plugin, planeth!

I know it is out of the scope of the plugin, but maybe it will be nice to add a bound fixer calculator to javascript example on the plugin help, because google maps help is really confusing with bounds for dummies like me and it is a tipical functionality everybody needs for his maps at sometime: fit the zoom to let see all the markers by default.


<txp:rocks/>

Offline

#7 2012-04-26 07:06:53

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

Re: plh_export_markers : list of markers from articles for google map

Hi milosevic,

what do you mean by fixer calculator ?
Is this a mean of setting the zoom ?
Or the size of the map being displayed ? I’m a bit confused.

Just elaborate a bit further or give an example and i’ll add anything useful to the help.

Offline

#8 2012-04-26 15:56:48

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: plh_export_markers : list of markers from articles for google map

Errors are gone but how do I get the markers.js generated? Should the js_dir be an absolute path?

Actually if I select items in the gg_map_info_window_fields box and click Save I get an error:

Notice: Array to string conversion in /home/mattwho/public_html/textpattern/lib/txplib_misc.php on line 23

Edit: Found the markers tab under content. Hadn’t looked for it there. Clicking Go there results in the following error:

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ANDcustom_1 LIKE_AND custom_2 LIKE_’‘ at line 1 select ID as thisid, Section as section, Title as title, url_title, unix_timestamp(Posted) as posted, custom_1,custom_2 from textpattern where `Section` LIKE ‘article’ AND (`Category1` LIKE ‘photography’ OR `Category2` LIKE ‘photography’) ANDcustom_1 LIKE_AND custom_2 LIKE_’ in /home/mysite/public_html/textpattern/lib/txplib_db.php on line 89
google map infoWindow content Location

Last edited by MattD (2012-04-26 16:00:33)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#9 2012-04-26 16:01:28

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: plh_export_markers : list of markers from articles for google map

Also the options button on the Markers tab sends me to /admin/index.php?event=plugin_prefs.plh_export_markers which is not where my textpattern admin side is.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#10 2012-04-26 17:16:24

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

Re: plh_export_markers : list of markers from articles for google map

Hi Matt,

Should the js_dir be an absolute path?

no it’s the relative path from your site directory.

Found the markers tab under content

Yes, i added this in the plugin help. I consider that it make more sense to put it there.

Warning: You have an error in your SQL syntax;

DO you have the v0.5 version ? It should correct this error.

options button on the Markers tab sends me to /admin/index.php?event=plugin_prefs.plh_export_markers

Ooops … i forgot this one.
v0.6 to correct

Actually if I select items in the gg_map_info_window_fields box and click Save I get an error:
Notice: Array to string conversion in /home/mattwho/public_html/textpattern/lib/txplib_misc.php on line 23

Could you tell which version you are using ? I can’t reproduce the problem…
Could you delete the plugin before installing the new version ?

Last edited by planeth (2012-04-26 17:21:46)

Offline

#11 2012-04-26 19:24:17

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: plh_export_markers : list of markers from articles for google map

v0.6 I still get Notice: Array to string conversion in /home/mysite/public_html/textpattern/lib/txplib_misc.php on line 23 when I make selections in gg_map_info_window.

Other than that and no translations for en-us it seems to be working. I was able to create markers.js.

Last edited by MattD (2012-04-26 19:24:31)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#12 2012-04-26 20:25:14

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

Re: plh_export_markers : list of markers from articles for google map

no matter what i try i can’t reproduce the problem.
Is it still the same error as your first comment ?
Could you send me a screen-shot of the prefs tab ?
Are you using special names for the fields in the drop_down select ?

Offline

Board footer

Powered by FluxBB