primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,75 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
?>
<div id="jem" class="jem_eventslist<?php echo $this->pageclass_sfx; ?>">
<div class="buttons">
<?php
$btn_params = array('task' => $this->task, 'print_link' => $this->print_link, 'archive_link' => $this->archive_link);
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
?>
</div>
<?php
if ($this->params->get('show_page_heading', 1)) : ?>
<h1 class="componentheading">
<?php
echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php
endif; ?>
<div class="clr"></div>
<?php
if ($this->params->get('showintrotext')) : ?>
<div class="description no_space floattext">
<?php
echo $this->params->get('introtext'); ?>
</div>
<?php
endif; ?>
<!--table-->
<form action="<?php
echo htmlspecialchars($this->action); ?>" method="post" name="adminForm" id="adminForm">
<?php
echo $this->loadTemplate('events_table'); ?>
<input type="hidden" name="filter_order" value="<?php
echo $this->lists['order']; ?>"/>
<input type="hidden" name="filter_order_Dir" value="<?php
echo $this->lists['order_Dir']; ?>"/>
<input type="hidden" name="task" value="<?php
echo $this->task; ?>"/>
<input type="hidden" name="view" value="eventslist"/>
</form>
<?php
if ($this->params->get('showfootertext')) : ?>
<div class="description no_space floattext">
<?php
echo $this->params->get('footertext'); ?>
</div>
<?php
endif; ?>
<!--footer-->
<div class="pagination">
<?php
echo $this->pagination->getPagesLinks(); ?>
</div>
<div class="copyright">
<?php
echo JemOutput::footer(); ?>
</div>
</div>

