예제 #1
0
 /**
  * Default display method which is invoked by Joomla
  *
  * @since   5.0
  * @access  public
  * @param   string
  * @return
  */
 public function display($cachable = false, $urlparams = false)
 {
     $type = $this->doc->getType();
     $name = $this->input->get('view', $this->getName(), 'cmd');
     $layout = $this->input->get('layout', 'default', 'cmd');
     // Get the current view object
     $view = $this->getView($name, $type, '');
     $view->setLayout($layout);
     // Attach theme stylesheet
     $stylesheet = EB::stylesheet('admin', 'default');
     $stylesheet->attach();
     parent::display();
     return $this;
 }
예제 #2
0
 /**
  * Allows caller to recompile the template
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function recompile()
 {
     // Check for request forgeries
     EB::checkToken();
     // Get the theme to recompile
     $theme = $this->input->get('cid', '', 'array');
     $theme = isset($theme[0]) ? $theme[0] : '';
     // Recompile the theme
     // @since 4.0
     // Attach the theme's css
     $stylesheet = EB::stylesheet('site', $theme);
     $result = $stylesheet->build();
     $this->info->set(JText::sprintf('COM_EASYBLOG_THEME_COMPILED_SUCCESS', $theme), 'success');
     $this->app->redirect('index.php?option=com_easyblog&view=themes');
 }
<?php

/**
* @package      EasyBlog
* @copyright    Copyright (C) 2010 - 2015 Stack Ideas Sdn Bhd. All rights reserved.
* @license      GNU/GPL, see LICENSE.php
* EasyBlog is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Restricted access');
jimport('joomla.filesystem.file');
$engine = JPATH_ADMINISTRATOR . '/components/com_easyblog/includes/easyblog.php';
$my = JFactory::getUser();
$config = EB::config();
if (!JFile::exists($engine) || $my->guest || !$config->get('main_microblog')) {
    return;
}
require_once $engine;
// Ensure that all script are loaded
EB::init('module');
// Attach modules stylesheet
EB::stylesheet('module')->attach();
JFactory::getLanguage()->load('com_easyblog', JPATH_ROOT);
require JModuleHelper::getLayoutPath('mod_easyblogquickpost');
예제 #4
0
 /**
  * Responsible to render the css files on the head
  *
  * @since   4.0
  * @access  public
  * @param   string
  * @return
  */
 public function renderHeaders()
 {
     // Load js stuffs
     $view = $this->input->get('view', '', 'cmd');
     // Determines which js section to initialize
     $section = 'site';
     if ($view == 'dashboard' || $view == 'composer') {
         $section = $view;
     }
     EB::init($section);
     // Get the theme on the site
     $theme = $this->config->get('theme_site');
     // @since 4.0
     // Attach the theme's css
     $stylesheet = EB::stylesheet('site', $theme);
     $stylesheet->attach();
 }
예제 #5
0
 /**
  * Loads module stylesheet
  *
  * @since	5.0
  * @access	public
  * @param	string
  * @return
  */
 public static function loadModuleCss()
 {
     static $loaded = false;
     if (!$loaded) {
         $theme = EB::config()->get('theme_site');
         $stylesheet = EB::stylesheet('site', $theme);
         $stylesheet->attach();
         $loaded = true;
     }
     return $loaded;
 }
<?php

/**
* @package		EasyBlog
* @copyright	Copyright (C) 2010 - 2015 Stack Ideas Sdn Bhd. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* EasyBlog is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Restricted access');
jimport('joomla.filesystem.file');
// Include main engine
$engine = JPATH_ADMINISTRATOR . '/components/com_easyblog/includes/easyblog.php';
if (!JFile::exists($engine)) {
    return;
}
require_once $engine;
// This module will require the main script file since composer needs to be loaded
EB::init('site');
// Ensure that all script are loaded in the site.
EB::init('module');
// Attach modules stylesheet
EB::stylesheet('module')->attach();
// Attach site stylesheet
EB::stylesheet('site')->attach();
require JModuleHelper::getLayoutPath('mod_easyblogsubscribe');