Последние изменения: 02 Март 2014
How to add aditional Contact or Link fields to Adress & Map field?
Official Answer
Filed Address & Map combine location and address in one field. When configure this field you may find list of contact fields or links.
If you do not find something that you want to be there, you can easily add any field there.
Create file joomla_root/components/com_cobalt/fields/geo/additional.php.
Now edit it add there 2 arrays
$contacts = array(
'im' => array(
'label' => JText::_('Instant Mesanger'),
'patern' => '<a href="/ http://www.im.com/sendmsg/ [VALUE]">[VALUE]</a>',
'icon' => JURI::root() . 'components/com_cobalt/fields/geo/icons/im.png'
),
'skype' => array(
'label' => JText::_('Skype'),
'patern' => '<a href="skype:[VALUE]?call">[VALUE]</a>',
'icon' => JURI::root() . 'components/com_cobalt/fields/geo/icons/skype.png'
)
);
$links = array(
'odn' => array(
'label' => JText::_('Odnoklasniki'),
'icon' => JURI::root() . 'components/com_cobalt/fields/geo/icons/odn.png'
),
'other' => array(
'label' => JText::_('Other'),
'icon' => JURI::root() . 'components/com_cobalt/fields/geo/icons/other.png'
)
);
OK, now you see that you have 2 arrays. One for contact fileds one for links. Of course you need to change icon URL to correct one.
That is it. Now on ther address enter form you will see additional fields.
Or give us information what you want to be added and we will add it next release.