Support Forum

  • Page:
  • 1

More than 3 Markers?

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hello over there,

joomlabamboo is great, alwways fun to use templates and extensions. But now i need a little help. Is it possible to display more than 3 markers on the map?

Which lines do i have to edit?

best regards,
dawa
  • dawa2's Avatar
  • dawa2
  • 6 Month Developer
  • 2 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
I've made it.

Here we go:
first the xmls- file.

Duplicate for additonal marker these lines and changes the numbers on pub, lat long, title and html. You can copy and paste an existing marker. Its starts with a spacer and ends with a spacer.

This is my last marker, number nine/9.
<param name="@spacer" type="spacer" default="" label="" description="" />
<param name="pub9" type="list" default="no" label="Publish this marker" description="Line break after name field">
<option value="1">Yes</option>
<option value="0">No</option>
</param>
<param name="lat9" type="text" default="" label="Marker 9 Latitude" description="Marker 9 Latitude" />
<param name="long9" type="text" default="" label="Marker 9 Longitude" description="Marker 9 Longitude" />
<param name="title9" type="text" default="" label="Title for ninth marker" description="Enter plain text or html here for a title on the marker." />
<param name="html9" type="textarea" cols="30" rows="5" default="" label="Description for ninth marker" description="Enter plain text or html here for a description on the marker." />
<param name="@spacer" type="spacer" default="" label="" description="" />

the xml file will generate in the Joomla backend the additonal formfields where the new more markers can be added.

now the php. file

duplicate the text-block starting at line 18.

$lat7 = (float)$params->get( 'lat7', '7' );
$lat8 = (float)$params->get( 'lat8', '8' );
$lat9 = (float)$params->get( 'lat9', '9' );
$long7 = (float)$params->get( 'long7', '7' );
$long8 = (float)$params->get( 'long8', '8' );
$long9 = (float)$params->get( 'long9', '9' );
$title7 = $params->get( 'title7', '' );
$title8 = $params->get( 'title8', '' );
$title9 = $params->get( 'title9', '' );
$html7 = $params->get( 'html7', '' );
$html8 = $params->get( 'html8', '' );
$html9 = $params->get( 'html9', '' );
$pub7 = (int)$params->get( 'pub7', '0' );
$pub8 = (int)$params->get( 'pub8', '0' );
$pub9 = (int)$params->get( 'pub9', '0' );


Add (starting at line 70) a brand new set of lats, longs and pubs like:

$lats = array($lat1,$lat2,$lat3,$lat4,$lat5,$lat6,$lat7,$lat8,$lat9);

and add titles and htmls starting at line 73 before the last ")"

preg_replace("/\r?\n/", "\\n", addslashes($title9)),
preg_replace("/\r?\n/", "\\n", addslashes($html9)),


Change line 89 from

<?php for ($i = 0; $i < 3; $i++) {

to

<?php for ($i = 0; $i < 9; $i++) {

if 9 is the new summ of all markers.

You can upload the new files into the modules folder and replace the existing files. If everything is correct, the backend and the front-end displays the new markes. If the markers are not at the position they should be, you probably made a tiny mistake at numbering the lats and longs.

best regards,

joomlabamboo is always fun, as i said :)
  • dawa2's Avatar
  • dawa2
  • 6 Month Developer
  • 2 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
The following user(s) said Thank You: Seth
B) Thank you for sharing your solution Dawa.
  • Seth's Avatar
  • Seth
  • Moderator
  • 8358 posts
  • 225 Thanks
  • Karma: 202
The administrator has disabled public write access.
thanks so much dawa!! very helpfull post!! :cheer:
  • yubisay's Avatar
  • yubisay
  • LIfetime Developer - Big Bamboo
  • 131 posts
  • Karma: 1
The administrator has disabled public write access.
:woohoo:

I love it when a members post helps another member!

Great stuff.
  • Seth's Avatar
  • Seth
  • Moderator
  • 8358 posts
  • 225 Thanks
  • Karma: 202
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers