- md5
- 375d8232d21ba72e37ef8fce4a37b2b4
- sha1
- f6a5ee77c97dd4e789fe7159937a4b2405c145a7
- sha256
- 094c07cf4c5272c92df159b75613d867e758df0d26cfe913f2c53bcb1e1b071d
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
<?php
/**
* @version $Id: icon.php 21020 2011-03-27 06:52:01Z infograf768 $
* @package Joomla.Site
* @subpackage com_content
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
/**
* Content Component HTML Helper
*
* @static
* @package Joomla.Site
* @subpackage com_content
* @since 1.5
*/
class JHtmlIcon
{
static function email($contact, $params, $attribs = array())
{
require_once(JPATH_SITE.DS.'components'.DS.'com_mailto'.DS.'helpers'.DS.'mailto.php');
$uri = JURI::getInstance();
$base = $uri->toString(array('scheme', 'host', 'port'));
$link = $base.JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid) , false);
$url = 'index.php?option=com_mailto&tmpl=component&link='.MailToHelper::addLink($link);
$status = 'width=400,height=350,menubar=yes,resizable=yes';
if ($params->get('show_icons')) {
$text = JHtml::_('image','system/emailButton.png', JText::_('JGLOBAL_EMAIL'), NULL, true);
} else {
$text = ' '.JText::_('JGLOBAL_EMAIL');
}
$attribs['title'] = JText::_('JGLOBAL_EMAIL');
$attribs['onclick'] = "window.open(this.href,'win2','".$status."'); return false;";
$output = JHtml::_('link',JRoute::_($url), $text, $attribs);
return $output;
}
static function print_popup($article, $params, $attribs = array())
{
$url = ContentHelperRoute::getContactRoute($contact->slug, $contact->catid);
$url .= '&tmpl=component&print=1&layout=default&page='.@ $request->limitstart;
$status = 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no';
// checks template image directory for image, if non found default are loaded
if ($params->get('show_icons')) {
$text = JHtml::_('image','system/printButton.png', JText::_('JGLOBAL_PRINT'), NULL, true);
} else {
$text = JText::_('JGLOBAL_ICON_SEP') .' '. JText::_('JGLOBAL_PRINT') .' '. JText::_('JGLOBAL_ICON_SEP');
}
$attribs['title'] = JText::_('JGLOBAL_PRINT');
$attribs['onclick'] = "window.open(this.href,'win2','".$status."'); return false;";
$attribs['rel'] = 'nofollow';
return JHtml::_('link',JRoute::_($url), $text, $attribs);
}
static function print_screen($contact, $params, $attribs = array())
{
// checks template image directory for image, if non found default are loaded
if ($params->get('show_icons')) {
$text = JHtml::_('image','system/printButton.png', JText::_('JGLOBAL_PRINT'), NULL, true);
} else {
$text = JText::_('JGLOBAL_ICON_SEP') .' '. JText::_('JGLOBAL_PRINT') .' '. JText::_('JGLOBAL_ICON_SEP');
}
return '<a href="#" onclick="window.print();return false;">'.$text.'</a>';
}
}
The same content is in 5 releases, Joomla 1.6.2 to 1.6.6. See them all, or every version of this file.