Example #1
0
 function display($tpl = null)
 {
     $this->Params = JFactory::getApplication()->getParams("com_oziogallery3");
     // Set Meta Description
     if ($description = $this->Params->get('menu-meta_description')) {
         $this->document->setDescription($description);
     }
     // Set Meta Keywords
     if ($keywords = $this->Params->get('menu-meta_keywords')) {
         $this->document->setMetadata('keywords', $keywords);
     }
     // Set robots (index, follow)
     if ($robots = $this->Params->get('robots')) {
         $this->document->setMetadata('robots', $robots);
     }
     $this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/magnific-popup/magnific-popup.css");
     $this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/00fuerte/css/supersized.css");
     $this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/00fuerte/theme/supersized.shutter.css");
     //$this->document->addScript(JUri::base(true) . "/media/jui/js/jquery.min.js");
     //$this->document->addScript(JUri::base(true) . "/media/jui/js/jquery-noconflict.js");
     //JHtml::_('jquery.framework');
     JHtml::_('bootstrap.framework');
     if ($this->Params->get("load_css_bootstrap", 0) == 1) {
         JHtmlBootstrap::loadCSS();
     }
     $this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/magnific-popup/jquery.magnific-popup.min.js");
     $this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/js/supersized.js");
     $this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/js/jquery.easing.min.js");
     // Solo per l'effetto easeOutExpo
     // Kreatif - evento mobile - tablet touch
     $this->document->addScript(JURI::base(true) . "/media/com_oziogallery3/js/jquery.touchwipe.1.1.1.js");
     $prefix = JUri::base(true) . "/index.php?option=com_oziogallery3&view=loader";
     $menu = JFactory::getApplication()->getMenu();
     $itemid = $menu->getActive() or $itemid = $menu->getDefault();
     $this->document->addScript($prefix . "&type=js&filename=shutter" . "&Itemid=" . $itemid->id . "&id=" . $itemid->id);
     $this->document->addScript($prefix . "&type=js&filename=tinybox" . "&Itemid=" . $itemid->id . "&id=" . $itemid->id);
     $this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/views/00fuerte/js/jquery.ba-bbq.js");
     $this->document->addScript($prefix . "&v=00fuerte&filename=supersized-starter&type=js" . "&Itemid=" . $itemid->id . "&id=" . $itemid->id);
     $this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/jquery-pwi.js");
     if ($this->Params->get("show_photowall", 0) == 1) {
         $this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/modernizr.custom.js");
         //$this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/toucheffects.js");
         $this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/jquery.nanoscroller.min.js");
         $this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/jquery.lazyload.min.js");
         $this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/00fuerte/css/nanoscroller.css");
     }
     $this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/intense.js");
     // per la compatibilità con Internet Explorer
     $this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/jQuery.XDomainRequest.js");
     $current_uri = JFactory::getURI();
     if ($this->Params->get("info_button", false)) {
         if (empty($GLOBALS["contentmap"]["gapi"])) {
             $GLOBALS["contentmap"]["gapi"] = true;
             $this->document->addScript(($current_uri->isSSL() ? 'https' : 'http') . "://maps.google.com/maps/api/js?sensor=false");
         }
     }
     $this->gallerywidth = $this->Params->get("gallerywidth", array("text" => "100", "select" => "%"));
     $this->play_button_style = $this->Params->get("play_button", "0") ? '' : 'style="display:none;"';
     parent::display($tpl);
 }
Example #2
0
 /**
  * Displays a note icon.
  *
  * @param   integer  $count   The number of notes for the user
  * @param   integer  $userId  The user ID
  *
  * @return  string  A link to a modal window with the user notes
  *
  * @since   2.5
  */
 public static function notes($count, $userId)
 {
     if (empty($count)) {
         return '';
     }
     $title = JText::plural('COM_USERS_N_USER_NOTES', $count);
     echo JHtmlBootstrap::renderModal('userModal_' . (int) $userId, array('url' => JRoute::_('index.php?option=com_users&view=notes&tmpl=component&layout=modal&u_id=' . (int) $userId), 'title' => $title, 'width' => '800px', 'height' => '500px'));
     return '<a href="#userModal_' . (int) $userId . '" id="modal-' . (int) $userId . '" data-toggle="modal">' . '<span class="label label-info"><i class="icon-drawer-2"></i>' . $title . '</span></a>';
 }
Example #3
0
 function display($tpl = null)
 {
     $this->Params = JFactory::getApplication()->getParams("com_oziogallery3");
     // Set Meta Description
     if ($description = $this->Params->get('menu-meta_description')) {
         $this->document->setDescription($description);
     }
     // Set Meta Keywords
     if ($keywords = $this->Params->get('menu-meta_keywords')) {
         $this->document->setMetadata('keywords', $keywords);
     }
     // Set robots (index, follow)
     if ($robots = $this->Params->get('robots')) {
         $this->document->setMetadata('robots', $robots);
     }
     JHtml::_('bootstrap.framework');
     if ($this->Params->get("load_css_bootstrap", 0) == 1) {
         JHtmlBootstrap::loadCSS();
     }
     $this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/magnific-popup/magnific-popup.css");
     $this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/nano/css/nanogallery.css");
     $this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/nano/css/themes/clean/nanogallery_clean.css");
     $this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/nano/css/themes/light/nanogallery_light.css");
     $this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/font-awesome/css/font-awesome.min.css");
     $this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/hideshare/hideshare.css");
     //$this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/fancybox/jquery.fancybox.css?v=2.1.4");
     //$this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/fancybox/helpers/jquery.fancybox-buttons.css?v=1.0.5");
     $current_uri = JFactory::getURI();
     if ($this->Params->get("info_button", false)) {
         if (empty($GLOBALS["contentmap"]["gapi"])) {
             $GLOBALS["contentmap"]["gapi"] = true;
             $this->document->addScript(($current_uri->isSSL() ? 'https' : 'http') . "://maps.google.com/maps/api/js?sensor=false");
         }
     }
     $this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/magnific-popup/jquery.magnific-popup.js");
     $this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/hideshare/hideshare.js");
     //$this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/transit/jquery.transit.min.js");
     //$this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/hammer.js/hammer.min.js");
     //$this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/imagesloaded/imagesloaded.pkgd.min.js");
     //$this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/jquery-jsonp/jquery.jsonp.js");
     //$this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/fancybox/jquery.fancybox.pack.js?v=2.1.4");
     //$this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/fancybox/helpers/jquery.fancybox-buttons.js?v=1.0.5");
     //$this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/third.party/fancybox/helpers/jquery.fancybox-media.js?v=1.0.5");
     $this->document->addScript(JUri::base(true) . "/media/com_oziogallery3/views/nano/js/jquery.nanogallery.js");
     //TODO release min
     $prefix = JUri::base(true) . "/index.php?option=com_oziogallery3&amp;view=loader";
     $menu = JFactory::getApplication()->getMenu();
     $itemid = $menu->getActive() or $itemid = $menu->getDefault();
     $postfix = "&amp;Itemid=" . $itemid->id . "&amp;id=" . $itemid->id;
     $this->document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/nano/css/ozio-nano.css");
     $this->document->addScript($prefix . "&amp;v=nano&amp;filename=nano-starter&amp;type=js" . $postfix);
     parent::display($tpl);
 }
Example #4
0
 public function __construct($context)
 {
     $this->_jtemplate = $context;
     parent::__construct();
     JHtmlBootstrap::loadCss($includeMaincss = true, $this->_jtemplate->direction);
     JHtmlBootstrap::framework();
     $this->_jparams = $this->_jtemplate->params ? $this->_jtemplate->params : JFactory::getApplication()->getTemplate(true)->params;
     $this->_google = new stdClass();
     $this->setShowcase();
     $this->setBackground();
     $this->_mobile = Avatar::isHandleDevice();
     $this->_responsive = $this->_jparams->get('active_responsive') ? $this->_jparams->get('active_responsive') : false;
     $this->_jquery = $this->_jparams->get('load_jquery') ? $this->_jparams->get('load_jquery') : false;
     $this->_optimize = $this->_jparams->get('optimize');
 }
