Ejemplo n.º 1
0
	/**
	 * Creates the Event Feed of the Category
	 */
	function display()
	{
		$app = JFactory::getApplication();
		$doc = JFactory::getDocument();

		// Get some data from the model
		$app->input->set('limit', $app->getCfg('feed_limit'));
		$rows = $this->get('Items');

		if (!empty($rows)) {
			foreach ($rows as $row)
			{
				// strip html from feed item title
				$title = $this->escape($row->title);
				$title = html_entity_decode($title);

				// strip html from feed item category
				if (!empty($row->categories)) {
					$category = array();
					foreach ($row->categories AS $category2) {
						$category[] = $category2->catname;
					}

					// adding the , to the list when there are multiple category's
					$category = $this->escape(implode(', ', $category));
					$category = html_entity_decode($category);
				} else {
					$category = '';
				}

				//Format date and time
				$displaydate = JemOutput::formatLongDateTime($row->dates, $row->times,$row->enddates, $row->endtimes);

				// url link to event
				$link = JRoute::_(JemHelperRoute::getEventRoute($row->id));

				// feed item description text
				$description  = JText::_('COM_JEM_TITLE').': '.$title.'<br />';
				$description .= JText::_('COM_JEM_VENUE').': '.$row->venue.' / '.$row->city.'<br />';
				$description .= JText::_('COM_JEM_CATEGORY').': '.$category.'<br />';
				$description .= JText::_('COM_JEM_DATE').': '.$displaydate.'<br />';
				$description .= JText::_('COM_JEM_DESCRIPTION').': '.$row->fulltext;

				$created = ($row->created ? date('r', strtotime($row->created)) : '');

				// load individual item creator class
				$item = new JFeedItem();
				$item->title 		= $title;
				$item->link 		= $link;
				$item->description 	= $description;
				$item->date 		= $created;
				$item->category 	= $category;

				// loads item info into rss array
				$doc->addItem($item);
			}
		}
	}
Ejemplo n.º 2
0
		<tfoot>
			<tr>
				<td colspan="20">
					<?php 
    echo $this->pagination->getListFooter();
    ?>
				</td>
			</tr>
		</tfoot>

		<tbody id="search_in_here">
			<?php 
    foreach ($this->items as $i => $row) {
        //Prepare date
        $displaydate = JemOutput::formatLongDateTime($row->dates, null, $row->enddates, null);
        // Insert a break between date and enddate if possible
        $displaydate = str_replace(" - ", " -<br />", $displaydate);
        //Prepare time
        if (!$row->times) {
            $displaytime = '';
        } else {
            $displaytime = '<span class="label label-info">' . JemOutput::formattime($row->times) . '</span><br>';
        }
        $ordering = $listOrder == 'ordering';
        $canCreate = $user->authorise('core.create');
        $canEdit = $user->authorise('core.edit');
        $canCheckin = $user->authorise('core.manage', 'com_checkin') || $row->checked_out == $userId || $row->checked_out == 0;
        $canChange = $user->authorise('core.edit.state') && $canCheckin;
        $venuelink = 'index.php?option=com_jem&amp;task=venue.edit&amp;id=' . $row->locid;
        $published = JHtml::_('jgrid.published', $row->published, $i, 'events.');
Ejemplo n.º 3
0
?>
</b>&nbsp;
					<a href="<?php 
echo $detaillink;
?>
"><?php 
echo $this->escape($this->event->title);
?>
</a>
					<br />
					<b><?php 
echo JText::_('COM_JEM_DATE') . ':';
?>
</b>&nbsp;
					<?php 
echo JemOutput::formatLongDateTime($this->event->dates, $this->event->times, $this->event->enddates, $this->event->endtimes);
?>
				</td>
			</tr>
		</table>
		<br />

		<div id="jem_filter" class="clearfix">
			<div>
			<div class="pull-left">
				<?php 
echo $this->lists['filter'];
?>
				<div class="btn-wrapper input-append">
					<input type="text" name="filter_search" id="filter_search" value="<?php 
echo $this->lists['search'];
Ejemplo n.º 4
0
	</tfoot>

	<tbody>
			<?php foreach ($this->rows as $i => $row) : ?>
		<tr class="row<?php echo $i % 2; ?>">
			<td class="center"><?php echo $this->pagination->getRowOffset( $i ); ?></td>
			<td>
				<span <?php echo JEMOutput::tooltip(JText::_('COM_JEM_SELECT'), $row->title, 'editlinktip'); ?>>
				<a style="cursor:pointer" onclick="window.parent.elSelectEvent('<?php echo $row->id; ?>', '<?php echo str_replace( array("'", "\""), array("\\'", ""), $row->title ); ?>');">
					<?php echo $this->escape($row->title); ?>
				</a></span>
			</td>
			<td>
				<?php
					//Format date
					echo JemOutput::formatLongDateTime($row->dates, null, $row->enddates, null);
				?>
			</td>
			<td>
				<?php
					//Prepare time
					if (!$row->times) {
						$displaytime = '-';
					} else {
						$time = strftime( $this->jemsettings->formattime, strtotime( $row->times ));
						$displaytime = $time.' '.$this->jemsettings->timename;
					}
					echo $displaytime;
				?>
			</td>
			<td><?php echo $row->venue ? $this->escape($row->venue) : '-'; ?></td>
Ejemplo n.º 5
0
 /**
  * Creates the Event Feed
  */
 function display($cachable = false, $urlparams = false)
 {
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $doc = JFactory::getDocument();
     // Get some data from the model
     $jinput->set('limit', $app->getCfg('feed_limit'));
     $rows = $this->get('Items');
     foreach ($rows as $row) {
         // strip html from feed item title
         $title = $this->escape($row->title);
         $title = html_entity_decode($title);
         // categories (object of stdclass to array), when there is something to show
         if (!empty($row->categories)) {
             $category = array();
             foreach ($row->categories as $category2) {
                 $category[] = $category2->catname;
             }
             // ading the , to the list when there are multiple category's
             $category = $this->escape(implode(', ', $category));
             $category = html_entity_decode($category);
         } else {
             $category = '';
         }
         //Format date and time
         $displaydate = JemOutput::formatLongDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
         // url link to event
         $link = JRoute::_(JemHelperRoute::getEventRoute($row->slug));
         // Venue
         $venue = "";
         if ($row->venue && $row->city) {
             $venue .= $row->venue . ' / ' . $row->city;
         }
         if ($row->venue && !$row->city) {
             $venue .= $row->venue;
         }
         if (!$row->venue && $row->city) {
             $venue .= $row->city;
         }
         if (!$row->venue && !$row->city) {
             $venue .= "";
         }
         // combine description variable
         $description = JText::_('COM_JEM_TITLE') . ': ' . $title . '<br />';
         if ($venue) {
             $description .= JText::_('COM_JEM_VENUE') . ': ' . $venue . '<br />';
         }
         $description .= JText::_('COM_JEM_CATEGORY') . ': ' . $category . '<br />';
         $description .= JText::_('COM_JEM_DATE') . ': ' . $displaydate . '<br />';
         $description .= JText::_('COM_JEM_DESCRIPTION') . ': ' . $row->introtext . $row->fulltext;
         # define pubdate
         $date = false;
         // load individual item creator class
         $item = new JFeedItem();
         $item->title = $title;
         $item->link = $link;
         $item->description = $description;
         $item->category = $category;
         if ($date) {
             $item->date = $date;
         }
         // loads item info into rss array
         $doc->addItem($item);
     }
 }