Beispiel #1
0
 /**
  * Initializes EasySocial
  *
  * @since	1.0
  * @access	public
  * @param	string
  * @return
  */
 public static function init()
 {
     static $loaded = false;
     if (!$loaded) {
         require_once self::$file;
         $document = JFactory::getDocument();
         if ($document->getType() == 'html') {
             // We also need to render the styling from EasySocial.
             $doc = Foundry::document();
             $doc->init();
             $page = Foundry::page();
             $page->processScripts();
         }
         Foundry::language()->load('com_easysocial', JPATH_ROOT);
         $loaded = true;
     }
     return $loaded;
 }
 *
 * EasyDiscuss 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');
if ($system->my->id && $system->my->id != $userId && $userId != 0) {
    ?>
	<?php 
    if ($system->config->get('integration_easysocial_messaging') && JFile::exists(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php')) {
        ?>
		<?php 
        require_once JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php';
        Foundry::document()->init();
        Foundry::page()->processScripts();
        ?>
		<a href="javascript:void(0);" data-es-conversations-compose data-es-conversations-id="<?php 
        echo $userId;
        ?>
" class="butt butt-default butt-pm">
			<?php 
        // echo JText::_( 'COM_EASYDISCUSS_CONVERSATIONS_WRITE' );
        ?>
			<i class="i i-envelope"></i>
		</a>
	<?php 
    } else {
        if ($system->config->get('integration_jomsocial_messaging') && JFile::exists(JPATH_ROOT . '/components/com_community/libraries/core.php')) {
            ?>
Beispiel #3
0
	/**
	 * Initializes EasySocial
	 *
	 * @since	1.0
	 * @access	public
	 * @param	string
	 * @return
	 */
	public function init()
	{
		static $loaded 	= false;

		if( $this->exists() && !$loaded )
		{
			require_once( $this->file );

			$document 	= JFactory::getDocument();

			if( $document->getType() == 'html' )
			{
				// We also need to render the styling from EasySocial.
				$doc 		= Foundry::document();
				$doc->init();

				$page 		= Foundry::page();
				$page->processScripts();

			}

			Foundry::language()->loadSite();

			$loaded 	= true;
		}

		return $loaded;
	}