Example #5
0
 function display($tpl = null)
 {
     $application = JFactory::getApplication("site");
     $this->Params = $application->getParams("com_oziogallery3");
     // Set Meta Description
     if ($description = $this->Params->get('menu-meta_description')) {
         $this->document->setDescription($description);
     }
     // Set Meta Keywords
     if ($keywords = $this->Params->get('menu-meta_keywords')) {
         $this->document->setMetadata('keywords', $keywords);
     }
     // Set robots (index, follow)
     if ($robots = $this->Params->get('robots')) {
         $this->document->setMetadata('robots', $robots);
     }
     JHtml::_('bootstrap.framework');
     if ($this->Params->get("load_css_bootstrap", 0) == 1) {
         JHtmlBootstrap::loadCSS();
     }
     //$this->document->addScript(JUri::root(true) . "/components/com_oziogallery3/js/jquery-pwi.js");
     $prefix = JUri::base(true) . "/index.php?option=com_oziogallery3&amp;view=loader";
     $menu = JFactory::getApplication()->getMenu();
     $itemid = $menu->getActive() or $itemid = $menu->getDefault();
     $this->document->addScript($prefix . "&amp;filename=map&amp;type=js" . "&amp;Itemid=" . $itemid->id . "&amp;id=" . $itemid->id);
     // per la compatibilità con Internet Explorer
     $this->document->addScript(JUri::root(true) . "/components/com_oziogallery3/js/jQuery.XDomainRequest.js");
     $this->document->addStyleSheet(JUri::base(true) . "/components/com_oziogallery3/views/map/css/map.css");
     // Api key parameter for Google map
     $api_key = $this->Params->get('api_key', NULL);
     $api_key = $api_key ? "&amp;key=" . $api_key : "";
     // Language parameter for Google map
     // See Google maps Language coverage at https://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1
     // Use JFactory::getLanguage(), because we can't rely on $lang variable
     $language = JFactory::getLanguage()->get("tag", NULL);
     $language = $language ? "&amp;language=" . $language : "";
     $current_uri = JFactory::getURI();
     if (empty($GLOBALS["contentmap"]["gapi"])) {
         $GLOBALS["contentmap"]["gapi"] = true;
         $this->document->addScript(($current_uri->isSSL() ? 'https' : 'http') . "://maps.google.com/maps/api/js?sensor=false" . $language . $api_key);
     }
     if ($this->Params->get("cluster", "1")) {
         $this->document->addScript(JUri::root(true) . "/components/com_oziogallery3/js/markerclusterer_compiled.js");
     }
     $this->document->addScript(JUri::root(true) . "/components/com_oziogallery3/js/oms.min.js");
     parent::display($tpl);
 }
Example #6
0
 function display($tpl = null)
 {
     $application = JFactory::getApplication("site");
     $this->Params = $application->getParams("com_oziogallery3");
     $style = $this->Params->get('list_style');
     // Set Meta Description
     if ($description = $this->Params->get('menu-meta_description')) {
         $this->document->setDescription($description);
     }
     // Set Meta Keywords
     if ($keywords = $this->Params->get('menu-meta_keywords')) {
         $this->document->setMetadata('keywords', $keywords);
     }
     // Set robots (index, follow)
     if ($robots = $this->Params->get('robots')) {
         $this->document->setMetadata('robots', $robots);
     }
     //$this->document->addScript(JUri::base(true) . "/media/jui/js/jquery.min.js");
     //$this->document->addScript(JUri::base(true) . "/media/jui/js/jquery-noconflict.js");
     //JHtml::_('jquery.framework');
     JHtml::_('bootstrap.framework');
     if ($this->Params->get("load_css_bootstrap", 0) == 1) {
         JHtmlBootstrap::loadCSS();
     }
     $this->document->addScript(JUri::root(true) . "/components/com_oziogallery3/js/jquery-pwi.js");
     $prefix = JUri::base(true) . "/index.php?option=com_oziogallery3&amp;view=loader";
     $menu = JFactory::getApplication()->getMenu();
     $itemid = $menu->getActive() or $itemid = $menu->getDefault();
     if ($style == 'hovereffect') {
         //he
         $this->document->addScript($prefix . "&amp;filename=pwi_hovereffect&amp;type=js" . "&amp;Itemid=" . $itemid->id . "&amp;id=" . $itemid->id);
         $this->document->addScript(JUri::root(true) . "/components/com_oziogallery3/js/modernizr.custom.js");
         $this->document->addScript(JUri::root(true) . "/components/com_oziogallery3/js/toucheffects.js");
     } else {
         $this->document->addScript($prefix . "&amp;filename=pwi&amp;type=js" . "&amp;Itemid=" . $itemid->id . "&amp;id=" . $itemid->id);
     }
     $this->document->addScript($prefix . "&amp;filename=dateformat&amp;type=js" . "&amp;Itemid=" . $itemid->id . "&amp;id=" . $itemid->id);
     // per la compatibilità con Internet Explorer
     $this->document->addScript(JUri::root(true) . "/components/com_oziogallery3/js/jQuery.XDomainRequest.js");
     if ($style == 'hovereffect') {
         $this->document->addStyleSheet(JUri::base(true) . "/components/com_oziogallery3/views/list/css/list_hovereffect.css");
     } else {
         $this->document->addStyleSheet(JUri::base(true) . "/components/com_oziogallery3/views/list/css/list.css");
     }
     parent::display($tpl);
 }
Example #7
0
 function display($tpl = null)
 {
     $this->Params = JFactory::getApplication()->getParams("com_oziogallery3");
     // Set Meta Description
     if ($description = $this->Params->get('menu-meta_description')) {
         $this->document->setDescription($description);
     }
     // Set Meta Keywords
     if ($keywords = $this->Params->get('menu-meta_keywords')) {
         $this->document->setMetadata('keywords', $keywords);
     }
     // Set robots (index, follow)
     if ($robots = $this->Params->get('robots')) {
         $this->document->setMetadata('robots', $robots);
     }
     JHtml::_('bootstrap.framework');
     if ($this->Params->get("load_css_bootstrap", 0) == 1) {
         JHtmlBootstrap::loadCSS();
     }
     $this->document->addStyleSheet(JUri::root(true) . "/media/com_oziogallery3/views/nano/js/third.party/magnific-popup/magnific-popup.css");
     $this->document->addStyleSheet(JUri::root(true) . "/media/com_oziogallery3/views/nano/js/third.party/font-awesome/css/font-awesome.min.css");
     $this->document->addStyleSheet(JUri::root(true) . "/media/com_oziogallery3/views/lightgallery/css/lightgallery.css?v=1.2.14");
     $this->document->addStyleSheet(JUri::root(true) . "/media/com_oziogallery3/views/lightgallery/css/lg-fb-comment-box.css?v=1.2.14");
     $this->document->addStyleSheet(JUri::root(true) . "/media/com_oziogallery3/views/lightgallery/css/lg-transitions.css?v=1.2.14");
     $this->document->addStyleSheet(JUri::root(true) . "/media/com_oziogallery3/views/lightgallery/css/ozio-lg.css?v=1.0");
     $current_uri = JFactory::getURI();
     if ($this->Params->get("info_button", false)) {
         if (empty($GLOBALS["contentmap"]["gapi"])) {
             $GLOBALS["contentmap"]["gapi"] = true;
             $this->document->addScript(($current_uri->isSSL() ? 'https' : 'http') . "://maps.google.com/maps/api/js?sensor=false");
         }
     }
     $this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/intense.js");
     $this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/views/nano/js/third.party/magnific-popup/jquery.magnific-popup.js");
     $this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/views/lightgallery/js/lightgallery-all.js?v=1.2.14");
     $this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/views/lightgallery/js/ozio-intense.js?v=1.0");
     $this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/views/lightgallery/js/ozio-infobtn.js?v=1.0");
     //$this->document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/jquery-pwi.js");
     $prefix = JUri::root(true) . "/index.php?option=com_oziogallery3&amp;view=loader";
     $menu = JFactory::getApplication()->getMenu();
     $itemid = $menu->getActive() or $itemid = $menu->getDefault();
     $postfix = "&amp;Itemid=" . $itemid->id . "&amp;id=" . $itemid->id;
     $this->document->addScript($prefix . "&amp;v=lightgallery&amp;filename=lightgallery-starter&amp;type=js" . $postfix);
     parent::display($tpl);
 }
