Файловый менеджер - Редактировать - /var/www/iplanru/data/www/intesco.ru/d59ed/com_contact.tar
Назад
metadata.xml 0000666 00000000076 15077331333 0007062 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <metadata> </metadata> router.php 0000666 00000013507 15077331333 0006614 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Routing class from com_contact * * @package Joomla.Site * @subpackage com_contact * @since 3.3 */ class ContactRouter extends JComponentRouterBase { /** * Build the route for the com_contact component * * @param array &$query An array of URL arguments * * @return array The URL arguments to use to assemble the subsequent URL. * * @since 3.3 */ public function build(&$query) { $segments = array(); // Get a menu item based on Itemid or currently active $app = JFactory::getApplication(); $menu = $app->getMenu(); $params = JComponentHelper::getParams('com_contact'); $advanced = $params->get('sef_advanced_link', 0); if (empty($query['Itemid'])) { $menuItem = $menu->getActive(); } else { $menuItem = $menu->getItem($query['Itemid']); } $mView = (empty($menuItem->query['view'])) ? null : $menuItem->query['view']; $mId = (empty($menuItem->query['id'])) ? null : $menuItem->query['id']; if (isset($query['view'])) { $view = $query['view']; if (empty($query['Itemid']) || empty($menuItem) || $menuItem->component != 'com_contact') { $segments[] = $query['view']; } unset($query['view']); } // Are we dealing with a contact that is attached to a menu item? if (isset($view) && ($mView == $view) and (isset($query['id'])) and ($mId == (int) $query['id'])) { unset($query['view']); unset($query['catid']); unset($query['id']); return $segments; } if (isset($view) and ($view == 'category' or $view == 'contact')) { if ($mId != (int) $query['id'] || $mView != $view) { if ($view == 'contact' && isset($query['catid'])) { $catid = $query['catid']; } elseif (isset($query['id'])) { $catid = $query['id']; } $menuCatid = $mId; $categories = JCategories::getInstance('Contact'); $category = $categories->get($catid); if ($category) { // TODO Throw error that the category either not exists or is unpublished $path = array_reverse($category->getPath()); $array = array(); foreach ($path as $id) { if ((int) $id == (int) $menuCatid) { break; } if ($advanced) { list($tmp, $id) = explode(':', $id, 2); } $array[] = $id; } $segments = array_merge($segments, array_reverse($array)); } if ($view == 'contact') { if ($advanced) { list($tmp, $id) = explode(':', $query['id'], 2); } else { $id = $query['id']; } $segments[] = $id; } } unset($query['id']); unset($query['catid']); } if (isset($query['layout'])) { if (!empty($query['Itemid']) && isset($menuItem->query['layout'])) { if ($query['layout'] == $menuItem->query['layout']) { unset($query['layout']); } } else { if ($query['layout'] == 'default') { unset($query['layout']); } } } $total = count($segments); for ($i = 0; $i < $total; $i++) { $segments[$i] = str_replace(':', '-', $segments[$i]); } return $segments; } /** * Parse the segments of a URL. * * @param array &$segments The segments of the URL to parse. * * @return array The URL attributes to be used by the application. * * @since 3.3 */ public function parse(&$segments) { $total = count($segments); $vars = array(); for ($i = 0; $i < $total; $i++) { $segments[$i] = preg_replace('/-/', ':', $segments[$i], 1); } // Get the active menu item. $app = JFactory::getApplication(); $menu = $app->getMenu(); $item = $menu->getActive(); $params = JComponentHelper::getParams('com_contact'); $advanced = $params->get('sef_advanced_link', 0); // Count route segments $count = count($segments); // Standard routing for newsfeeds. if (!isset($item)) { $vars['view'] = $segments[0]; $vars['id'] = $segments[$count - 1]; return $vars; } // From the categories view, we can only jump to a category. $id = (isset($item->query['id']) && $item->query['id'] > 1) ? $item->query['id'] : 'root'; $contactCategory = JCategories::getInstance('Contact')->get($id); $categories = ($contactCategory) ? $contactCategory->getChildren() : array(); $vars['catid'] = $id; $vars['id'] = $id; $found = 0; foreach ($segments as $segment) { $segment = $advanced ? str_replace(':', '-', $segment) : $segment; foreach ($categories as $category) { if ($category->slug == $segment || $category->alias == $segment) { $vars['id'] = $category->id; $vars['catid'] = $category->id; $vars['view'] = 'category'; $categories = $category->getChildren(); $found = 1; break; } } if ($found == 0) { if ($advanced) { $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from('#__contact_details') ->where($db->quoteName('catid') . ' = ' . (int) $vars['catid']) ->where($db->quoteName('alias') . ' = ' . $db->quote($db->quote($segment))); $db->setQuery($query); $nid = $db->loadResult(); } else { $nid = $segment; } $vars['id'] = $nid; $vars['view'] = 'contact'; } $found = 0; } return $vars; } } /** * Contact router functions * * These functions are proxys for the new router interface * for old SEF extensions. * * @deprecated 4.0 Use Class based routers instead */ function ContactBuildRoute(&$query) { $router = new ContactRouter; return $router->build($query); } function ContactParseRoute($segments) { $router = new ContactRouter; return $router->parse($segments); } views/contact/view.html.php 0000666 00000024453 15077331333 0012003 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; require_once JPATH_COMPONENT . '/models/category.php'; /** * HTML Contact View class for the Contact component * * @package Joomla.Site * @subpackage com_contact * @since 1.5 */ class ContactViewContact extends JViewLegacy { protected $state; protected $form; protected $item; protected $return_page; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a Error object. */ public function display($tpl = null) { $app = JFactory::getApplication(); $user = JFactory::getUser(); $state = $this->get('State'); $item = $this->get('Item'); $this->form = $this->get('Form'); // Get the parameters $params = JComponentHelper::getParams('com_contact'); if ($item) { // If we found an item, merge the item parameters $params->merge($item->params); // Get Category Model data $categoryModel = JModelLegacy::getInstance('Category', 'ContactModel', array('ignore_request' => true)); $categoryModel->setState('category.id', $item->catid); $categoryModel->setState('list.ordering', 'a.name'); $categoryModel->setState('list.direction', 'asc'); $categoryModel->setState('filter.published', 1); $contacts = $categoryModel->getItems(); } // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // check if access is not public $groups = $user->getAuthorisedViewLevels(); $return = ''; if ((!in_array($item->access, $groups)) || (!in_array($item->category_access, $groups))) { JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR')); return; } $options['category_id'] = $item->catid; $options['order by'] = 'a.default_con DESC, a.ordering ASC'; // Handle email cloaking if ($item->email_to && $params->get('show_email')) { $item->email_to = JHtml::_('email.cloak', $item->email_to); } if ($params->get('show_street_address') || $params->get('show_suburb') || $params->get('show_state') || $params->get('show_postcode') || $params->get('show_country')) { if (!empty ($item->address) || !empty ($item->suburb) || !empty ($item->state) || !empty ($item->country) || !empty ($item->postcode)) { $params->set('address_check', 1); } } else { $params->set('address_check', 0); } // Manage the display mode for contact detail groups switch ($params->get('contact_icons')) { case 1 : // text $params->set('marker_address', JText::_('COM_CONTACT_ADDRESS') . ": "); $params->set('marker_email', JText::_('JGLOBAL_EMAIL') . ": "); $params->set('marker_telephone', JText::_('COM_CONTACT_TELEPHONE') . ": "); $params->set('marker_fax', JText::_('COM_CONTACT_FAX') . ": "); $params->set('marker_mobile', JText::_('COM_CONTACT_MOBILE') . ": "); $params->set('marker_misc', JText::_('COM_CONTACT_OTHER_INFORMATION') . ": "); $params->set('marker_class', 'jicons-text'); break; case 2 : // none $params->set('marker_address', ''); $params->set('marker_email', ''); $params->set('marker_telephone', ''); $params->set('marker_mobile', ''); $params->set('marker_fax', ''); $params->set('marker_misc', ''); $params->set('marker_class', 'jicons-none'); break; default : if ($params->get('icon_address')) { $image1 = JHtml::_('image', $params->get('icon_address', 'con_address.png'), JText::_('COM_CONTACT_ADDRESS').": ", null, false); } else { $image1 = JHtml::_('image', 'contacts/'.$params->get('icon_address', 'con_address.png'), JText::_('COM_CONTACT_ADDRESS').": ", null, true); } if ($params->get('icon_email')) { $image2 = JHtml::_('image', $params->get('icon_email', 'emailButton.png'), JText::_('JGLOBAL_EMAIL').": ", null, false); } else { $image2 = JHtml::_('image', 'contacts/'.$params->get('icon_email', 'emailButton.png'), JText::_('JGLOBAL_EMAIL').": ", null, true); } if ($params->get('icon_telephone')) { $image3 = JHtml::_('image', $params->get('icon_telephone', 'con_tel.png'), JText::_('COM_CONTACT_TELEPHONE').": ", null, false); } else { $image3 = JHtml::_('image', 'contacts/'.$params->get('icon_telephone', 'con_tel.png'), JText::_('COM_CONTACT_TELEPHONE').": ", null, true); } if ($params->get('icon_fax')) { $image4 = JHtml::_('image', $params->get('icon_fax', 'con_fax.png'), JText::_('COM_CONTACT_FAX').": ", null, false); } else { $image4 = JHtml::_('image', 'contacts/'.$params->get('icon_fax', 'con_fax.png'), JText::_('COM_CONTACT_FAX').": ", null, true); } if ($params->get('icon_misc')) { $image5 = JHtml::_('image', $params->get('icon_misc', 'con_info.png'), JText::_('COM_CONTACT_OTHER_INFORMATION').": ", null, false); } else { $image5 = JHtml::_('image', 'contacts/'.$params->get('icon_misc', 'con_info.png'), JText::_('COM_CONTACT_OTHER_INFORMATION').": ", null, true); } if ($params->get('icon_mobile')) { $image6 = JHtml::_('image', $params->get('icon_mobile', 'con_mobile.png'), JText::_('COM_CONTACT_MOBILE').": ", null, false); } else { $image6 = JHtml::_('image', 'contacts/'.$params->get('icon_mobile', 'con_mobile.png'), JText::_('COM_CONTACT_MOBILE').": ", null, true); } $params->set('marker_address', $image1); $params->set('marker_email', $image2); $params->set('marker_telephone', $image3); $params->set('marker_fax', $image4); $params->set('marker_misc', $image5); $params->set('marker_mobile', $image6); $params->set('marker_class', 'jicons-icons'); break; } // Add links to contacts if ($params->get('show_contact_list') && count($contacts) > 1) { foreach ($contacts as &$contact) { $contact->link = JRoute::_(ContactHelperRoute::getContactRoute($contact->slug, $contact->catid)); } $item->link = JRoute::_(ContactHelperRoute::getContactRoute($item->slug, $item->catid)); } JHtml::_('behavior.formvalidation'); //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); $this->contact = &$item; $this->params = &$params; $this->return = &$return; $this->state = &$state; $this->item = &$item; $this->user = &$user; $this->contacts = &$contacts; $item->tags = new JHelperTags; $item->tags->getItemTags('com_contact.contact', $this->item->id); // Override the layout only if this is not the active menu item // If it is the active menu item, then the view and item id will match $active = $app->getMenu()->getActive(); if ((!$active) || ((strpos($active->link, 'view=contact') === false) || (strpos($active->link, '&id=' . (string) $this->item->id) === false))) { if ($layout = $params->get('contact_layout')) { $this->setLayout($layout); } } elseif (isset($active->query['layout'])) { // We need to set the layout in case this is an alternative menu item (with an alternative layout) $this->setLayout($active->query['layout']); } $model = $this->getModel(); $model->hit(); $this->_prepareDocument(); return parent::display($tpl); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_CONTACT_DEFAULT_PAGE_TITLE')); } $title = $this->params->get('page_title', ''); $id = (int) @$menu->query['id']; // if the menu item does not concern this contact if ($menu && ($menu->query['option'] != 'com_contact' || $menu->query['view'] != 'contact' || $id != $this->item->id)) { // If this is not a single contact menu item, set the page title to the contact title if ($this->item->name) { $title = $this->item->name; } $path = array(array('title' => $this->contact->name, 'link' => '')); $category = JCategories::getInstance('Contact')->get($this->contact->catid); while ($category && ($menu->query['option'] != 'com_contact' || $menu->query['view'] == 'contact' || $id != $category->id) && $category->id > 1) { $path[] = array('title' => $category->title, 'link' => ContactHelperRoute::getCategoryRoute($this->contact->catid)); $category = $category->getParent(); } $path = array_reverse($path); foreach ($path as $item) { $pathway->addItem($item['title'], $item['link']); } } if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } if (empty($title)) { $title = $this->item->name; } $this->document->setTitle($title); if ($this->item->metadesc) { $this->document->setDescription($this->item->metadesc); } elseif (!$this->item->metadesc && $this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->item->metakey) { $this->document->setMetadata('keywords', $this->item->metakey); } elseif (!$this->item->metakey && $this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } $mdata = $this->item->metadata->toArray(); foreach ($mdata as $k => $v) { if ($v) { $this->document->setMetadata($k, $v); } } } } views/contact/tmpl/default_form.php 0000666 00000006331 15077331333 0013504 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JHtml::_('behavior.keepalive'); JHtml::_('behavior.formvalidation'); if (isset($this->error)) : ?> <div class="contact-error"> <?php echo $this->error; ?> </div> <?php endif; ?> <div class="contact-form"> <form id="contact-form" action="<?php echo JRoute::_('index.php'); ?>" method="post" class="form-validate form-horizontal"> <fieldset> <legend><?php echo JText::_('COM_CONTACT_FORM_LABEL'); ?></legend> <div class="control-group"> <div class="control-label"><?php echo $this->form->getLabel('contact_name'); ?></div> <div class="controls"><?php echo $this->form->getInput('contact_name'); ?></div> </div> <div class="control-group"> <div class="control-label"><?php echo $this->form->getLabel('contact_email'); ?></div> <div class="controls"><?php echo $this->form->getInput('contact_email'); ?></div> </div> <div class="control-group"> <div class="control-label"><?php echo $this->form->getLabel('contact_subject'); ?></div> <div class="controls"><?php echo $this->form->getInput('contact_subject'); ?></div> </div> <div class="control-group"> <div class="control-label"><?php echo $this->form->getLabel('contact_message'); ?></div> <div class="controls"><?php echo $this->form->getInput('contact_message'); ?></div> </div> <?php if ($this->params->get('show_email_copy')) { ?> <div class="control-group"> <div class="control-label"><?php echo $this->form->getLabel('contact_email_copy'); ?></div> <div class="controls"><?php echo $this->form->getInput('contact_email_copy'); ?></div> </div> <?php } ?> <?php //Dynamically load any additional fields from plugins. ?> <?php foreach ($this->form->getFieldsets() as $fieldset) : ?> <?php if ($fieldset->name != 'contact'):?> <?php $fields = $this->form->getFieldset($fieldset->name);?> <?php foreach ($fields as $field) : ?> <div class="control-group"> <?php if ($field->hidden) : ?> <div class="controls"> <?php echo $field->input;?> </div> <?php else:?> <div class="control-label"> <?php echo $field->label; ?> <?php if (!$field->required && $field->type != "Spacer") : ?> <span class="optional"><?php echo JText::_('COM_CONTACT_OPTIONAL');?></span> <?php endif; ?> </div> <div class="controls"><?php echo $field->input;?></div> <?php endif;?> </div> <?php endforeach;?> <?php endif ?> <?php endforeach;?> <div class="form-actions"><button class="btn btn-primary validate" type="submit"><?php echo JText::_('COM_CONTACT_CONTACT_SEND'); ?></button> <input type="hidden" name="option" value="com_contact" /> <input type="hidden" name="task" value="contact.submit" /> <input type="hidden" name="return" value="<?php echo $this->return_page;?>" /> <input type="hidden" name="id" value="<?php echo $this->contact->slug; ?>" /> <?php echo JHtml::_('form.token'); ?> </div> </fieldset> </form> </div> views/contact/tmpl/default.php 0000666 00000021561 15077331333 0012463 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright Copyright (C) 2005 - 2014 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'); jimport('joomla.html.html.bootstrap'); ?> <div class="contact<?php echo $this->pageclass_sfx?>" itemscope itemtype="http://schema.org/Person"> <?php if ($this->params->get('show_page_heading')) : ?> <h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1> <?php endif; ?> <?php if ($this->contact->name && $this->params->get('show_name')) : ?> <div class="page-header"> <h2> <?php if ($this->item->published == 0) : ?> <span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span> <?php endif; ?> <span class="contact-name" itemprop="name"><?php echo $this->contact->name; ?></span> </h2> </div> <?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_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('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('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'basic-details')); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'basic-details')); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_DETAILS'), 'basic-details'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'basic-details', JText::_('COM_CONTACT_DETAILS', true)); ?> <?php endif; ?> <?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="thumbnail pull-right"> <?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')) : ?> <dl class="contact-position dl-horizontal"> <dd itemprop="jobTitle"> <?php echo $this->contact->con_position; ?> </dd> </dl> <?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&view=contact&id='.$this->contact->id . '&format=vcf'); ?>"> <?php echo JText::_('COM_CONTACT_VCARD');?></a> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.endSlide'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php endif; ?> <?php if ($this->params->get('show_email_form') && ($this->contact->email_to || $this->contact->user_id)) : ?> <?php if ($this->params->get('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-form', JText::_('COM_CONTACT_EMAIL_FORM', true)); ?> <?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 if ($this->params->get('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.endSlide'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php endif; ?> <?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') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('JGLOBAL_ARTICLES'), 'display-articles'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-articles', JText::_('JGLOBAL_ARTICLES', true)); ?> <?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 if ($this->params->get('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.endSlide'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php endif; ?> <?php endif; ?> <?php if ($this->params->get('show_profile') && $this->contact->user_id && JPluginHelper::isEnabled('user', 'profile')) : ?> <?php if ($this->params->get('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_PROFILE'), 'display-profile'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-profile', JText::_('COM_CONTACT_PROFILE', true)); ?> <?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 if ($this->params->get('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.endSlide'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php endif; ?> <?php endif; ?> <?php if ($this->contact->misc && $this->params->get('show_misc')) : ?> <?php if ($this->params->get('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_OTHER_INFORMATION'), 'display-misc'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-misc', JText::_('COM_CONTACT_OTHER_INFORMATION', true)); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'plain'):?> <?php echo '<h3>'. JText::_('COM_CONTACT_OTHER_INFORMATION').'</h3>'; ?> <?php endif; ?> <div class="contact-miscinfo"> <dl class="dl-horizontal"> <dt> <span class="<?php echo $this->params->get('marker_class'); ?>"> <?php echo $this->params->get('marker_misc'); ?> </span> </dt> <dd> <span class="contact-misc"> <?php echo $this->contact->misc; ?> </span> </dd> </dl> </div> <?php if ($this->params->get('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.endSlide'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php endif; ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.endAccordion'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.endTabSet'); ?> <?php endif; ?> </div> views/contact/tmpl/default_articles.php 0000666 00000001400 15077331333 0014337 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; require_once JPATH_SITE . '/components/com_content/helpers/route.php'; ?> <?php if ($this->params->get('show_articles')) : ?> <div class="contact-articles"> <ul class="nav nav-tabs nav-stacked"> <?php foreach ($this->item->articles as $article) : ?> <li> <?php echo JHtml::_('link', JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catslug)), htmlspecialchars($article->title, ENT_COMPAT, 'UTF-8')); ?> </li> <?php endforeach; ?> </ul> </div> <?php endif; ?> views/contact/tmpl/default_links.php 0000666 00000003242 15077331333 0013657 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <?php if ($this->params->get('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_LINKS'), 'display-links'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-links', JText::_('COM_CONTACT_LINKS', true)); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'plain'):?> <?php echo '<h3>'. JText::_('COM_CONTACT_LINKS').'</h3>'; ?> <?php endif; ?> <div class="contact-links"> <ul class="nav nav-tabs nav-stacked"> <?php foreach (range('a', 'e') as $char) :// letters 'a' to 'e' $link = $this->contact->params->get('link'.$char); $label = $this->contact->params->get('link'.$char.'_name'); if (!$link) : continue; endif; // Add 'http://' if not present $link = (0 === strpos($link, 'http')) ? $link : 'http://'.$link; // If no label is present, take the link $label = ($label) ? $label : $link; ?> <li> <a href="<?php echo $link; ?>" itemprop="url"> <?php echo $label; ?> </a> </li> <?php endforeach; ?> </ul> </div> <?php if ($this->params->get('presentation_style') == 'sliders') : ?> <?php echo JHtml::_('bootstrap.endSlide'); ?> <?php endif; ?> <?php if ($this->params->get('presentation_style') == 'tabs') : ?> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php endif; ?> views/contact/tmpl/default.xml 0000666 00000024117 15077331333 0012474 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="COM_CONTACT_CONTACT_VIEW_DEFAULT_TITLE" option="COM_CONTACT_CONTACT_VIEW_DEFAULT_OPTION"> <help key = "JHELP_MENUS_MENU_ITEM_CONTACT_SINGLE_CONTACT" /> <message> <![CDATA[COM_CONTACT_CONTACT_VIEW_DEFAULT_DESC]]> </message> </layout> <!-- Add fields to the request variables for the layout. --> <fields name="request"> <fieldset name="request" addfieldpath="/administrator/components/com_contact/models/fields" > <field name="id" type="modal_contact" description="COM_CONTACT_SELECT_CONTACT_DESC" label="COM_CONTACT_SELECT_CONTACT_LABEL" required="true" edit="true" clear="false" /> </fieldset> </fields> <!-- Add fields to the parameters object for the layout. --> <fields name="params"> <!-- Basic options. --> <fieldset name="params" label="COM_CONTACT_BASIC_OPTIONS_FIELDSET_LABEL" > <field name="presentation_style" type="list" description="COM_CONTACT_FIELD_PRESENTATION_DESC" label="COM_CONTACT_FIELD_PRESENTATION_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="sliders">COM_CONTACT_FIELD_VALUE_SLIDERS</option> <option value="tabs">COM_CONTACT_FIELD_VALUE_TABS</option> <option value="plain">COM_CONTACT_FIELD_VALUE_PLAIN</option> </field> <field name="show_contact_category" type="list" description="COM_CONTACT_FIELD_CONTACT_SHOW_CATEGORY_DESC" label="COM_CONTACT_FIELD_CONTACT_SHOW_CATEGORY_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="hide">JHIDE</option> <option value="show_no_link">COM_CONTACT_FIELD_VALUE_NO_LINK</option> <option value="show_with_link">COM_CONTACT_FIELD_VALUE_WITH_LINK</option> </field> <field name="show_contact_list" type="list" description="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_DESC" label="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_tags" type="list" label="COM_CONTACT_FIELD_SHOW_TAGS_LABEL" description="COM_CONTACT_FIELD_SHOW_TAGS_DESC" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_name" type="list" description="COM_CONTACT_FIELD_PARAMS_NAME_DESC" label="COM_CONTACT_FIELD_PARAMS_NAME_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_position" type="list" description="COM_CONTACT_FIELD_PARAMS_CONTACT_POSITION_DESC" label="COM_CONTACT_FIELD_PARAMS_CONTACT_POSITION_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_email" type="list" description="COM_CONTACT_FIELD_PARAMS_CONTACT_E_MAIL_DESC" label="JGLOBAL_EMAIL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_street_address" type="list" description="COM_CONTACT_FIELD_PARAMS_STREET_ADDRESS_DESC" label="COM_CONTACT_FIELD_PARAMS_STREET_ADDRESS_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_suburb" type="list" description="COM_CONTACT_FIELD_PARAMS_TOWN-SUBURB_DESC" label="COM_CONTACT_FIELD_PARAMS_TOWN-SUBURB_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_state" type="list" description="COM_CONTACT_FIELD_PARAMS_STATE-COUNTY_DESC" label="COM_CONTACT_FIELD_PARAMS_STATE-COUNTY_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_postcode" type="list" description="COM_CONTACT_FIELD_PARAMS_POST-ZIP_CODE_DESC" label="COM_CONTACT_FIELD_PARAMS_POST-ZIP_CODE_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_country" type="list" description="COM_CONTACT_FIELD_PARAMS_COUNTRY_DESC" label="COM_CONTACT_FIELD_PARAMS_COUNTRY_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_telephone" type="list" description="COM_CONTACT_FIELD_PARAMS_TELEPHONE_DESC" label="COM_CONTACT_FIELD_PARAMS_TELEPHONE_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_mobile" type="list" description="COM_CONTACT_FIELD_PARAMS_MOBILE_DESC" label="COM_CONTACT_FIELD_PARAMS_MOBILE_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_fax" type="list" description="COM_CONTACT_FIELD_PARAMS_FAX_DESC" label="COM_CONTACT_FIELD_PARAMS_FAX_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_webpage" type="list" description="COM_CONTACT_FIELD_PARAMS_WEBPAGE_DESC" label="COM_CONTACT_FIELD_PARAMS_WEBPAGE_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_misc" type="list" description="COM_CONTACT_FIELD_PARAMS_MISC_INFO_DESC" label="COM_CONTACT_FIELD_PARAMS_MISC_INFO_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_image" type="list" description="COM_CONTACT_FIELD_PARAMS_IMAGE_DESC" label="COM_CONTACT_FIELD_PARAMS_IMAGE_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="allow_vcard" type="list" description="COM_CONTACT_FIELD_PARAMS_VCARD_DESC" label="COM_CONTACT_FIELD_PARAMS_VCARD_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_articles" type="list" description="COM_CONTACT_FIELD_ARTICLES_SHOW_DESC" label="COM_CONTACT_FIELD_ARTICLES_SHOW_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_links" type="list" description="COM_CONTACT_FIELD_SHOW_LINKS_DESC" label="COM_CONTACT_FIELD_SHOW_LINKS_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="linka_name" type="text" description="COM_CONTACT_FIELD_LINK_NAME_DESC" label="COM_CONTACT_FIELD_LINKA_NAME_LABEL" size="30" /> <field name="linkb_name" type="text" description="COM_CONTACT_FIELD_LINK_NAME_DESC" label="COM_CONTACT_FIELD_LINKB_NAME_LABEL" size="30" /> <field name="linkc_name" type="text" description="COM_CONTACT_FIELD_LINK_NAME_DESC" label="COM_CONTACT_FIELD_LINKC_NAME_LABEL" size="30" /> <field name="linkd_name" type="text" description="COM_CONTACT_FIELD_LINK_NAME_DESC" label="COM_CONTACT_FIELD_LINKD_NAME_LABEL" size="30" /> <field name="linke_name" type="text" description="COM_CONTACT_FIELD_LINK_NAME_DESC" label="COM_CONTACT_FIELD_LINKE_NAME_LABEL" size="30" /> </fieldset> <!-- Form options. --> <fieldset name="Contact_Form" label="COM_CONTACT_MAIL_FIELDSET_LABEL" > <field name="show_email_form" type="list" description="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_DESC" label="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_email_copy" type="list" description="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_DESC" label="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="banned_email" type="textarea" cols="30" description="COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_DESC" label="COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_LABEL" rows="3" /> <field name="banned_subject" type="textarea" cols="30" description="COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_DESC" label="COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_LABEL" rows="3" /> <field name="banned_text" type="textarea" cols="30" description="COM_CONTACT_FIELD_CONFIG_BANNED_TEXT_DESC" label="COM_CONTACT_FIELD_CONFIG_BANNED_TEXT_LABEL" rows="3" /> <field name="validate_session" type="list" description="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_DESC" label="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JNO</option> <option value="1">JYES</option> </field> <field name="custom_reply" type="list" description="COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_DESC" label="COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_LABEL" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JNO</option> <option value="1">JYES</option> </field> <field name="redirect" type="text" description="COM_CONTACT_FIELD_CONFIG_REDIRECT_DESC" label="COM_CONTACT_FIELD_CONFIG_REDIRECT_LABEL" size="30" /> </fieldset> </fields> </metadata> views/contact/tmpl/index.html 0000666 00000000037 15077331333 0012316 0 ustar 00 <!DOCTYPE html><title></title> views/contact/tmpl/default_address.php 0000666 00000007627 15077331333 0014177 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * marker_class: Class based on the selection of text, none, or icons * jicon-text, jicon-none, jicon-icon */ ?> <dl class="contact-address dl-horizontal" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <?php if (($this->params->get('address_check') > 0) && ($this->contact->address || $this->contact->suburb || $this->contact->state || $this->contact->country || $this->contact->postcode)) : ?> <?php if ($this->params->get('address_check') > 0) : ?> <dt> <span class="<?php echo $this->params->get('marker_class'); ?>" > <?php echo $this->params->get('marker_address'); ?> </span> </dt> <?php endif; ?> <?php if ($this->contact->address && $this->params->get('show_street_address')) : ?> <dd> <span class="contact-street" itemprop="streetAddress"> <?php echo $this->contact->address .'<br/>'; ?> </span> </dd> <?php endif; ?> <?php if ($this->contact->suburb && $this->params->get('show_suburb')) : ?> <dd> <span class="contact-suburb" itemprop="addressLocality"> <?php echo $this->contact->suburb .'<br/>'; ?> </span> </dd> <?php endif; ?> <?php if ($this->contact->state && $this->params->get('show_state')) : ?> <dd> <span class="contact-state" itemprop="addressRegion"> <?php echo $this->contact->state . '<br/>'; ?> </span> </dd> <?php endif; ?> <?php if ($this->contact->postcode && $this->params->get('show_postcode')) : ?> <dd> <span class="contact-postcode" itemprop="postalCode"> <?php echo $this->contact->postcode .'<br/>'; ?> </span> </dd> <?php endif; ?> <?php if ($this->contact->country && $this->params->get('show_country')) : ?> <dd> <span class="contact-country" itemprop="addressCountry"> <?php echo $this->contact->country .'<br/>'; ?> </span> </dd> <?php endif; ?> <?php endif; ?> <?php if ($this->contact->email_to && $this->params->get('show_email')) : ?> <dt> <span class="<?php echo $this->params->get('marker_class'); ?>" itemprop="email"> <?php echo nl2br($this->params->get('marker_email')); ?> </span> </dt> <dd> <span class="contact-emailto"> <?php echo $this->contact->email_to; ?> </span> </dd> <?php endif; ?> <?php if ($this->contact->telephone && $this->params->get('show_telephone')) : ?> <dt> <span class="<?php echo $this->params->get('marker_class'); ?>" > <?php echo $this->params->get('marker_telephone'); ?> </span> </dt> <dd> <span class="contact-telephone" itemprop="telephone"> <?php echo nl2br($this->contact->telephone); ?> </span> </dd> <?php endif; ?> <?php if ($this->contact->fax && $this->params->get('show_fax')) : ?> <dt> <span class="<?php echo $this->params->get('marker_class'); ?>"> <?php echo $this->params->get('marker_fax'); ?> </span> </dt> <dd> <span class="contact-fax" itemprop="faxNumber"> <?php echo nl2br($this->contact->fax); ?> </span> </dd> <?php endif; ?> <?php if ($this->contact->mobile && $this->params->get('show_mobile')) :?> <dt> <span class="<?php echo $this->params->get('marker_class'); ?>" > <?php echo $this->params->get('marker_mobile'); ?> </span> </dt> <dd> <span class="contact-mobile" itemprop="telephone"> <?php echo nl2br($this->contact->mobile); ?> </span> </dd> <?php endif; ?> <?php if ($this->contact->webpage && $this->params->get('show_webpage')) : ?> <dt> <span class="<?php echo $this->params->get('marker_class'); ?>" > </span> </dt> <dd> <span class="contact-webpage"> <a href="<?php echo $this->contact->webpage; ?>" target="_blank" itemprop="url"> <?php echo JStringPunycode::urlToUTF8($this->contact->webpage); ?></a> </span> </dd> <?php endif; ?> </dl> views/contact/tmpl/default_profile.php 0000666 00000002234 15077331333 0014177 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <?php if (JPluginHelper::isEnabled('user', 'profile')) : $fields = $this->item->profile->getFieldset('profile'); ?> <div class="contact-profile" id="users-profile-custom"> <dl class="dl-horizontal"> <?php foreach ($fields as $profile) : if ($profile->value) : echo '<dt>' . $profile->label . '</dt>'; $profile->text = htmlspecialchars($profile->value, ENT_COMPAT, 'UTF-8'); switch ($profile->id) : case "profile_website": $v_http = substr($profile->value, 0, 4); if ($v_http == "http") : echo '<dd><a href="' . $profile->text . '">' . $profile->text . '</a></dd>'; else : echo '<dd><a href="http://' . $profile->text . '">' . $profile->text . '</a></dd>'; endif; break; default: echo '<dd>' . $profile->text . '</dd>'; break; endswitch; endif; endforeach; ?> </dl> </div> <?php endif; ?> views/contact/metadata.xml 0000666 00000000230 15077331333 0011642 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <metadata> <view title="Contact"> <message><![CDATA[Choose a contact layout.]]></message> </view> </metadata>