Google Maps

GK User
Thu Nov 20, 2014 5:03 pm
How can I display the google map adress for a new contact.
User avatar
Fresh Boarder

GK User
Thu Nov 20, 2014 8:32 pm
Hello,

You can display a map by adding the following code:

Code: Select all
<div class="gk-map static" data-latitude="-34.397" data-longitude="150.644" data-ui="yes" data-zoom="8"></div>


as a text in the "Other informations" field. More details are available here: http://demo.gavick.com/joomla25/photo/i ... e-features
User avatar
Administrator

GK User
Fri Nov 21, 2014 12:05 pm
Thank You very much!
User avatar
Fresh Boarder

GK User
Sat Nov 22, 2014 7:18 pm
How can i find this class???

<div class="gk-map static" data-latitude="-34.397" data-longitude="150.644" data-ui="yes" data-zoom="8"></div>

???
User avatar
Fresh Boarder

GK User
Sun Nov 23, 2014 9:31 am
@touchrepair - sorry but I don't understand your question - could you elaborate?
User avatar
Administrator

GK User
Mon Nov 24, 2014 7:35 am
in which file I can find the div for the map
User avatar
Fresh Boarder

GK User
Mon Nov 24, 2014 8:17 am
There is no file for it - you have to put this code in the "Other informations" field in the contact which should display the map on the single contact view.
User avatar
Administrator

GK User
Wed Nov 26, 2014 9:56 pm
In

Miscellaneous Information in Contact or in contakt modul???

sorry
User avatar
Fresh Boarder

GK User
Wed Nov 26, 2014 10:05 pm
ok i have are is the problem with the map i see only the map not the window of contact information you can look

http://luft-bilder.net/index.php/kontakt
User avatar
Fresh Boarder

GK User
Wed Nov 26, 2014 10:12 pm
@touchrepair - please remove white space from the content of your divs - you have:

Code: Select all
<div class="gk-map static" data-latitude="48.20412" data-longitude="8.58225" data-zoom="12" data-ui="yes"> </div>


and you should have:

Code: Select all
<div class="gk-map static" data-latitude="48.20412" data-longitude="8.58225" data-zoom="12" data-ui="yes"></div>
User avatar
Administrator

GK User
Thu Nov 27, 2014 8:28 am
Is not working this white space goes every time when i save automaticeli inside....why????

the next problem is i can not switch the text editor????
User avatar
Fresh Boarder

GK User
Thu Nov 27, 2014 10:26 am
In this case plase open file html/com_contact/contact/default.php and please replace the following line:

Code: Select all
<?php echo preg_replace('@(<div class="gk-map.*?></div>).*@mis', '<div class="gk-map-contact header">$1</div>', $this->contact->misc); ?>

to:
Code: Select all
<?php echo preg_replace('@(<div class="gk-map.*?>.*?</div>).*@mis', '<div class="gk-map-contact header">$1</div>', $this->contact->misc); ?>


and also please replace the following line in the same file:

Code: Select all
<?php echo preg_replace('@<div class="gk-map.*?></div>@mis', '', $this->contact->misc); ?>

to:
Code: Select all
<?php echo preg_replace('@<div class="gk-map.*?>*.?</div>@mis', '', $this->contact->misc); ?>
User avatar
Administrator

GK User
Thu Nov 27, 2014 5:15 pm
i can not find this in the default.php????
User avatar
Fresh Boarder

GK User
Thu Nov 27, 2014 5:17 pm
thats my default.php