Example #8
0
 /**
  * Method to load the Bootstrap JavaScript framework into the document head
  *
  * If debugging mode is on an uncompressed version of Bootstrap is included for easier debugging.
  *
  * @param   mixed  $debug  Is debugging mode on? [optional]
  *
  * @return  void
  *
  * @since   3.0
  */
 public static function framework($debug = null)
 {
     // Use Joomla version first
     if (JevJoomlaVersion::isCompatible("3.0")) {
         JHtmlBootstrap::framework($debug);
         return;
     }
     // Fall back to JEvents version
     JLoader::register('JevHtmlBootstrap', JEV_PATH . "libraries/bootstrap.php");
     try {
         JevHtmlBootstrap::framework($debug);
         return;
     } catch (Exception $ex) {
     }
     // Finally use library version as last resort
     // Only load once
     if (!empty(static::$loaded[__METHOD__])) {
         return;
     }
     // Load jQuery
     JevHtmlJquery::framework();
     // If no debugging value is set, use the configuration setting
     if ($debug === null) {
         $config = JFactory::getConfig();
         $debug = (bool) $config->get('debug');
     }
     JHtml::_('script', 'libraries/jevents/bootstrap/js/bootstrap.min.js', false, false, false, false, $debug);
     static::$loaded[__METHOD__] = true;
     return;
 }