View File

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_JEM_EVENTSLIST_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_JEM_EVENTSLIST_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="params">
<fieldset name="basic" addfieldpath="/administrator/components/com_jem/models/fields">
<field name="onlyfeatured" type="radio"
default="0"
label="COM_JEM_DISPLAY_FEATUREDONLY"
description="COM_JEM_DISPLAY_FEATUREDONLY_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="show_archived_events" type="radio"
default="0"
label="COM_JEM_SHOW_ARCHIVED_EVENTS"
description="COM_JEM_SHOW_ARCHIVED_EVENTS_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="tableorderby" type="radio"
default="0"
label="COM_JEM_TABLE_ORDER_BY"
description="COM_JEM_TABLE_ORDER_BY_DESC"
class="btn-group"
>
<option value="0">COM_JEM_DATE</option>
<option value="1">COM_JEM_TITLE</option>
<option value="2">COM_JEM_VENUE</option>
<option value="3">COM_JEM_CITY</option>
<option value="4">COM_JEM_STATE</option>
<option value="5">COM_JEM_CATEGORY</option>
</field>
<field name="tabledirectionorder" type="radio"
default="ASC"
label="COM_JEM_TABLE_DIRECTION_ORDER"
description="COM_JEM_TABLE_DIRECTION_ORDER_DESC"
class="btn-group "
>
<option value="ASC">COM_JEM_ORDER_ASCENDING</option>
<option value="DESC">COM_JEM_ORDER_DESCENDING</option>
</field>
<field name="tablefiltereventfrom" type="number"
default="0"
filter="integer"
min="0"
step="1"
validate="number"
label="COM_JEM_FILTER_EVENT_FROM"
description="COM_JEM_FILTER_EVENT_FROM_DESC"
class="w-auto" />
<field name="tablefiltereventuntil" type="number"
default="0"
filter="integer"
min="0"
step="1"
validate="number"
label="COM_JEM_FILTER_EVENT_UNTIL"
description="COM_JEM_FILTER_EVENT_UNTIL_DESC"
class="w-auto" />
<field name="showmonthrow" type="radio"
default="0"
label="COM_JEM_DISPLAY_MONTH_ROW"
description="COM_JEM_DISPLAY_MONTH_ROW_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="tabledirectionorder" type="radio"
default="ASC"
label="COM_JEM_TABLE_DIRECTION_ORDER"
description="COM_JEM_TABLE_DIRECTION_ORDER_DESC"
class="btn-group "
>
<option value="ASC">COM_JEM_ORDER_ASCENDING</option>
<option value="DESC">COM_JEM_ORDER_DESCENDING</option>
</field>
<field type="spacer" name="spacer1" hr="true" />
<field name="introtext" type="editor"
filter="safehtml"
hide="readmore,pagebreak,module,menu,fields,contact,article"
default=""
rows="8"
cols="30"
height="300px"
label="COM_JEM_INTROTEXT_FIELD"
description="COM_JEM_INTROTEXT_FIELD_DESC"
/>
<field name="showintrotext" type="radio"
default="0"
label="COM_JEM_DISPLAY_INTROTEXT"
description="COM_JEM_DISPLAY_INTROTEXT_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field type="spacer" name="spacer2" hr="true" />
<field name="categoryswitch" type="radio"
default="0"
label="COM_JEM_CATEGORYSWITCH"
description="COM_JEM_CATEGORYSWITCH_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">COM_JEM_INCLUDE</option>
<option value="0">COM_JEM_EXCLUDE</option>
</field>
<field name="categoryswitchcats" type="text"
default=""
label="COM_JEM_CATEGORYSWITCHCATS"
description="COM_JEM_CATEGORYSWITCHCATS_DESC"
/>
<field name="includesubcategories" type="radio"
default="0"
label="COM_JEM_INCLUDE_SUBCATEGORIES"
description="COM_JEM_INCLUDE_SUBCATEGORIES_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="showopendates" type="list"
default="0"
label="COM_JEM_GLOBAL_FIELD_SHOW_OPENDATES"
description="COM_JEM_GLOBAL_FIELD_SHOW_OPENDATES_DESC"
>
<option value="0">JNO</option>
<option value="1">COM_JEM_SHOW_OPENDATES_TOO</option>
<option value="2">COM_JEM_SHOW_OPENDATES_ONLY</option>
</field>
<field type="spacer" name="spacer3" hr="true" />
<field name="footertext" type="editor"
filter="safehtml"
hide="readmore,pagebreak,module,menu,fields,contact,article"
default=""
rows="8"
cols="30"
height="300px"
label="COM_JEM_GLOBAL_FIELD_FOOTERTEXT"
description="COM_JEM_GLOBAL_FIELD_FOOTERTEXT_DESC"
/>
<field name="showfootertext" type="radio"
default="0"
label="COM_JEM_GLOBAL_FIELD_SHOW_FOOTERTEXT"
description="COM_JEM_GLOBAL_FIELD_SHOW_FOOTERTEXT_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,140 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2015 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
defined('_JEXEC') or die;
$app = JFactory::getApplication();
if ($app->isSite())
{
JSession::checkToken('get') or die(JText::_('JINVALID_TOKEN'));
}
require_once JPATH_ROOT . '/components/com_jem/helpers/route.php';
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.framework', true);
$function = $app->input->getCmd('function', 'jSelectEvent');
//$listOrder = $this->escape($this->state->get('list.ordering'));
//$listDirn = $this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo JRoute::_('index.php?option=com_jem&view=eventslist&layout=modal&tmpl=component&function='.$function.'&'.JSession::getFormToken().'=1');?>" method="post" name="adminForm" id="adminForm" class="form-inline">
<fieldset class="filter clearfix">
<div class="btn-toolbar">
<div class="btn-group pull-left">
<?php echo $this->lists['filter'].'&nbsp;'; ?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search'];?>" class="inputbox input-medium" onchange="this.form.submit();" />
</div>
<div class="btn-group pull-left">
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>" data-placement="bottom">
<span class="icon-search"></span><?php echo '&#160;' . JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" data-placement="bottom" onclick="document.getElementById('filter_search').value='';this.form.submit();">
<span class="icon-remove"></span><?php echo '&#160;' . JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
</div>
<div class="btn-group pull-right">
<?php echo $this->pagination->getLimitBox();?>
</div>
<div class="clearfix"></div>
</div>
</fieldset>
<table class="table table-striped table-condensed">
<thead>
<tr>
<th class="title">
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $this->lists['order_Dir'], $this->lists['order']); ?>
</th>
<th width="15%" class="center nowrap">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'access_level', $this->lists['order_Dir'], $this->lists['order']); ?>
</th>
<th width="15%" class="center nowrap">
<?php echo JText::_('JCATEGORY'); ?>
</th>
<th width="5%" class="center nowrap">
<?php echo JHtml::_('grid.sort', 'JDATE', 'a.dates', $this->lists['order_Dir'], $this->lists['order']); ?>
</th>
<th width="1%" class="center nowrap">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $this->lists['order_Dir'], $this->lists['order']); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="15">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php foreach ($this->rows as $i => $item) :
//Prepare date
$displaydate = JemOutput::formatLongDateTime($item->dates, null, $item->enddates, null);
// Insert a break between date and enddate if possible
$displaydate = str_replace(" - ", " -<br />", $displaydate);
//Prepare time
if (!$item->times) {
$displaytime = '-';
} else {
$displaytime = JemOutput::formattime($item->times);
}
if ($item->language && JLanguageMultilang::isEnabled())
{
$tag = strlen($item->language);
if ($tag == 5)
{
$lang = substr($item->language, 0, 2);
}
elseif ($tag == 6)
{
$lang = substr($item->language, 0, 3);
}
else {
$lang = "";
}
}
elseif (!JLanguageMultilang::isEnabled())
{
$lang = "";
}
?>
<tr class="row<?php echo $i % 2; ?>">
<td>
<a href="javascript:void(0)" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $item->id; ?>', '<?php echo $this->escape(addslashes($item->title)); ?>', '<?php echo $this->escape(JemHelperRoute::getEventRoute($item->slug)); ?>', '<?php echo $this->escape(JemHelperRoute::getEventRoute($item->slug)); ?>', '<?php echo $this->escape($lang); ?>',null);">
<?php echo $this->escape($item->title); ?></a>
</td>
<td class="center">
<?php echo $this->escape($item->access_level); ?>
</td>
<td class="center">
<?php echo implode(", ", JemOutput::getCategoryList($item->categories, $this->jemsettings->catlinklist,true)); ?>
</td>
<td class="center nowrap">
<?php echo $displaydate; ?>
</td>
<td class="center">
<?php echo (int) $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>