<?php
/**
* @package Joomla.Site
* @subpackage com_contact
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

$cparams = JComponentHelper::getParams ('com_media');
?>
<div class="contact<?php echo $this->pageclass_sfx?>" itemscope itemtype="http://schema.org/Person">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<?php if ($this->contact->name && $this->params->get('show_name')) : ?>
<h2>
<span class="contact-name" itemprop="name"><?php echo $this->contact->name; ?></span>
</h2>
<?php endif; ?>
<?php if ($this->params->get('show_contact_category') == 'show_no_link') : ?>
<h3>
<span class="contact-category"><?php echo $this->contact->category_title; ?></span>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_contact_category') == 'show_with_link') : ?>
<?php $contactLink = ContactHelperRoute::getCategoryRoute($this->contact->catid);?>
<h3>
<span class="contact-category"><a href="<?php echo $contactLink; ?>">
<?php echo $this->escape($this->contact->category_title); ?></a>
</span>
</h3>
<?php endif; ?>

<?php if ($this->params->get('show_tags', 1) && !empty($this->item->tags)) : ?>
<?php $this->item->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>

<?php if ($this->params->get('show_contact_list') && count($this->contacts) > 1) : ?>
<form action="#" method="get" name="selectForm" id="selectForm">
<?php echo JText::_('COM_CONTACT_SELECT_CONTACT'); ?>
<?php echo JHtml::_('select.genericlist', $this->contacts, 'id', 'class="inputbox" onchange="document.location.href = this.value"', 'link', 'name', $this->contact->link);?>
</form>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')!='plain'){?>
<?php echo JHtml::_($this->params->get('presentation_style').'.start', 'contact-slider'); ?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('COM_CONTACT_DETAILS'), 'basic-details'); } ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_DETAILS').'</h3>'; ?>
<?php endif; ?>
<?php if ($this->contact->image && $this->params->get('show_image')) : ?>
<div class="contact-image">
<?php echo JHtml::_('image', $this->contact->image, JText::_('COM_CONTACT_IMAGE_DETAILS'), array('align' => 'middle', 'itemprop' => 'image')); ?>
</div>
<?php endif; ?>

<?php if ($this->contact->con_position && $this->params->get('show_position')) : ?>
<p class="contact-position" itemprop="jobTitle"><?php echo $this->contact->con_position; ?></p>
<?php endif; ?>

<?php echo $this->loadTemplate('address'); ?>

<?php if ($this->params->get('allow_vcard')) : ?>
<?php echo JText::_('COM_CONTACT_DOWNLOAD_INFORMATION_AS');?>
<a href="<?php echo JRoute::_('index.php?option=com_contact&amp;view=contact&amp;id='.$this->contact->id . '&amp;format=vcf'); ?>">
<?php echo JText::_('COM_CONTACT_VCARD');?></a>
<?php endif; ?>
<p></p>
<?php if ($this->params->get('show_email_form') && ($this->contact->email_to || $this->contact->user_id)) : ?>

<?php if ($this->params->get('presentation_style')!='plain'):?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_EMAIL_FORM').'</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('form'); ?>
<?php endif; ?>
<?php if ($this->params->get('show_links')) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($this->params->get('show_articles') && $this->contact->user_id && $this->contact->articles) : ?>
<?php if ($this->params->get('presentation_style')!='plain'):?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('JGLOBAL_ARTICLES'), 'display-articles'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('JGLOBAL_ARTICLES').'</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('articles'); ?>
<?php endif; ?>
<?php if ($this->params->get('show_profile') && $this->contact->user_id && JPluginHelper::isEnabled('user', 'profile')) : ?>
<?php if ($this->params->get('presentation_style')!='plain'):?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('COM_CONTACT_PROFILE'), 'display-profile'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_PROFILE').'</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('profile'); ?>
<?php endif; ?>
<?php if ($this->contact->misc && $this->params->get('show_misc')) : ?>
<?php if ($this->params->get('presentation_style')!='plain'){?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('COM_CONTACT_OTHER_INFORMATION'), 'display-misc');} ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_OTHER_INFORMATION').'</h3>'; ?>
<?php endif; ?>
<div class="contact-miscinfo">
<div class="<?php echo $this->params->get('marker_class'); ?>">
<?php echo $this->params->get('marker_misc'); ?>
</div>
<div class="contact-misc">
<?php echo $this->contact->misc; ?>
</div>
</div>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')!='plain'){?>
<?php echo JHtml::_($this->params->get('presentation_style').'.end');} ?>
</div>
User avatar
Fresh Boarder

GK User
Fri Nov 28, 2014 7:41 am
It seems that you have opened the default.php file in the component instead of the html/com_contact/contact/default.php in the template directory.
User avatar
Administrator

GK User
Fri Nov 28, 2014 9:30 am
ok i have thanks
User avatar
Fresh Boarder


cron