Example #9
0
 function __construct($params, $modid)
 {
     $this->_modid = $modid;
     $this->modparams =& $params;
     $jevents_config = JEVConfig::getInstance();
     $this->datamodel = new JEventsDataModel();
     // find appropriate Itemid and setup catids for datamodel
     $this->myItemid = $this->datamodel->setupModuleCatids($this->modparams);
     $this->catout = $this->datamodel->getCatidsOutLink(true);
     $user = JFactory::getUser();
     // Can't use getCfg since this cannot be changed by Joomfish etc.
     $tmplang = JFactory::getLanguage();
     $this->langtag = $tmplang->getTag();
     // get params exclusive to module
     $this->inccss = $params->get('modlatest_inccss', 0);
     if ($this->inccss) {
         $modtheme = $params->get("com_calViewName", "");
         if ($modtheme == "" || $modtheme == "global") {
             $modtheme = JEV_CommonFunctions::getJEventsViewName();
         }
         $this->jevlayout = $modtheme;
         JEVHelper::componentStylesheet($this, "modstyle.css");
     }
     // get params exclusive to component
     $this->com_starday = intval($jevents_config->get('com_starday', 0));
     $this->com_calUseStdTime = intval($jevents_config->get('com_calUseStdTime', 1));
     if ($this->com_calUseStdTime) {
         $this->defaultfFormatStr = IS_WIN ? $this->_defaultfFormatStr12winos : $this->_defaultfFormatStr12;
     } else {
         $this->defaultfFormatStr = $this->_defaultfFormatStr24;
     }
     // get params depending on switch
     if (intval($params->get('modlatest_useLocalParam', 0)) == 1) {
         $myparam =& $params;
     } else {
         $myparam =& $jevents_config;
     }
     $this->maxEvents = intval($myparam->get('modlatest_MaxEvents', 15));
     $this->dispMode = intval($myparam->get('modlatest_Mode', 0));
     $this->startNow = intval($myparam->get('startnow', 0));
     $this->pastOnly = intval($myparam->get('pastonly', 0));
     $this->rangeDays = intval($myparam->get('modlatest_Days', 30));
     $this->norepeat = intval($myparam->get('modlatest_NoRepeat', 0));
     $this->multiday = intval($myparam->get('modlatest_multiday', 0));
     $this->displayLinks = intval($myparam->get('modlatest_DispLinks', 1));
     $this->displayYear = intval($myparam->get('modlatest_DispYear', 0));
     $this->disableDateStyle = intval($myparam->get('modlatest_DisDateStyle', 0));
     $this->disableTitleStyle = intval($myparam->get('modlatest_DisTitleStyle', 0));
     $this->linkCloaking = intval($myparam->get('modlatest_LinkCloaking', 0));
     $this->linkToCal = intval($myparam->get('modlatest_LinkToCal', 0));
     $this->customFormatStr = $myparam->get('modlatest_CustFmtStr', '');
     $this->displayRSS = intval($myparam->get('modlatest_RSS', 0));
     $this->sortReverse = intval($myparam->get('modlatest_SortReverse', 0));
     if ($myparam->get("bootstrapcss", 1) == 1) {
         $cfg = JEVConfig::getInstance();
         if ($cfg->get("bootstrapcss", 1) == 1) {
             // This version of bootstrap has maximum compatability with JEvents due to enhanced namespacing
             JHTML::stylesheet("com_jevents/bootstrap.css", array(), true);
             // Responsive version of bootstrap with maximum compatibility with JEvents due to enhanced namespacing
             JHTML::stylesheet("com_jevents/bootstrap-responsive.css", array(), true);
         } else {
             if ($cfg->get("bootstrapcss", 1) == 2) {
                 JHtmlBootstrap::loadCss();
             }
         }
     } else {
         if ($myparam->get("bootstrapcss", 1) == 2) {
             JHtmlBootstrap::loadCss();
         }
     }
     if (JFile::exists(JPATH_SITE . "/components/com_jevents/assets/css/jevcustom.css")) {
         $document = JFactory::getDocument();
         JEVHelper::stylesheet('jevcustom.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     if ($myparam->get("modlatest_customcss", false)) {
         JFactory::getDocument()->addStyleDeclaration($myparam->get("modlatest_customcss", false));
     }
     if ($this->dispMode > 7) {
         $this->dispMode = 0;
     }
     // $maxEvents hardcoded to 105 for now to avoid bad mistakes in params
     if ($this->maxEvents > 150) {
         $this->maxEvents = 150;
     }
     if ($this->displayRSS) {
         if ($modid > 0) {
             // do not use JRoute since this creates .rss link which normal sef can't deal with
             $this->rsslink = JURI::root() . 'index.php?option=' . JEV_COM_COMPONENT . '&amp;task=modlatest.rss&amp;format=feed&amp;type=rss&amp;modid=' . $modid;
         } else {
             $this->displayRSS = false;
         }
     }
 }
Example #10
0
 public function JUIEnable()
 {
     if ($this->enable_bootstrap) {
         JHtml::_('bootstrap.framework');
         JHtmlBootstrap::loadCss($this->responsive_css);
         if (!$this->responsive_css) {
             $this->tpl->addStyleSheet($this->relative_path . 'css/bootstrap.min.css');
         }
     }
 }
Example #11
0
<?php

/**
 * @package     Template.Schwaderhof
 *
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
// Add JavaScript Frameworks
JHtmlBootstrap::framework();
// Add Stylesheets
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template.css');
// Adjusting content width
$left = $this->countModules('position-7');
$right = $this->countModules('position-8');
if ($left && $right) {
    $span = 'span6';
} elseif ($left && !$right || !$left && $right) {
    $span = 'span9';
} else {
    $span = 'span12';
}
?>
<!DOCTYPE html>
<html>
<head>
	<jdoc:include type="head" />
</head>
<body>
Example #12
0
 /**
  * Tests the loadCss method.
  *
  * @return  void
  *
  * @since   3.1
  */
 public function testLoadCss()
 {
     // Initialise the Bootstrap JS framework
     JHtmlBootstrap::loadCss(true, 'rtl');
     // Get the document instance
     $document = JFactory::getDocument();
     $this->assertArrayHasKey('/media/jui/css/bootstrap.min.css', $document->_styleSheets, 'Verify that the base Bootstrap CSS is loaded');
     $this->assertArrayHasKey('/media/jui/css/bootstrap-rtl.css', $document->_styleSheets, 'Verify that the RTL Bootstrap CSS is loaded');
 }
<?php

/**
 * @package     Joomla.Site
 * @subpackage  Template.Blank_J3
 *
 * @copyright   Copyright (C) 2005 - 2016 Saity74, LLC. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
require_once JPATH_THEMES . '/blank_j3/_php/blank_j3.php';
JHtmlBootstrap::loadCss(false);
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$params = $this->params;
$tmpl = new Blank_J3($this);
$assets = $tmpl->get_assets();
// Add styles..
$doc->addStyleSheet($assets['styles']);
// Add scripts..
$doc->addScript($assets['scripts']);
$menu = $app->getMenu()->getActive();
$body_class = '';
if (is_object($menu)) {
    $body_class = $tmpl->is_frontpage() ? 'g-homepage ' : '';
    $body_class .= $menu->params->get('pageclass_sfx');
    $body_class .= str_replace('_', '-', ' g-jm-' . $menu->query['option'] . '-' . $menu->query['view']);
}
?>

<!DOCTYPE html>
Example #14
0
 /**
  * Returns the HTML for a thumbnail selection form field.
  *
  * @return  object    The thumbnail selection form field.
  * @since   2.0
  */
 protected function getInput()
 {
     JHtml::_('bootstrap.tooltip');
     $app = JFactory::getApplication();
     $db = JFactory::getDBO();
     $doc = JFactory::getDocument();
     $imagelib_id = $this->element['imagelib_id'] ? $this->element['imagelib_id'] : 'imagelib';
     $script = array();
     $html = array();
     $css = array();
     $catid = 0;
     if ($app->isAdmin()) {
         // Get category id from request
         $cids = JRequest::getVar('cid', array(), '', 'array');
         if (isset($cids[0])) {
             $catid = intval($cids[0]);
         }
         // Prepare the path for the thumbnail preview
         $path = JRoute::_('index.php?option=' . _JOOM_OPTION . '&controller=images&view=image&format=raw&type=thumb', false) . '&cid=';
     } else {
         // Get category id from request
         $catid = JRequest::getInt('catid', 0);
         // Prepare the path for the thumbnail preview
         $path = JRoute::_('index.php?option=' . _JOOM_OPTION . '&view=image&format=raw&type=thumb', false) . '&id=';
     }
     $script[] = '  function joom_selectimage(id, title, object, filename) {';
     $script[] = '    document.getElementById(object + "_id").value = id;';
     $script[] = '    document.getElementById(object + "_name").value = title;';
     $script[] = '    jQuery("#' . $this->id . '_clear").removeClass("hidden");';
     $script[] = '    if(id != "") {';
     $script[] = '      document.getElementById("' . $imagelib_id . '").src = "' . $path . '" + id';
     $script[] = '    } else {';
     $script[] = '      document.getElementById("' . $imagelib_id . '").src = "' . JURI::root(true) . '/media/system/images/blank.png";';
     $script[] = '    }';
     $script[] = '    jQuery("#modalSelectThumbnail").modal("hide");';
     $script[] = '  }';
     $script[] = '  function joom_clearthumb() {';
     $script[] = '    jQuery("#' . $this->id . '_clear").addClass("hidden");';
     $script[] = '    document.getElementById("' . $this->id . '_id").value = 0;';
     $script[] = '    document.getElementById("' . $this->id . '_name").value = "-";';
     $script[] = '    document.getElementById("' . $imagelib_id . '").src = "' . JURI::root(true) . '/media/system/images/blank.png";';
     $script[] = '    return false';
     $script[] = '  }';
     $doc->addScriptDeclaration(implode("\n", $script));
     // Remove bottom border from modal header as we will not have a title
     $css[] = '  #modalSelectThumbnail .modal-header {';
     $css[] = '    border-bottom: none;';
     $css[] = '  }';
     $doc->addStyleDeclaration(implode("\n", $css));
     // Get the image title
     $img = JTable::getInstance('joomgalleryimages', 'Table');
     if (!empty($this->value)) {
         $img->load($this->value);
     } else {
         $img->imgtitle = '-';
     }
     $title = htmlspecialchars($img->imgtitle, ENT_QUOTES, 'UTF-8');
     $link = 'index.php?option=com_joomgallery&amp;view=mini&amp;extended=0&amp;format=raw&amp;object=' . $this->id . '&amp;type=category&amp;catid=' . $catid;
     $html[] = '<span class="input-append">';
     $html[] = '<input type="text" class="input-medium" id="' . $this->id . '_name" value="' . $title . '"' . ' readonly="readonly" disabled="disabled" size="35" />';
     $html[] = '<a href="#modalSelectThumbnail"  class="btn hasTooltip" role="button"  data-toggle="modal"' . ' title="' . ($app->isAdmin() ? JHtml::tooltipText('COM_JOOMGALLERY_CATMAN_SELECT_THUMBNAIL_TIP') : JHtml::tooltipText('COM_JOOMGALLERY_COMMON_SELECT_THUMBNAIL_TIP')) . '">' . '<i class="icon-image"></i> ' . ($app->isAdmin() ? JText::_('COM_JOOMGALLERY_CATMAN_SELECT_THUMBNAIL') : JText::_('COM_JOOMGALLERY_COMMON_SELECT')) . '</a>';
     $html[] = JHtmlBootstrap::renderModal('modalSelectThumbnail', array('url' => $link . '&amp;' . JSession::getFormToken() . '=1"', 'width' => '620px', 'height' => '390px'));
     $html[] = '<button id="' . $this->id . '_clear" class="btn' . ($this->value ? '' : ' hidden') . ' hasTooltip" title="' . ($app->isAdmin() ? JHtml::tooltipText('COM_JOOMGALLERY_CATMAN_REMOVE_CATTHUMB_TIP') : JHtml::tooltipText('COM_JOOMGALLERY_COMMON_REMOVE_CATTHUMB_TIP')) . '" onclick="return joom_clearthumb()"><span class="icon-remove"></span></button>';
     $html[] = '</span>';
     $html[] = '<input type="hidden" id="' . $this->id . '_id" name="' . $this->name . '" value="' . $this->value . '"/>';
     return implode("\n", $html);
 }
Example #15
0
<?php

/**
 * Part of Component Fbimporter files.
 *
 * @copyright   Copyright (C) 2014 Asikart. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
// No direct access
defined('_JEXEC') or die;
JHtmlBootstrap::tooltip();
JHtmlFormbehavior::chosen('select');
JHtmlBehavior::formvalidation();
/**
 * Prepare data for this template.
 *
 * @var $container Windwalker\DI\Container
 * @var $data      Windwalker\Data\Data
 * @var $item      \stdClass
 */
$container = $this->getContainer();
$form = $data->form;
$item = $data->item;
$fieldsets = $data->form->getFieldsets();
?>
<!-- Validate Script -->
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'format.edit.cancel' || document.formvalidator.isValid(document.id('adminForm')))
		{
Example #16
0
<?php

/**
 * Part of Component {{extension.name.cap}} files.
 *
 * @copyright   Copyright (C) 2014 Asikart. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
// No direct access
defined('_JEXEC') or die;
$tab = $data->tab;
$fieldsets = $data->form->getFieldsets();
?>

<?php 
echo JHtmlBootstrap::addTab('{{controller.item.name.lower}}EditTab', $tab, \JText::_($data->view->option . '_EDIT_' . strtoupper($tab)));
?>

<div class="row-fluid">
	<div class="span12">
		<?php 
echo $this->loadTemplate('fieldset', array('fieldset' => $fieldsets['rules'], 'class' => 'form-horizontal'));
?>
	</div>
</div>

<?php 
echo JHtmlBootstrap::endTab();
Example #17
0
// This loads jQuery too!
JevHtmlBootstrap::framework();
// jQnc not only fixes noConflict it creates the jQuery alias we use in JEvents "jevqc" so we always need it
JEVHelper::script("components/com_jevents/assets/js/jQnc.js");
if (JComponentHelper::getParams(JEV_COM_COMPONENT)->get("fixjquery", 1)) {
    // this script should come after all the URL based scripts in Joomla so should be a safe place to know that noConflict has been set
    JFactory::getDocument()->addScriptDeclaration("checkJQ();");
}
if (JComponentHelper::getParams(JEV_COM_COMPONENT)->get("bootstrapcss", 1) == 1) {
    // This version of bootstrap has maximum compatibility with JEvents due to enhanced namespacing
    JHTML::stylesheet("com_jevents/bootstrap.css", array(), true);
    // Responsive version of bootstrap with maximum compatibility with JEvents due to enhanced namespacing
    JHTML::stylesheet("com_jevents/bootstrap-responsive.css", array(), true);
} else {
    if (JComponentHelper::getParams(JEV_COM_COMPONENT)->get("bootstrapcss", 1) == 2) {
        JHtmlBootstrap::loadCss();
    }
}
$newparams = JFactory::getApplication('site')->getParams();
// Because the application sets a default page title,
// we need to get it from the menu item itself
$menu = JFactory::getApplication()->getMenu()->getActive();
if ($menu) {
    $newparams->def('page_heading', $newparams->get('page_title', $menu->title));
} else {
    $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
    $newparams->def('page_heading', $params->get('page_title'));
}
// handle global menu item parameter for viewname
$com_calViewName = $newparams->get('com_calViewName', "");
if ($com_calViewName == "global" || $com_calViewName == "") {
Example #18
0
									<span><?php 
            echo $button['text'];
            ?>
</span>
								</div>
							</a>
						</div>
					</div>
				<?php 
        }
        ?>
				<div class="clearfix"></div>
			</div>
			<div class="clr"></div>
			<?php 
        echo $tabs ? JHtmlBootstrap::endTab() : null;
        ?>

		<?php 
    }
    ?>

		<?php 
    echo $tabs ? JHtmlBootstrap::endTabSet() : null;
    ?>

	</div>
<?php 
}
?>
<div class="clearfix clr"></div>
Example #19
0
<?php

defined('_JEXEC') or die;
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$sitename = $app->get('sitename');
// Add JavaScript Frameworks.
JHtml::_('bootstrap.framework');
// Load optional rtl Bootstrap css and Bootstrap bugfixes.
JHtmlBootstrap::loadCss(false, $this->direction);
// Add Stylesheet.
$this->addStyleSheet('media/jui/css/icomoon.css');
$this->addStyleSheet('media/jui/css/bootstrap.min.css');
$doc->addStyleSheet('templates/' . $this->template . '/css/style.css');
?>
<!DOCTYPE html>
<html lang="<?php 
echo $this->language;
?>
" dir="<?php 
echo $this->direction;
?>
">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<jdoc:include type="head" />
	<!--[if lt IE 9]>
		<script src="<?php 
echo $this->baseurl;
Example #20
0
    /**
     * Preparing head section for the template
     *
     * @return void
     */
    private function _prepareHead()
    {
        // Only continue if requested return format is html
        if (strcasecmp(get_class($this->_document), 'JDocumentHTML') != 0) {
            return;
        }
        // Load Joomla script framework
        JHtml::_('behavior.framework', true);
        // Load optional Bootstrap's right-to-left CSS file
        !class_exists('JHtmlBootstrap') or JHtmlBootstrap::loadCss(true);
        // Load Bootstrap stylesheets
        if (is_readable(JPATH_ROOT . '/plugins/system/jsntplframework/assets/3rd-party/bootstrap/css/bootstrap-frontend.min.css')) {
            $this->_document->addStylesheet($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/3rd-party/bootstrap/css/bootstrap-frontend.min.css');
        } else {
            $this->_document->addStylesheet($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/3rd-party/bootstrap/css/bootstrap.min.css');
        }
        if (!$this->_document->isFree and $this->_document->mobileSupport and $this->_document->templateWidth['type'] == 'responsive') {
            if (is_readable(JPATH_ROOT . '/plugins/system/jsntplframework/assets/3rd-party/bootstrap/css/bootstrap-responsive-frontend.min.css')) {
                $this->_document->addStylesheet($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/3rd-party/bootstrap/css/bootstrap-responsive-frontend.min.css');
            } else {
                $this->_document->addStylesheet($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/3rd-party/bootstrap/css/bootstrap-responsive.min.css');
            }
        }
        // Prepare custom font style
        if (@is_array($this->_document->fontStyle[$this->_document->fontStyle['style']]) and is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/styles/' . $this->_document->fontStyle['style'] . '.css.php')) {
            $this->_document->customStyle = $this->_document->fontStyle[$this->_document->fontStyle['style']];
            // Generate custom style
            ob_start();
            require_once JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/styles/' . $this->_document->fontStyle['style'] . '.css.php';
            $this->_document->customStyle = ob_get_clean();
            // Create custom style declaration file
            if (!JFile::write(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/styles/' . $this->_document->fontStyle['style'] . '.css', $this->_document->customStyle)) {
                $this->_document->addStyleDeclaration($this->_document->customStyle);
            }
        }
        // Load other stylesheets
        if ($this->_loadTemplateCSS == true) {
            // Print optimize
            if ($this->_document->printOptimize) {
                $this->_document->addStylesheet($this->_document->templateUrl . "/css/print.css", 'text/css', 'Print');
            }
            // Load general stylesheets
            $this->_document->addStylesheet($this->_document->rootUrl . '/templates/system/css/system.css');
            $this->_document->addStylesheet($this->_document->rootUrl . '/templates/system/css/general.css');
            $this->_document->addStylesheet($this->_document->templateUrl . '/css/template.css');
            // Load PRO template styles
            if ($this->_template->edition != 'FREE') {
                if (is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/template_pro.css')) {
                    $this->_document->addStylesheet($this->_document->templateUrl . '/css/template_pro.css');
                }
            }
            // Load customization styles
            $this->_document->addStylesheet($this->_document->templateUrl . '/css/colors/' . $this->_document->templateColor . '.css');
            if (is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/styles/' . $this->_document->fontStyle['style'] . '.css')) {
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/styles/' . $this->_document->fontStyle['style'] . '.css');
            }
            // Auto icon link stylesheet
            if ($this->_document->autoIconLink) {
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_iconlinks.css');
            }
            // Right to left stylesheet
            if ($this->_document->direction == "rtl") {
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_rtl.css');
            }
            // Enable mobile support
            if ($this->_document->mobileSupport) {
                $this->_document->addCustomTag('<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />');
            }
            // IE7 Specific stylesheet
            if ($this->_document->isIE7) {
                $this->_document->addStylesheet($this->_document->rootUrl . '/css/jsn_fixie7.css');
            }
            // Process template width
            switch ($this->_document->templateWidth['type']) {
                case 'fixed':
                case 'float':
                    $unit = $this->_document->templateWidth['type'] == 'fixed' ? 'px' : '%';
                    $this->_document->customWidth = $this->_document->templateWidth[$this->_document->templateWidth['type']] . $unit;
                    break;
                case 'responsive':
                default:
                    if (!$this->_document->isFree) {
                        $enabledLayout = $this->_document->templateWidth[$this->_document->templateWidth['type']];
                        $hasWideLayout = is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/layouts/jsn_wide.css');
                        $hasMobileLayout = is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/layouts/jsn_mobile.css');
                        if (in_array('wide', $enabledLayout) and $hasWideLayout) {
                            $this->_document->addStylesheet($this->_document->templateUrl . '/css/layouts/jsn_wide.css');
                        }
                        if ($this->_document->mobileSupport and in_array('mobile', $enabledLayout) and $hasMobileLayout) {
                            $this->_document->addStylesheet($this->_document->templateUrl . '/css/layouts/jsn_mobile.css');
                        }
                    }
                    $this->_document->customWidth = 'responsive';
                    break;
            }
            // Load custom css that declared by the template
            if (is_file(JPATH_ROOT . "/templates/{$this->_document->template}/template_custom.php")) {
                include_once JPATH_ROOT . "/templates/{$this->_document->template}/template_custom.php";
            }
            // Load social icons stylesheet
            if (@count($this->_document->socialIcons)) {
                if (is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/jsn_social_icons.css')) {
                    $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_social_icons.css');
                }
            }
            // Load custom css files from the parameter
            foreach (preg_split('/[\\r\\n]+/', $this->_document->cssFiles) as $file) {
                if (empty($file) or strcasecmp(substr($file, -4), '.css') != 0) {
                    continue;
                }
                preg_match('#^([a-z]+://|/)#i', $file) ? $this->_document->addStylesheet(trim($file)) : $this->_document->addStylesheet($this->_document->templateUrl . '/css/' . trim($file));
            }
        }
        // Load scripts
        if ($this->_loadTemplateJS == true) {
            // Load Javascript files
            $this->_document->addScript($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/joomlashine/js/noconflict.js');
            $this->_document->addScript($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/joomlashine/js/utils.js');
            $this->_document->addScript($this->_document->templateUrl . '/js/jsn_template.js');
            // Custom template JS declarations
            $mobileEnabled = 0;
            $enabledLayout = '[]';
            if (@$this->_document->templateWidth['type'] == 'responsive') {
                if (@in_array('mobile', $this->_document->templateWidth['responsive'])) {
                    $mobileEnabled = 1;
                }
                $enabledLayout = json_encode($this->_document->templateWidth['responsive']);
            }
            $enableMobileMenuSticky = (is_array($this->_document->menuSticky) and isset($this->_document->menuSticky['mobile'])) ? $this->_document->menuSticky['mobile'] ? 1 : 0 : ((!is_array($this->_document->menuSticky) and $this->_document->menuSticky) ? 1 : 0);
            $enableDesktopMenuSticky = (is_array($this->_document->menuSticky) and isset($this->_document->menuSticky['desktop'])) ? $this->_document->menuSticky['desktop'] ? 1 : 0 : 0;
            $this->_document->addScriptDeclaration('
				JSNTemplate.initTemplate({
					templatePrefix			: "' . $this->_document->template . '_",
					templatePath			: "' . $this->_document->rootUrl . '/templates/' . $this->_document->template . '",
					enableRTL				: ' . ($this->_document->direction == "rtl" ? 1 : 0) . ',
					enableGotopLink			: ' . ($this->_document->gotoTop ? 1 : 0) . ',
					enableMobile			: ' . ((isset($this->_document->mobileView) and !$this->_document->mobileView) ? 0 : $mobileEnabled) . ',
					enableMobileMenuSticky	: ' . $enableMobileMenuSticky . ',
					enableDesktopMenuSticky	: ' . $enableDesktopMenuSticky . ',
					responsiveLayout		: ' . $enabledLayout . '
				});
			');
            // Always add class `jsn-desktop-on-mobile` to document body for free template
            if (strcasecmp($this->_template->edition, 'FREE') == 0) {
                $this->_document->addScriptDeclaration('
					window.addEvent("domready", JSNUtils.setDesktopOnMobile);
				');
            }
            // Load Squeezebox
            JHTML::_('behavior.modal', 'a.modal');
            // Load custom js files from the parameter
            foreach (preg_split('/[\\r\\n]+/', $this->_document->cssFiles) as $file) {
                if (empty($file) or strcasecmp(substr($file, -3), '.js') != 0) {
                    continue;
                }
                preg_match('#^([a-z]+://|/)#i', $file) ? $this->_document->addScript(trim($file)) : $this->_document->addScript($this->_document->templateUrl . '/js/' . trim($file));
            }
        }
    }
Example #21
0
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
// Create a shortcut for params.
$params = $this->item->params;
$images = json_decode($this->item->images);
$canEdit = $this->item->params->get('access-edit');
$info = $params->get('info_block_position', 0);
$app = JFactory::getApplication();
$template = $app->getTemplate();
$jsnUtils = JSNTplUtils::getInstance();
JHtml::_('behavior.tooltip');
if ($jsnUtils->isJoomla3()) {
    JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
    JHtmlBootstrap::dropdown('dropdown-toggle');
} else {
    //JHtml::addIncludePath(JPATH_COMPONENT. DIRECTORY_SEPARATOR .'helpers');
    JHtml::addIncludePath(JPATH_THEMES . DIRECTORY_SEPARATOR . $template . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'com_content');
}
if ($jsnUtils->isJoomla3()) {
    JHtml::_('behavior.framework');
    ?>
	
	<?php 
    if ($this->item->state == 0 || strtotime($this->item->publish_up) > strtotime(JFactory::getDate()) || strtotime($this->item->publish_down) < strtotime(JFactory::getDate()) && $this->item->publish_down != '0000-00-00 00:00:00') {
        ?>
	<div class="system-unpublished">
	<?php 
    }
    ?>
Example #22
0
 /**
  * Returns the HTML for a image select box form field.
  *
  * @return  object    The image select box form field.
  * @since   2.0
  */
 protected function getInput()
 {
     require_once JPATH_BASE . '/components/com_joomgallery/includes/defines.php';
     $db = JFactory::getDBO();
     $doc = JFactory::getDocument();
     $required = $this->required ? ' required="required"' : '';
     $validate = $this->validate && $this->validate == 'joompositivenumeric' ? true : false;
     $class = '';
     $script = array();
     $html = array();
     $css = array();
     JHtml::_('bootstrap.tooltip');
     if ($validate) {
         $class = 'validate-' . $this->validate;
         // Add a validation script for form validation
         $script[] = '  jQuery(document).ready(function() {';
         $script[] = '    document.formvalidator.setHandler("joompositivenumeric", function(value) {';
         $script[] = '      regex = /^[1-9]+[0-9]*$/;';
         $script[] = '      return regex.test(value);';
         $script[] = '    })';
         $script[] = '  });';
     }
     // Add script for fetching the selected image in the modal dialog
     $script[] = '  function joom_selectimage(id, title, object) {';
     $script[] = '    document.getElementById(object).value            = id;';
     $script[] = '    document.getElementById(object + "_name").value  = title;';
     $script[] = '    jQuery("#modalSelectImage").modal("hide");';
     if ($validate) {
         $script[] = '    document.formvalidator.validate(document.getElementById(object));';
         $script[] = '    document.formvalidator.validate(document.getElementById(object + "_name"));';
     }
     $script[] = '  }';
     $doc->addScriptDeclaration(implode("\n", $script));
     // Remove bottom border from modal header as we will not have a title
     $css[] = '  #modalSelectImage .modal-header {';
     $css[] = '    border-bottom: none;';
     $css[] = '  }';
     $doc->addStyleDeclaration(implode("\n", $css));
     JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_joomgallery/tables');
     $img = JTable::getInstance('joomgalleryimages', 'Table');
     if ($this->value) {
         $img->load($this->value);
     } else {
         $img->imgtitle = '';
     }
     $link = 'index.php?option=com_joomgallery&amp;view=mini&amp;extended=0&amp;format=raw&amp;catid=0&amp;object=' . $this->id;
     $title = htmlspecialchars($img->imgtitle, ENT_QUOTES, 'UTF-8');
     $html[] = '<span class="input-append">';
     $html[] = '<input type="text" class="input-medium" id="' . $this->id . '_name" value="' . $title . '"' . $required . ' readonly="readonly" size="40" />';
     $html[] = '<a href="#modalSelectImage"  class="btn hasTooltip" role="button"  data-toggle="modal"' . ' title="' . JHtml::tooltipText('COM_JOOMGALLERY_LAYOUT_COMMON_CHOOSE_IMAGE') . '">' . '<i class="icon-image"></i> ' . JText::_('JSELECT') . '</a>';
     $html[] = JHtmlBootstrap::renderModal('modalSelectImage', array('url' => $link . '&amp;' . JSession::getFormToken() . '=1"', 'width' => '620px', 'height' => '390px'));
     $html[] = '</span>';
     if ($this->required) {
         if (!empty($class)) {
             $class .= ' ';
         }
         $class .= 'required';
     }
     $html[] = '<input class="' . $class . '" type="hidden" id="' . $this->id . '" name="' . $this->name . '" value="' . (int) $this->value . '"/>';
     return implode("\n", $html);
 }
Example #23
0
File: ozio.php Project: rahxam/ozio
 function display_map(&$cparams, $galleriaozio)
 {
     $this->Params = $cparams;
     $document = JFactory::getDocument();
     JHtml::_('bootstrap.framework');
     if ($cparams->get("load_css_bootstrap", 0) == 1) {
         JHtmlBootstrap::loadCSS();
     }
     $prefix = JUri::base(true) . "/index.php?option=com_oziogallery3&amp;view=loader";
     $menu = JFactory::getApplication()->getMenu();
     $itemid = $menu->getActive() or $itemid = $menu->getDefault();
     $document->addScript($prefix . "&amp;filename=map&amp;type=js" . "&amp;Itemid=" . $itemid->id . "&amp;id=" . $galleriaozio);
     // per la compatibilità con Internet Explorer
     $document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/jQuery.XDomainRequest.js");
     $document->addStyleSheet(JUri::base(true) . "/media/com_oziogallery3/views/map/css/map.css");
     // Api key parameter for Google map
     $api_key = $this->Params->get('api_key', NULL);
     $api_key = $api_key ? "&amp;key=" . $api_key : "";
     // Language parameter for Google map
     // See Google maps Language coverage at https://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1
     // Use JFactory::getLanguage(), because we can't rely on $lang variable
     $language = JFactory::getLanguage()->get("tag", NULL);
     $language = $language ? "&amp;language=" . $language : "";
     $current_uri = JFactory::getURI();
     if (empty($GLOBALS["contentmap"]["gapi"])) {
         $GLOBALS["contentmap"]["gapi"] = true;
         $document->addScript(($current_uri->isSSL() ? 'https' : 'http') . "://maps.google.com/maps/api/js?sensor=false" . $language . $api_key);
     }
     if ($this->Params->get("cluster", "1")) {
         $document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/markerclusterer_compiled.js");
     }
     $document->addScript(JUri::root(true) . "/media/com_oziogallery3/js/oms.min.js");
     ob_start();
     require JPATH_SITE . "/components/com_oziogallery3/views/map/tmpl/default.php";
     $result = JPATH_COMPONENT("com_oziogallery3/views/map/tmpl/default.php") . ob_get_contents();
     ob_end_clean();
     return $result;
 }
    /**
     * Preparing head section for the template
     *
     * @return void
     */
    private function _prepareHead()
    {
        // Only continue if requested return format is html
        if (strcasecmp(get_class($this->_document), 'JDocumentHTML') != 0) {
            return;
        }
        // Load Joomla script framework
        JHTML::_('behavior.framework', true);
        if ($this->_loadTemplateCSS == true) {
            if ($this->_isJoomla3()) {
                // Add JavaScript Frameworks
                JHtml::_('bootstrap.framework');
                // Add Css Frameworks
                JHtmlBootstrap::loadCss();
                // Load optional rtl Bootstrap css and Bootstrap bugfixes
                JHtmlBootstrap::loadCss(true, $this->_document->direction);
            }
            // Print optimize
            if ($this->_document->printOptimize) {
                $this->_document->addStylesheet($this->_document->templateUrl . "/css/print.css", 'text/css', 'Print');
            }
            // Load general styles
            $this->_document->addStylesheet($this->_document->rootUrl . '/templates/system/css/system.css');
            $this->_document->addStylesheet($this->_document->rootUrl . '/templates/system/css/general.css');
            $this->_document->addStylesheet($this->_document->templateUrl . '/css/template.css');
            // Load PRO template styles
            if (substr($this->_document->templateUrl, -4) == '_pro') {
                if (is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/template_pro.css')) {
                    $this->_document->addStylesheet($this->_document->templateUrl . '/css/template_pro.css');
                }
            }
            // Load customization styles
            $this->_document->addStylesheet($this->_document->templateUrl . '/css/colors/' . $this->_document->templateColor . '.css');
            $this->_document->addStylesheet($this->_document->templateUrl . '/css/styles/' . $this->_document->templateStyle . '.css');
            // Auto icon link stylesheet
            if ($this->_document->autoIconLink) {
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_iconlinks.css');
            }
            // Right to left stylesheet
            if ($this->_document->direction == "rtl") {
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_rtl.css');
            }
            // Mobile support stylesheet
            if ($this->_document->mobileSupport) {
                $this->_document->addCustomTag('<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />');
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_mobile.css');
            }
            // CSS3 effect stylesheet
            if ($this->_document->useCSS3Effect) {
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_css3.css');
            }
            // IE7 Specific stylesheet
            if ($this->_document->isIE7) {
                $this->_document->addStylesheet($this->_document->rootUrl . '/css/jsn_fixie7.css');
            }
            // Squeezebox stylesheet
            if ($this->_document->useSqueezeBox) {
                $this->_document->addStylesheet($this->_document->rootUrl . '/media/system/css/modal.css');
            }
            // Template width
            $unit = $this->_document->layoutWidth == 'float' ? '%' : 'px';
            $this->_document->templateWidth = $this->_document->{'layout' . ucfirst($this->_document->layoutWidth) . 'Width'} . $unit;
            // Load custom css that declared by the template
            if (is_file(JPATH_ROOT . "/templates/{$this->_document->template}/template_custom.php")) {
                include_once JPATH_ROOT . "/templates/{$this->_document->template}/template_custom.php";
            }
            // Load custom css files from the parameter
            foreach (explode("\n", $this->_document->cssFiles) as $file) {
                if (empty($file)) {
                    continue;
                }
                preg_match('/^[a-z]+:\\/\\//i', $file) ? $this->_document->addStylesheet(trim($file)) : $this->_document->addStylesheet($this->_document->templateUrl . '/css/' . trim($file));
            }
        }
        if ($this->_loadTemplateJS == true) {
            // Load Javascript files
            $this->_document->addScript($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/joomlashine/js/noconflict.js');
            $this->_document->addScript($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/joomlashine/js/utils.js');
            $this->_document->addScript($this->_document->templateUrl . '/js/jsn_template.js');
            // Load javascript file for squeezebox
            if ($this->_document->useSqueezeBox) {
                $this->_document->addScript($this->_document->rootUrl . '/media/system/js/modal.js');
            }
            // Custom template JS declarations
            $this->_document->addScriptDeclaration('
				JSNTemplate.initTemplate({
					templatePrefix			: "' . $this->_document->template . '_",
					templatePath			: "' . $this->_document->rootUrl . '/templates/' . $this->_document->template . '",
					enableRTL				: ' . ($this->_document->direction == "rtl" ? 'true' : 'false') . ',
					enableGotopLink			: ' . ($this->_document->gotoTop ? 'true' : 'false') . ',
					enableMobile			: ' . ((isset($this->_document->mobileView) and $this->_document->mobileView or $this->_document->mobileSupport) ? 'true' : 'false') . ',
					enableMobileMenuSticky	: ' . ($this->_document->menuSticky ? 'true' : 'false') . '
				});
			');
            // load Squeezebox
            if ($this->_document->useSqueezeBox) {
                $this->_document->addScriptDeclaration('
					window.addEvent("domready", function() {
						SqueezeBox.initialize({});
						SqueezeBox.assign($$("a.modal"), {
							parse: "rel"
						});
					});
				');
            }
        }
    }
Example #25
0
 * @subpackage  Templates.protostar
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');
// Add Stylesheets
$doc->addStyleSheet('templates/' . $this->template . '/css/template.css');
// Load optional rtl Bootstrap css and Bootstrap bugfixes
JHtmlBootstrap::loadCss($includeMaincss = false, $this->direction);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php 
echo $this->language;
?>
" lang="<?php 
echo $this->language;
?>
" dir="<?php 
echo $this->direction;
?>
">
<head>
<jdoc:include type="head" />
<!--[if lt IE 9]>
function DefaultViewHelperViewNavAdminPanel($view)
{
    $cfg = JEVConfig::getInstance();
    if ($cfg->get('show_adminpanel', 1) == 1) {
        $is_event_editor = JEVHelper::isEventCreator();
        $user = JFactory::getUser();
        JEVHelper::script('view_detailJQ.js', 'components/' . JEV_COM_COMPONENT . "/assets/js/");
        JLoader::register('jevFilterProcessing', JEV_PATH . "/libraries/filters.php");
        $pluginsDir = JPATH_ROOT . '/' . 'plugins' . '/' . 'jevents';
        $filters = jevFilterProcessing::getInstance(array("published", "justmine", "category", "reset"));
        $cfg = JEVConfig::getInstance();
        if (JRequest::getInt('pop', 0)) {
            return;
        }
        if ($is_event_editor) {
            if ($cfg->get("bootstrapchosen", 1)) {
                // Load Bootstrap
                JevHtmlBootstrap::framework();
                JHtml::_('formbehavior.chosen', '#jevents select:not(.notchosen)');
            }
            if ($cfg->get("bootstrapcss", 1) == 1) {
                // This version of bootstrap has maximum compatability with JEvents due to enhanced namespacing
                JHTML::stylesheet("com_jevents/bootstrap.css", array(), true);
            } else {
                if ($cfg->get("bootstrapcss", 1) == 2) {
                    JHtmlBootstrap::loadCss();
                }
            }
            // Load event adding language string
            JText::script('JEV_ADD_EVENT');
            JText::script('JEV_IMPORT_ICALEVENT');
            ?>
			<div class="ev_adminpanel">
				<div align="left" class="nav_bar_cell">
					<?php 
            $editLink = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=icalevent.edit' . '&year=' . $view->year . '&month=' . $view->month . '&day=' . $view->day . '&Itemid=' . $view->Itemid, true);
            $popup = false;
            $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
            if ($params->get("editpopup", 0) && JEVHelper::isEventCreator()) {
                //JevHtmlBootstrap::modal();
                JEVHelper::script('editpopupJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
                $popup = true;
            }
            $eventlinkadd = $popup ? "javascript:jevEditPopup('" . $editLink . "');" : $editLink;
            ?>
					<a href="<?php 
            echo $eventlinkadd;
            ?>
" title="<?php 
            echo JText::_('JEV_ADDEVENT');
            ?>
">
						<b><?php 
            echo JText::_('JEV_ADDEVENT');
            ?>
</b>
					</a>
					<?php 
            // offer frontend import ?
            if ($params->get("feimport", 0)) {
                $importLink = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=icals.importform&tmpl=component&Itemid=' . $view->Itemid, true);
                //JevHtmlBootstrap::modal();
                JEVHelper::script('editpopupJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
                $eventimport = "javascript:jevImportPopup('" . $importLink . "');";
                ?>
						<br/><a href="<?php 
                echo $eventimport;
                ?>
" title="<?php 
                echo JText::_('JEV_IMPORT_ICALEVENT', true);
                ?>
">
							<b><?php 
                echo JText::_('JEV_IMPORT_ICALEVENT');
                ?>
</b>
						</a>
						<?php 
            }
            if ($user->id > 0) {
                $datamodel = new JEventsDataModel();
                // find appropriate Itemid and setup catids for datamodel
                $myItemid = JEVHelper::getItemid();
                $datamodel->setupComponentCatids();
                list($year, $month, $day) = JEVHelper::getYMD();
                $evid = JRequest::getVar("evid", false);
                $jevtype = JRequest::getVar("jevtype", false);
                // FORM for filter submission
                $form_link = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=' . JRequest::getVar("jevtask", "month.calendar") . ($evid ? '&evid=' . $evid : '') . ($jevtype ? '&jevtype=' . $jevtype : '') . ($year ? '&year=' . $year : '') . ($month ? '&month=' . $month : '') . ($day ? '&day=' . $day : '') . "&Itemid=" . $myItemid, false);
                ?>
						<form action="<?php 
                echo $form_link;
                ?>
"  method="post">
							<?php 
                $filterHTML = $filters->getFilterHTML();
                $Itemid = JEVHelper::getItemid();
                foreach ($filterHTML as $filter) {
                    echo "<div>" . $filter["title"] . " " . $filter["html"] . "</div>";
                }
                /*
                 $eventmylinks = JRoute::_( 'index.php?option=' . JEV_COM_COMPONENT . '&task=admin.listevents'
                 . '&year=' . $view->year . '&month=' . $view->month . '&day=' . $view->day
                 . '&Itemid=' . $view->Itemid ); ?>
                 <a href="<?php echo $eventmylinks; ?>" title="<?php echo JText::_('JEV_MYEVENTS'); ?>">
                 <b><?php echo JText::_('JEV_MYEVENTS'); ?></b>
                 </a>
                 <?php
                */
                ?>
						</form>
					<?php 
            }
            ?>
				</div>
			</div>
		<?php 
        }
    }
}
Example #27
0
	<form action="<?php 
echo JUri::getInstance();
?>
"  method="post" name="adminForm" id="adminForm"
		class="form-validate" enctype="multipart/form-data">

		<?php 
echo JHtmlBootstrap::startTabSet('{{controller.item.name.lower}}EditTab', array('active' => 'tab_basic'));
?>

			<?php 
foreach ($tabs as $tab) {
    echo $this->loadTemplate($tab, array('tab' => $tab));
}
?>

		<?php 
echo JHtmlBootstrap::endTabSet();
?>

		<!-- Hidden Inputs -->
		<div id="hidden-inputs">
			<input type="hidden" name="option" value="{{extension.element.lower}}" />
			<input type="hidden" name="task" value="" />
			<?php 
echo JHtml::_('form.token');
?>
		</div>
	</form>
</div>
Example #28
0
 /**
  * Method to load the Bootstrap JavaScript framework into the document head
  *
  * If debugging mode is on an uncompressed version of Bootstrap is included for easier debugging.
  *
  * @param   mixed  $debug  Is debugging mode on? [optional]
  *
  * @return  void
  *
  * @since   3.0
  */
 public static function framework($debug = null)
 {
     if (JevJoomlaVersion::isCompatible("3.0")) {
         JHtmlBootstrap::framework($debug);
         return;
     }
     // Only load once
     if (!empty(static::$loaded[__METHOD__])) {
         return;
     }
     // If no debugging value is set, use the configuration setting
     if ($debug === null) {
         $config = JFactory::getConfig();
         $debug = (bool) $config->get('debug');
     }
     /*
     		if(!JHtml::_('script', 'jui/jquery.min.js', false, true, true, false, $debug))
     		{
     			JHtml::_('script', 'libraries/jevents/bootstrap/js/jquery.min.js', false, true, false, false, $debug);
     		}
     		else
     		{
     			JHtml::_('script', 'jui/jquery.min.js', false, true, false, false, $debug);
     		}
     */
     // Make loading this conditional on config option ??
     JFactory::getDocument()->addScript("//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js");
     //JHtml::_('script', 'com_jevents/jquery.min.js', false, true, false, false, $debug);
     // use bootstrap from CDN instead of our copy of it - problem though that target elements disappear when popover appears in Joomla 2.5
     //JFactory::getDocument()->addScript("//maxcdn.bootstrapcdn.com/bootstrap/2.3.2/js/bootstrap.js");
     JEVHelper::script("bootstrap.js", "com_jevents/", false, true);
     static::$loaded[__METHOD__] = true;
     return;
 }
Example #29
0
 /**
  * Load J!'s bootstrap CSS if requested.  Special case for iframes in non J! pages loading us.
  *
  * @return  void
  */
 public static function loadBootstrapCSS()
 {
     $app = JFactory::getApplication();
     if ($app->input->get('loadbootstrapcss', '') !== '') {
         $doc = JFactory::getDocument();
         JHtmlBootstrap::loadCss(true, $doc->direction);
     }
 }
 /**
  * Method to load the Bootstrap JavaScript & CSS framework into the document head
  *
  * If debugging mode is on an uncompressed version of Bootstrap is included for easier debugging.
  *
  * @param  boolean  $css    Include CSS.
  * @param  boolean  $debug  Is debugging mode on? [optional]
  *
  * @return  AssetManager  Return self to support chaining.
  */
 public function bootstrap($css = false, $debug = null)
 {
     \JHtmlBootstrap::framework($debug);
     if ($css) {
         \JHtmlBootstrap::loadCss();
     }
     return $this;
 }