View File

@ -0,0 +1,80 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
?>
<div id="jem" class="jem_eventslist<?php
echo $this->pageclass_sfx; ?>">
<div class="buttons">
<?php
$btn_params = array('task' => $this->task, 'print_link' => $this->print_link, 'archive_link' => $this->archive_link);
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
?>
</div>
<?php
if ($this->params->get('show_page_heading', 1)) : ?>
<h1 class="componentheading">
<?php
echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php
endif; ?>
<div class="clr"></div>
<?php
if ($this->params->get('showintrotext')) : ?>
<div class="description no_space floattext">
<?php
echo $this->params->get('introtext'); ?>
</div>
<?php
endif; ?>
<!--table-->
<hr class="jem-hr" style="display: none;"/>
<form action="<?php
echo htmlspecialchars($this->action); ?>" method="post" name="adminForm" id="adminForm">
<?php
echo $this->loadTemplate('events_table'); ?>
<input type="hidden" name="filter_order" value="<?php
echo $this->lists['order']; ?>"/>
<input type="hidden" name="filter_order_Dir" value="<?php
echo $this->lists['order_Dir']; ?>"/>
<input type="hidden" name="task" value="<?php
echo $this->task; ?>"/>
<input type="hidden" name="view" value="eventslist"/>
</form>
<div class="pagination">
<?php
echo $this->pagination->getPagesLinks(); ?>
</div>
<hr class="jem-hr" style="display: none;"/>
<?php
if ($this->params->get('showfootertext')) : ?>
<div class="description no_space floattext">
<?php
echo $this->params->get('footertext'); ?>
</div>
<?php
endif; ?>
<!--footer-->
<div class="copyright">
<?php
echo JemOutput::footer(); ?>
</div>
</div>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,82 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Router\Route;
/**
* Eventslist-Feed
*/
class JemViewEventslist extends HtmlView
{
/**
* Creates the Event Feed
*/
public function display($cachable = false, $urlparams = false)
{
$app = Factory::getApplication();
$document = $app->getDocument();
$jemsettings = JemHelper::config();
// Get some data from the model
$app->input->set('limit', $app->get('feed_limit'));
$rows = $this->get('Items');
if (!empty($rows)) { // prevent warning if $rows === false
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, $jemsettings->showtime);
// url link to event
$link = Route::_(JemHelperRoute::getEventRoute($row->id));
// feed item description text
$description = Text::_('COM_JEM_TITLE').': '.$title.'<br />';
$description .= Text::_('COM_JEM_VENUE').': '.$row->venue.($row->city ? (' / '.$row->city) : '').'<br />';
$description .= Text::_('COM_JEM_CATEGORY').': '.$category.'<br />';
$description .= Text::_('COM_JEM_DATE').': '.$displaydate.'<br />';
$description .= Text::_('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
$document->addItem($item);
}
}
}
}
?>

