コード例 #1
0
ファイル: messaging.php プロジェクト: Tommar/vino2
 /**
  * Shares a story through 3rd party oauth clients
  *
  * @param	TableBlog	$blog	A blog table object
  * @param	string		$type	The type of oauth client
  *
  * @return	boolean		True on success and false otherwise.
  **/
 public function getHTML($bloggerid = "")
 {
     $html = '';
     $my = JFactory::getUser();
     $config = EasyBlogHelper::getConfig();
     if ($config->get('main_jomsocial_messaging') && $my->id != $bloggerid) {
         $file_core = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_community' . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR . 'core.php';
         $file_messaging = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_community' . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR . 'messaging.php';
         if (file_exists($file_core) && file_exists($file_messaging)) {
             require_once $file_core;
             require_once $file_messaging;
             CMessaging::load();
             $html = '<a href="javascript:void(0);" onclick="' . CMessaging::getPopup($bloggerid) . '" class="author-message" title="' . JText::_('COM_EASYBLOG_MESSAGE_AUTHOR') . '"><span>' . JText::_('COM_EASYBLOG_MESSAGE_AUTHOR') . '</span></a>';
         }
     }
     $easysocial = EasyBlogHelper::getHelper('EasySocial');
     if ($config->get('integrations_easysocial_conversations') && $easysocial->exists() && $my->id != $bloggerid) {
         $easysocial->init();
         $user = Foundry::user($bloggerid);
         $theme = new CodeThemes();
         $theme->set('user', $user);
         $html = $theme->fetch('easysocial.conversation.php');
     }
     return $html;
 }
コード例 #2
0
ファイル: jomsocial.php プロジェクト: knigherrant/decopatio
 /**
  * Renders the messaging link
  *
  * @since	5.0
  * @access	public
  * @param	string
  * @return
  */
 public function getMessagingHtml($authorId)
 {
     if (!$this->exists()) {
         return;
     }
     $file = JPATH_ROOT . '/components/com_community/libraries/messaging.php';
     CMessaging::load();
     $template = EB::template();
     $template->set('authorId', $authorId);
     $output = $template->output('site/jomsocial/messaging');
     return $output;
 }
コード例 #3
0
ファイル: messaging.php プロジェクト: Simarpreet05/joomla
 /**
  * Get link to popup window 
  */
 public function getPopup($id)
 {
     CMessaging::load();
     return "joms.messaging.loadComposeWindow('{$id}')";
 }
コード例 #4
0
        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')) {
            ?>
		<?php 
            require_once JPATH_ROOT . '/components/com_community/libraries/core.php';
            require_once JPATH_ROOT . '/components/com_community/libraries/messaging.php';
            CMessaging::load();
            ?>
		<a href="javascript:void(0);" onclick="joms.messaging.loadComposeWindow('<?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 {
            ?>
		<?php 
            if ($system->config->get('main_conversations')) {
コード例 #5
0
ファイル: messaging.php プロジェクト: joshjim27/jobsglobal
 /**
  * Get link to popup window
  */
 public static function getPopup($id)
 {
     CMessaging::load();
     return "joms.api.pmSend('{$id}')";
 }