Example #1
0
 public function __construct($params)
 {
     $this->params = $params;
     // Process scripts
     $page = FD::page();
     $page->processScripts();
     // Process styling
     $doc = FD::document();
     $doc->init();
 }
Example #2
0
 /**
  * Loads required assets
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public function loadAssets()
 {
     if (!$this->exists()) {
         return false;
     }
     $document = JFactory::getDocument();
     if ($document->getType() == 'html') {
         // We also need to render the styling from EasySocial.
         FD::document()->init();
         $page = FD::page();
         $page->processScripts();
         $css = rtrim(JURI::root(), '/') . '/plugins/content/easysocial/assets/style.css';
         $document->addStylesheet($css);
     }
 }
Example #3
0
 /**
  * This is the ending point of the page library.
  *
  * @access	public
  * @param	null
  * @return	null
  */
 public function end($options = array())
 {
     // Initialize required dependencies.
     FD::document()->init($options);
     $processStylesheets = isset($options['processStylesheets']) ? $options['processStylesheets'] : true;
     // @task: Process any scripts that needs to be injected into the head.
     if ($processStylesheets) {
         $this->processStylesheets();
     }
     // @task: Process any scripts that needs to be injected into the head.
     $this->processScripts();
     // @task: Process the document title.
     $this->processTitle();
     // @task: Process opengraph tags
     FD::opengraph()->render();
     // @task: Trigger profiler's end.
     if ($this->config->get('general.profiler')) {
         FD::profiler()->end();
     }
     // Additional triggers to be processed when the page starts.
     // $dispatcher 	= FD::dispatcher();
     // Trigger: onComponentStart
     // $dispatcher->trigger('user', 'onComponentEnd', array());
 }
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$option = JRequest::getVar('option');
if ($option == 'com_easysocial' && !$params->get('show_on_easysocial', false)) {
    return;
}
// Load our css
FD::document()->init();
// Load up EasySocial's language file
FD::language()->loadSite();
// Load up the module engine
$modules = FD::modules('mod_easysocial_toolbar');
$modules->loadComponentScripts();
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$toolbar = FD::get('Toolbar');
$options = array('forceoption' => true, 'toolbar' => true, 'dashboard' => $params->get('show_dashboard', true), 'friends' => $params->get('show_friends', true), 'conversations' => $params->get('show_conversations', true), 'notifications' => $params->get('show_notifications', true), 'search' => $params->get('show_search', true), 'login' => $params->get('show_login', true), 'profile' => $params->get('show_profile', true), 'responsive' => $params->get('responsive', true));
require JModuleHelper::getLayoutPath('mod_easysocial_toolbar', $layout);
Example #5
0
 public function loadComponentStylesheets()
 {
     FD::document()->initStylesheets();
 }