Example #1
0
 public function show($stream)
 {
     $my = JXFactory::getUser();
     if (!AccountAccessHelper::allowPublicStream($my->id)) {
         $app = JFactory::getApplication();
         $app->enqueueMessage(JText::_('COM_STREAM_ERROR_NO_ACCESS'), 'error');
         return;
     }
     $doc = JFactory::getDocument();
     $this->_attachScripts();
     // Pathway to group
     if ($stream->group_id) {
         $group = JTable::getInstance('Group', 'StreamTable');
         $group->load($stream->group_id);
         $this->addPathway(JText::_('NAVIGATOR_LABEL_GROUPS'), JRoute::_('index.php?option=com_stream&view=groups'));
         $this->addPathway($group->name, JRoute::_('index.php?option=com_stream&view=groups&task=show&group_id=' . $group->id));
     } else {
         // Pathway to public item
         // Breadcrumb for know 'type'
         switch ($stream->type) {
             case 'page':
                 $this->addPathway(JText::_('NAVIGATOR_LABEL_BLOG'), JRoute::_('index.php?option=com_stream&view=blog'));
                 break;
             case 'todo':
                 $this->addPathway(JText::_('NAVIGATOR_LABEL_TODO'), JRoute::_('index.php?option=com_stream&view=todo'));
                 break;
             case 'event':
                 $this->addPathway(JText::_('NAVIGATOR_LABEL_EVENTS'), JRoute::_('index.php?option=com_stream&view=events'));
                 break;
             default:
                 // Show profile link
                 $user = JXFactory::getUser($stream->user_id);
                 $this->addPathway($user->name, $user->getURL());
         }
     }
     $this->addPathway(JText::sprintf('COM_STREAM_BLOG_MESSAGE_ID', $stream->id), JRoute::_('index.php?option=com_stream&view=company'));
     // Add attendee if this is an event
     if ($stream->type == 'event') {
         JXModule::addBuffer('right', $this->modGetAttendeeHTML($stream));
     }
     // Add attachment script
     $doc->addScript(JURI::root() . 'media/uploader/fileuploader.js');
     $doc->addStyleSheet(JURI::root() . 'media/uploader/fileuploader.css');
     $html = '<div class="update"><ol id="stream" class="stream">';
     $html .= $stream->getHTML();
     $html .= '</ol></div>';
     return $html;
 }
Example #2
0
<?php

$document = JFactory::getDocument();
require_once JPATH_ROOT . DS . 'components' . DS . 'com_account' . DS . 'helpers' . DS . 'access.php';
require_once JPATH_ROOT . DS . 'components' . DS . 'com_stream' . DS . 'helpers' . DS . 'html.php';
require_once JPATH_ROOT . DS . 'components' . DS . 'com_stream' . DS . 'helpers' . DS . 'milestones.php';
/* Global javascripts */
// Check permission
// @todo: use standadized offiria authorise control, check for actual group permission as well
if (!AccountAccessHelper::allowPublicStream($my->id)) {
    return;
}
?>

<div id="stream-post">

	<div class="stream-post-tabs">
		<ul class="clearfix">
			<li class="li-text" id=""><a href="javascript:void(0)"><?php 
echo JText::_('COM_STREAM_LABEL_UPDATE');
?>
<span></span>
			</a></li>
			<li class="tab active" id=""><a href="#stream-post-update"><?php 
echo JText::_('COM_STREAM_LABEL_STATUS');
?>
<span></span>
			</a></li>
			<li class="tab" id=""><a href="#stream-post-event"><?php 
echo JText::_('COM_STREAM_LABEL_EVENT');
?>