Example #1
1
 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     /*
      * Check for evil IE
      * sry - no support for this in penguin land =;)
      */
     jimport('joomla.environment.browser');
     $browser = new JBrowser();
     if ($browser->getBrowser() == 'msie') {
         JFactory::getApplication()->enqueueMessage(jgettext('This extension is not compatible with MS internet explorer R'), 'warning');
     }
     //-- Check if we are on localhost - otherwise display a warning
     if (JComponentHelper::getParams('com_easycreator')->get('warn_livesite')) {
         $ip = getenv('REMOTE_ADDR');
         if ($ip && false == in_array($ip, array('127.0.0.1', '::1'))) {
             JFactory::getApplication()->enqueueMessage(jgettext('Please use this extension only in local development environments.'), 'warning');
             JFactory::getApplication()->enqueueMessage(sprintf(jgettext("See: <a href=\"%s\">docs.joomla.org/Setting up your workstation for Joomla! development</a>"), 'http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development'), 'warning');
             JFactory::getApplication()->enqueueMessage(jgettext('You may suppress this message in the configuration settings if you\'re shure'), 'warning');
         }
     }
     parent::display($tpl);
     EcrHtml::formEnd();
 }
* @version $Id: mod_customquickicons.php 2008/10/01 17:10:10 mic $
* @version 2.1.0
* @package Custom QuickIcons
* @copyright (C) 2006/07/08 mic / http://www.joomx.com
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* based on the Joomla/Mambo mod_quickicon
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
$language =& JFactory::getLanguage();
$language->load('mod_customquickicons');
// get browser (needed for accesskey tip)
global $isMoz;
jimport('joomla.environment.browser');
$browser = new JBrowser();
$isMoz = $browser->getBrowser() == 'mozilla';
if (!defined('_QUICKICON_MODULE')) {
    // ensure that functions are declared only once
    define('_QUICKICON_MODULE', 1);
    function MOD_quickiconButton($row, $parm)
    {
        global $live_site, $isMoz;
        ?>

	    <div style="float:left;<?php 
        echo $parm->style;
        ?>
">
	        <div class="<?php 
        echo $parm->css;
        ?>
Example #3
0
 /**
  * Get current user Browser
  **/
 function getBrowser()
 {
     jimport('joomla.environment.browser');
     $browser = new JBrowser();
     $this->user_browser = $browser->getBrowser() . ' ' . $browser->getVersion();
     $this->user_agent = $browser->getAgentString();
     $this->user_platform = $browser->getPlatform();
 }
Example #4
0
// No direct access.
defined('_JEXEC') or die;
$version = "v{$this->version}";
JHTML::_('behavior.mootools');
// Check if "System - Mootools Upgrade" is enabled
$mtupgrade = JPluginHelper::isEnabled('system', 'mtupgrade');
// get params
$params = $this->params;
// get document to add scripts
$document = JFactory::getDocument();
$document->addScript('components/com_jupgrade/js/functions.js');
$document->addScript('components/com_jupgrade/js/dwProgressBar.js');
// Checking for IE
jimport('joomla.environment.browser');
$browser = new JBrowser();
$version = $browser->getBrowser();
if ($version == 'msie') {
    $document->addScript('components/com_jupgrade/js/migrate.ie.js');
} else {
    $document->addScript('components/com_jupgrade/js/migrate.js');
}
$document->addStyleSheet("components/com_jupgrade/css/jupgrade.css");
$document->addStyleSheet("http://fonts.googleapis.com/css?family=Orbitron");
$document->addStyleSheet("http://fonts.googleapis.com/css?family=Puritan");
$document->addStyleSheet("http://fonts.googleapis.com/css?family=Tinos");
?>
<script type="text/javascript">

window.addEvent('domready', function() {

	$('checks').setStyle('display', 'none');