View File

@ -0,0 +1,246 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
/**
* Eventslist-View
*/
class JemViewEventslist extends JemView
{
public function __construct($config = array())
{
parent::__construct($config);
// additional path for common templates + corresponding override path
$this->addCommonTemplatePath();
}
/**
* Creates the Simple List View
*/
public function display($tpl = null)
{
// Initialize variables
$app = Factory::getApplication();
$jemsettings = JemHelper::config();
$settings = JemHelper::globalattribs();
$menu = $app->getMenu();
$menuitem = $menu->getActive();
$document = $app->getDocument();
$params = $app->getParams();
$uri = Uri::getInstance();
$jinput = $app->input;
$task = $jinput->getCmd('task', '');
$print = $jinput->getBool('print', false);
$pathway = $app->getPathWay();
$user = JemFactory::getUser();
$itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
// Load css
JemHelper::loadCss('jem');
JemHelper::loadCustomCss();
JemHelper::loadCustomTag();
if ($print) {
JemHelper::loadCss('print');
$document->setMetaData('robots', 'noindex, nofollow');
}
// get variables
$filter_order_DirDefault = 'ASC';
//Text filter
$filter_type = $app->getUserStateFromRequest('com_jem.eventslist.' . $itemid . '.filter_type', 'filter_type', 0, 'int');
$search = $app->getUserStateFromRequest('com_jem.eventslist.' . $itemid . '.filter_search', 'filter_search', '', 'string');
$search_month = $app->getUserStateFromRequest('com_jem.eventslist.' . $itemid . '.filter_month', 'filter_month', '', 'string');
//Filter only featured:
if ($params->get('onlyfeatured')) {
$this->getModel()->setState('filter.featured',1);
}
//Get initial order by menu item
$tableInitialorderby = $params->get('tableorderby','0');
if ($tableInitialorderby) {
switch ($tableInitialorderby){
case 0:
$tableInitialorderby = 'a.dates';
break;
case 1:
$tableInitialorderby = 'a.title';
break;
case 2:
$tableInitialorderby = 'l.venue';
break;
case 3:
$tableInitialorderby = 'l.city';
break;
case 4:
$tableInitialorderby = 'l.state';
break;
case 5:
$tableInitialorderby = 'c.catname';
break;
}
$filter_order = $app->getUserStateFromRequest('com_jem.eventslist.'.$itemid.'.filter_order', 'filter_order', $tableInitialorderby, 'cmd');
}else{
$filter_order = $app->getUserStateFromRequest('com_jem.eventslist.'.$itemid.'.filter_order', 'filter_order', 'a.dates', 'cmd');
}
$tableInitialDirectionOrder = $params->get('tabledirectionorder','ASC');
if ($tableInitialDirectionOrder) {
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.eventslist.'.$itemid.'.filter_order_Dir', 'filter_order_Dir', $tableInitialDirectionOrder, 'word');
}else{
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.eventslist.' . $itemid . '.filter_order_Dir', 'filter_order_Dir', $filter_order_DirDefault, 'word');
}
// Reverse default order for dates in archive mode
if ($task == 'archive' && $filter_order == 'a.dates') {
$filter_order_Dir = 'DESC';
}
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// Get data from model
$rows = $this->get('Items');
// Are events available?
$noevents = (!$rows) ? 1 : 0;
// params
$pagetitle = $params->def('page_title', $menuitem ? $menuitem->title : Text::_('COM_JEM_EVENTS'));
$pageheading = $params->def('page_heading', $params->get('page_title'));
$pageclass_sfx = $params->get('pageclass_sfx');
// pathway
if ($menuitem) {
$pathwayKeys = array_keys($pathway->getPathway());
$lastPathwayEntryIndex = end($pathwayKeys);
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
//$pathway->setItemName(1, $menuitem->title);
}
if ($task == 'archive') {
$pathway->addItem(Text::_('COM_JEM_ARCHIVE'), Route::_('index.php?option=com_jem&view=eventslist&task=archive'));
$print_link = $uri->toString() . "?task=archive&print=1";
$pagetitle .= ' - ' . Text::_('COM_JEM_ARCHIVE');
$pageheading .= ' - ' . Text::_('COM_JEM_ARCHIVE');
$archive_link = Route::_('index.php?option=com_jem&view=eventslist');
$params->set('page_heading', $pageheading);
} else {
$print_link = $uri->toString() . "?tmpl=component&print=1";
$archive_link = $uri->toString();
}
// Add site name to title if param is set
if ($app->get('sitename_pagetitles', 0) == 1) {
$pagetitle = Text::sprintf('JPAGETITLE', $app->get('sitename'), $pagetitle);
}
elseif ($app->get('sitename_pagetitles', 0) == 2) {
$pagetitle = Text::sprintf('JPAGETITLE', $pagetitle, $app->get('sitename'));
}
// Set Page title
$document->setTitle($pagetitle);
$document->setMetaData('title' , $pagetitle);
// Check if the user has permission to add things
$permissions = new stdClass();
$permissions->canAddEvent = $user->can('add', 'event');
$permissions->canAddVenue = $user->can('add', 'venue');
// add alternate feed link
$link = 'index.php?option=com_jem&view=eventslist&format=feed';
$attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
$document->addHeadLink(Route::_($link.'&type=rss'), 'alternate', 'rel', $attribs);
$attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0');
$document->addHeadLink(Route::_($link.'&type=atom'), 'alternate', 'rel', $attribs);
// search filter
$filters = array();
if ($jemsettings->showtitle == 1) {
$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_TITLE'));
}
if ($jemsettings->showlocate == 1) {
$filters[] = HTMLHelper::_('select.option', '2', Text::_('COM_JEM_VENUE'));
}
if ($jemsettings->showcity == 1) {
$filters[] = HTMLHelper::_('select.option', '3', Text::_('COM_JEM_CITY'));
}
if ($jemsettings->showcat == 1) {
$filters[] = HTMLHelper::_('select.option', '4', Text::_('COM_JEM_CATEGORY'));
}
if ($jemsettings->showstate == 1) {
$filters[] = HTMLHelper::_('select.option', '5', Text::_('COM_JEM_STATE'));
}
$lists['filter'] = HTMLHelper::_('select.genericlist', $filters, 'filter_type', array('size'=>'1','class'=>'form-select'), 'value', 'text', $filter_type);
$lists['search'] = $search;
$lists['month'] = $search_month;
// Create the pagination object
$pagination = $this->get('Pagination');
$this->lists = $lists;
$this->rows = $rows;
$this->noevents = $noevents;
$this->print_link = $print_link;
$this->archive_link = $archive_link;
$this->params = $params;
$this->dellink = $permissions->canAddEvent; // deprecated
$this->pagination = $pagination;
$this->action = $uri->toString();
$this->task = $task;
$this->jemsettings = $jemsettings;
$this->settings = $settings;
$this->permissions = $permissions;
$this->pagetitle = $pagetitle;
$this->pageclass_sfx = ($pageclass_sfx ? htmlspecialchars($pageclass_sfx): $pageclass_sfx);
$this->_prepareDocument();
parent::display($tpl);
}
/**
* Prepares the document
*/
protected function _prepareDocument()
{
// TODO: Refactor with parent _prepareDocument() function
// $app = Factory::getApplication();
// $menus = $app->getMenu();
if ($this->params->get('menu-meta_description'))
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
if ($this->params->get('menu-meta_keywords'))
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
if ($this->params->get('robots'))
{
$this->document->setMetadata('robots', $this->params->get('robots'));
}
}
}
?>

View File

@ -0,0 +1,47 @@
<?php
/**
* @package JEM
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView;
/**
* Raw: Eventlist
*/
class JemViewEventslist extends HtmlView
{
/**
* Creates the output for the Eventslist view
*/
public function display($tpl = null)
{
$settings = JemHelper::config();
$settings2 = JemHelper::globalattribs();
if ($settings2->get('global_show_ical_icon','0')==1) {
// Get data from the model
$model = $this->getModel();
$model->setState('list.start',0);
$model->setState('list.limit',$settings->ical_max_items);
$rows = $model->getItems();
// initiate new CALENDAR
$vcal = JemHelper::getCalendarTool();
$vcal->setConfig("filename", "events.ics");
if (!empty($rows)) {
foreach ($rows as $row) {
JemHelper::icalAddEvent($vcal, $row);
}
}
// generate and redirect output to user browser
$vcal->returnCalendar();
}
}
}