Page 1 of 1

Maps in joomla contact

Posted: 21 Apr 2014, 14:36
by superbario
Hello everyone!!

I need to insert phoca maps in contacts, I read here on the forum that to do that you need to change the core joomla ... I found how to do it (in my server from my template folder, edit the file default.php that is located inside html --> com-contact)

obviously using the phoca maps string for the plugin does not work because it only works inside articles... so my question is: what code or string should I use into default.php for render one of my phoca maps??

of course i already see this https://www.phoca.cz/documents/16-joomla ... t-articles

but i don't know which code use

thank you!!!

Re: Maps in joomla contact

Posted: 21 Apr 2014, 20:31
by Jan
Hi, Phoca Maps Plugin is standard Joomla! content plugin (content means, it works in articles only, but e.g. you can enable in options, that modules or other parts will accept content plugins)

- so try to see if there is no option to accept content plugins in contact component
- if not, you should edit its description and you should add the code which will render form which will accept the content plugin

The Phoca Maps plugin is always the same, it does not change, you only change the code of contact component to accept content plugins.

Jan

Re: Maps in joomla contact

Posted: 22 Apr 2014, 10:36
by superbario
thank you very much for your reply!

Unfortunately I couldn't find options to enable plugins in contacts.

This is the part of code that I want to replace (show a google map of another component that i don't like, i would like to replace it with phoca maps!)

any suggestions?
I'm sorry but I don't have good skill of coding and i can't understand.

thanks for your help. have a nice day!

Code: Select all

 <!-- Map -->
        <?php if ($this->params->get('presentation_style') == 'plain'):?>
          <div class="span12">
        <?php endif; ?>
          <div class="contact_map" id="contact_map">
            {google_map}
          </div>
        <?php if ($this->params->get('presentation_style') == 'plain'):?>
          </div>
        <?php endif; ?> 

    <?php if ($this->params->get('presentation_style') == 'plain'):?>
      </div>
    <?php endif; ?>

    <?php if ($this->params->get('presentation_style') == 'plain'):?>
      <div class="row-fluid">
    <?php endif; ?>

Re: Maps in joomla contact

Posted: 25 Apr 2014, 23:45
by Jan
Hi, in the code, I see no part of the description, etc, see:
https://www.phoca.cz/documents/16-joomla ... t-articles

you need to find the part which outputs the description or similar input fields, then if you will find the place, you will just change the code, so if will accept content plugins - I didn't do this in contact form yet, so I don't know the place, but maybe on forum.joomla.org there will be some guides how to change the com_contact to accept content plugins (this should be a common Joomla! question)

from:
echo $this->category->description;
to:
echo JHTML::_('content.prepare', $this->category->description);

Jan