GermanEnglish

G-Maps – Free Google Maps Module for Pligg

This module allows users to add an address during the submission process. It then displays a map from Google in a story's detail view. In the summary pages stories containing a map are marked with an icon in the story title which links to the story page.

 

The map does not require an API key from Google; it is embedded via inline frame, no JavaScript is used.

 

At the PliggPro shop the guys are asking for $ 18 USD or so for a module with essentially the same functionality (this module does not display a bubble with the story title as headline, check out a demo over at my-african-news.com). But as Geoserv over at Pliggs has noted:

“Some of the modules are worth the price, and if you have a few bucks, are worth the investment. But there are countless that are simply there to get newbies to part with their cash and nothing more.”

I believe that their Google maps module might be one of them. Maybe its easier to install, or has some other fancy stuff I can't even dream of which they have hidden somewhere where it secretly does its magic, but $ 18 bucks? So, I made my own and am now offering it to the world...

Installation

The module requires that five extra fields are enabled. Below I have briefly outlined how to do that.

First, you have to enable extra fields in the Pligg config. Go to configure->misc and set “Enable Extra Fields” to “true” .

Then open libs/extra_fields.php with your favourite editor and set: define('Enable_Extra_Field_1', false); to: define('Enable_Extra_Field_1', true);. Do that for the first five fields. Then name the fields and enter a description though that is not mandatory. I named the fields as follows:

 

define('Field_1_Title', 'Street Address');

define('Field_2_Title', 'City');

define('Field_3_Title', 'State');

define('Field_4_Title', 'ZIP Code');

define('Field_5_Title', 'Country');

 

To avoid that the address data is displayed at the summary pages you would need to edit link_summary.tpl located in your template folder. Find

{if $Enable_Extra_Field_1 eq 1}{if $link_field1 neq ""}<br/><b>{$Field_1_Title}:</b> {$link_field1}{/if}{/if}

at about line 138 and insert before: {if $pagename eq "story"}.

Paste the closing if-statement {/if} before the extra field you want to show in summary pages. So if you would like to show none paste it after:

{if $Enable_Extra_Field_5 eq 1}{if $link_field5 neq ""}<br/><b>{$Field_5_Title}:</b> {$link_field5}{/if}{/if}.

If you would like to show Extra_Field5 paste it before, etc. pp.

 

Download

 Download google maps.zip
File Title: google maps.zip (Details)
File Type: zip
File Version: 0.2
File Size: 3.56 Kb
License:
Rating: Average vote 5 stars (1 Votes)
Your Vote:

 

That's pretty much it. Enjoy!

 

Bugs / Features

Bugs and feature requests may be reported here >>.

You may send a trackback for this article by using the following Trackback link

Add comment


Security code
Refresh

Latest Comments

New Links

Data Driven Journalism
Stadtimker.de
The Political Compass
Great Artists' Mews

More...  

Search on this Site

Downloads

Mar.12

YALE - Yet Another Logfile Extractor, is a very simple, q...

Feb.12

LinkedIn released a new widget: the "Apply with LinkedI...

Short URL for this page
Banner
Copyright © 2012 VAGGI.( DE | EU ). All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.
Template by RocketTheme Suchmaschinenoptimierung mit Ranking-Hits

This material is Open Content   Stop Spam Harvesters, Join Project Honey Pot   Creative Commons Attribution 3.0 Unported License   My-African-News.com   Jinja.eu - Home of the Source of River Nile - The East African Community Website   Vaggi.org_NGO-Directory/NRO-Verzeichnis_Sozialwissenschaftliche_OpenAccess_Zeitschriften/Social_Scientific_OpenAccess_e-Journals
Protected by Bot-Trap.de, Webseitenschutz
subdued