/** * The default method that will display the output of this view which is called by * Joomla * * @param string template Template file name **/ public function display($tpl = null) { // Trigger load default library. CAssets::getInstance(); if ($this->getLayout() == 'edit') { $this->_displayEditLayout($tpl); return; } $document = JFactory::getDocument(); // Set the titlebar text JToolBarHelper::title(JText::_('COM_COMMUNITY_GROUPS'), 'groups'); // Add the necessary buttons JToolBarHelper::addNew('newGroup', JText::_('COM_COMMUNITY_PROFILES_NEW_GROUP')); JToolBarHelper::deleteList(JText::_('COM_COMMUNITY_GROUP_DELETION_WARNING'), 'deleteGroup', JText::_('COM_COMMUNITY_DELETE')); JToolBarHelper::divider(); JToolBarHelper::publishList('publish', JText::_('COM_COMMUNITY_PUBLISH')); JToolBarHelper::unpublishList('unpublish', JText::_('COM_COMMUNITY_UNPUBLISH')); // Get required data's $groups = $this->get('Groups'); $categories = $this->get('Categories'); $pagination = $this->get('Pagination'); // We need to assign the users object to the groups listing to get the users name. for ($i = 0; $i < count($groups); $i++) { $row =& $groups[$i]; $row->user = CFactory::getUser($row->ownerid); $row->description = strip_tags($row->description, '<strong><a>'); $row->description = CStringHelper::trim($row->description, 200); $row->category = $this->_getCatName($categories, $row->categoryid); } $mainframe = JFactory::getApplication(); $filter_order = $mainframe->getUserStateFromRequest("com_community.groups.filter_order", 'filter_order', 'a.name', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest("com_community.groups.filter_order_Dir", 'filter_order_Dir', '', 'word'); $search = $mainframe->getUserStateFromRequest("com_community.users.search", 'search', '', 'string'); // table ordering $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; $catHTML = $this->_getCategoriesHTML($categories); $this->assignRef('groups', $groups); $this->assignRef('categories', $catHTML); $this->assignRef('lists', $lists); $this->assignRef('search', $search); $this->assignRef('pagination', $pagination); parent::display($tpl); }
/** * The default method that will display the output of this view which is called by * Joomla * * @param string template Template file name **/ public function display($tpl = null) { // Trigger load default library. CAssets::getInstance(); $document = JFactory::getDocument(); $config = CFactory::getConfig(); // Get required data's $events = $this->get('Events'); $categories = $this->get('Categories'); $pagination = $this->get('Pagination'); $mainframe = JFactory::getApplication(); $filter_order = $mainframe->getUserStateFromRequest("com_community.events.filter_order", 'filter_order', 'a.title', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest("com_community.events.filter_order_Dir", 'filter_order_Dir', '', 'word'); $search = $mainframe->getUserStateFromRequest("com_community.events.search", 'search', '', 'string'); // table ordering $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; // We need to assign the users object to the groups listing to get the users name. for ($i = 0; $i < count($events); $i++) { $row =& $events[$i]; $row->user = JFactory::getUser($row->creator); // Truncate the description $row->description = str_ireplace('<p>', '', $row->description); $row->description = str_ireplace('</p>', '', $row->description); $row->description = CStringHelper::trim($row->description, 200); $date = new JDate($row->startdate); $row->startdate = $date->format('Y-m-d'); $row->category = $this->_getCatName($categories, $row->catid); } $catHTML = $this->_getCategoriesHTML($categories); $this->assignRef('events', $events); $this->assignRef('categories', $catHTML); $this->assignRef('search', $search); $this->assignRef('lists', $lists); $this->assignRef('pagination', $pagination); parent::display($tpl); }
echo $row->title; ?> </a> </td> <td> <a href="javascript:void(0);" onClick="azcommunity.editVideo('<?php echo $row->id; ?> ');"><?php echo JText::_('Edit'); ?> </a> </td> <td align="center"> <?php echo CStringHelper::trim($row->description, 200); ?> </td> <td id="published<?php echo $row->id; ?> " align="center" class='center'> <?php echo $this->getPublish($row, 'published', 'videos,ajaxTogglePublish'); ?> </td> <td> <?php echo $row->categoryName; ?> </td>
?> <?php if ($videos) { ?> <ul class="video-items indexList cResetList"> <?php foreach ($videos as $video) { ?> <li id="<?php echo "video-" . $video->id; ?> "> <div class="video-item jomTips tipFullWidth" title="<?php echo $video->title . '::' . CStringHelper::trim($this->escape($video->description), VIDEO_TIPS_LENGTH); ?> "> <!---VIDEO THUMB--> <div class="video-thumb"> <?php if ($video->status == 'pending') { ?> <img src="<?php echo JURI::root(); ?> /components/com_community/assets/video_thumb.png" width="<?php echo $videoThumbWidth; ?> " height="<?php echo $videoThumbHeight;