Source for file icon.php

Documentation is available at icon.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Site
  4.  * @subpackage  com_contact
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * Content Component HTML Helper
  14.  *
  15.  * @static
  16.  * @package     Joomla.Site
  17.  * @subpackage  com_content
  18.  * @since       1.5
  19.  */
  20. class JHtmlIcon
  21. {
  22.     public static function email($contact$params$attribs array())
  23.     {
  24.         require_once JPATH_SITE '/components/com_mailto/helpers/mailto.php';
  25.         $uri    JUri::getInstance();
  26.         $base    $uri->toString(array('scheme''host''port'));
  27.         $link    $base JRoute::_(ContentHelperRoute::getArticleRoute($article->slug$article->catid)false);
  28.         $url    'index.php?option=com_mailto&tmpl=component&link='.MailToHelper::addLink($link);
  29.  
  30.         $status 'width=400,height=350,menubar=yes,resizable=yes';
  31.  
  32.         if ($params->get('show_icons'))
  33.         {
  34.             $text JHtml::_('image''system/emailButton.png'JText::_('JGLOBAL_EMAIL')nulltrue);
  35.         }
  36.         else
  37.         {
  38.             $text '&#160;'.JText::_('JGLOBAL_EMAIL');
  39.         }
  40.  
  41.         $attribs['title']    JText::_('JGLOBAL_EMAIL');
  42.         $attribs['onclick'"window.open(this.href,'win2','".$status."'); return false;";
  43.  
  44.         $output JHtml::_('link'JRoute::_($url)$text$attribs);
  45.         return $output;
  46.     }
  47.  
  48.     public static function print_popup($article$params$attribs array())
  49.     {
  50.         $url  ContentHelperRoute::getContactRoute($contact->slug$contact->catid);
  51.         $url .= '&tmpl=component&print=1&layout=default&page='.$request->limitstart;
  52.  
  53.         $status 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no';
  54.  
  55.         // checks template image directory for image, if non found default are loaded
  56.         if ($params->get('show_icons'))
  57.         {
  58.             $text JHtml::_('image''system/printButton.png'JText::_('JGLOBAL_PRINT')nulltrue);
  59.         }
  60.         else
  61.         {
  62.             $text JText::_('JGLOBAL_ICON_SEP'.'&#160;'JText::_('JGLOBAL_PRINT'.'&#160;'JText::_('JGLOBAL_ICON_SEP');
  63.         }
  64.  
  65.         $attribs['title']    JText::_('JGLOBAL_PRINT');
  66.         $attribs['onclick'"window.open(this.href,'win2','".$status."'); return false;";
  67.         $attribs['rel']        'nofollow';
  68.  
  69.         return JHtml::_('link'JRoute::_($url)$text$attribs);
  70.     }
  71.  
  72.     public static function print_screen($contact$params$attribs array())
  73.     {
  74.         // checks template image directory for image, if non found default are loaded
  75.         if ($params->get('show_icons'))
  76.         {
  77.             $text JHtml::_('image''system/printButton.png'JText::_('JGLOBAL_PRINT')nulltrue);
  78.         }
  79.         else
  80.         {
  81.             $text JText::_('JGLOBAL_ICON_SEP'.'&#160;'JText::_('JGLOBAL_PRINT'.'&#160;'JText::_('JGLOBAL_ICON_SEP');
  82.         }
  83.         return '<a href="#" onclick="window.print();return false;">'.$text.'</a>';
  84.     }
  85. }

Documentation generated on Tue, 19 Nov 2013 15:04:58 +0100 by phpDocumentor 1.4.3