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,206 @@
<?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\HTML\HTMLHelper;
?>
<div id="jem" class="jem_venues<?php echo $this->pageclass_sfx . ' venues_id' . $this->item->id; ?>">
<div class="buttons">
<?php
$btn_params = array('task' => $this->task, 'print_link' => $this->print_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>
<!--Venue-->
<?php foreach($this->rows as $row) : ?>
<div itemscope itemtype="https://schema.org/Place" class="venue_id<?php echo $this->escape($row->locid); ?>">
<h2 class="jem">
<a href="<?php echo $row->linkEventsPublished; ?>" itemprop="url"><span itemprop="name"><?php echo $this->escape($row->venue); ?></span></a>
</h2>
<!-- FLYER -->
<?php echo JemOutput::flyer( $row, $row->limage, 'venue' ); ?>
<!-- -->
<dl class="location">
<?php if (($this->settings->get('global_show_detlinkvenue',1)) && (!empty($row->url))) : ?>
<dt class="venue_website">
<?php echo Text::_('COM_JEM_WEBSITE').':'; ?>
</dt>
<dd class="venue_website">
<a href="<?php echo $this->escape($row->url); ?>" target="_blank">
<?php
if (\Joomla\String\StringHelper::strlen($row->url) > 35) {
$urlclean = htmlspecialchars(\Joomla\String\StringHelper::substr($row->url, 0 , 35)) . '...';
} else {
$urlclean = htmlspecialchars($row->url);
}
echo $urlclean;
?>
</a>
</dd>
<?php endif; ?>
</dl>
<?php if ( $this->settings->get('global_show_detailsadress',1)) : ?>
<dl class="location floattext" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<?php if ($row->street) : ?>
<dt class="venue_street">
<?php echo Text::_('COM_JEM_STREET').':'; ?>
</dt>
<dd class="venue_street" itemprop="streetAddress">
<?php echo $this->escape($row->street); ?>
</dd>
<?php endif; ?>
<?php if ($row->postalCode) : ?>
<dt class="venue_postalCode">
<?php echo Text::_('COM_JEM_ZIP').':'; ?>
</dt>
<dd class="venue_postalCode" itemprop="postalCode">
<?php echo $this->escape($row->postalCode); ?>
</dd>
<?php endif; ?>
<?php if ($row->city) : ?>
<dt class="venue_city">
<?php echo Text::_('COM_JEM_CITY').':'; ?>
</dt>
<dd class="venue_city" itemprop="addressLocality">
<?php echo $this->escape($row->city); ?>
</dd>
<?php endif; ?>
<?php if ($row->state) : ?>
<dt class="venue_state">
<?php echo Text::_('COM_JEM_STATE').':'; ?>
</dt>
<dd class="venue_state" itemprop="addressRegion">
<?php echo $this->escape($row->state); ?>
</dd>
<?php endif; ?>
<?php if ($row->country) : ?>
<dt class="venue_country">
<?php echo Text::_('COM_JEM_COUNTRY').':'; ?>
</dt>
<dd class="venue_country">
<?php if ($row->country) :
$countryimg = JemHelperCountries::getCountryFlag($row->country);
echo $countryimg ? $countryimg : $row->country;
endif; ?>
<meta itemprop="addressCountry" content="<?php echo $row->country; ?>" />
</dd>
<?php endif; ?>
<!-- PUBLISHING STATE -->
<?php if (isset($row->published) && (!empty($this->show_status) || $row->published == 0)) : ?>
<dt class="published"><?php echo Text::_('JSTATUS'); ?>:</dt>
<dd class="published">
<?php switch ($row->published) {
case 1: echo Text::_('JPUBLISHED'); break;
case 0: echo Text::_('JUNPUBLISHED'); break;
case 2: echo Text::_('JARCHIVED'); break;
case -2: echo Text::_('JTRASHED'); break;
} ?>
</dd>
<?php endif; ?>
<?php if ($this->settings->get('global_show_mapserv') == 1 || $this->settings->get('global_show_mapserv') == 4) : ?>
<?php echo JemOutput::mapicon($row,null,$this->settings); ?>
<?php endif; ?>
</dl>
<?php elseif (isset($row->published) && (!empty($this->show_status) || $row->published == 0)) : ?>
<!-- PUBLISHING STATE -->
<dl class="floattext">
<dt class="published"><?php echo Text::_('JSTATUS'); ?>:</dt>
<dd class="published">
<?php switch ($row->published) {
case 1: echo Text::_('JPUBLISHED'); break;
case 0: echo Text::_('JUNPUBLISHED'); break;
case 2: echo Text::_('JARCHIVED'); break;
case -2: echo Text::_('JTRASHED'); break;
} ?>
</dd>
</dl>
<?php endif; ?>
<dl class="floattext">
<dt class="venue_eventspublished">
<?php echo Text::_('COM_JEM_VENUES_EVENTS_PUBLISHED').':'; ?>
</dt>
<dd class="venue_eventspublished">
<a href="<?php echo $row->linkEventsPublished; ?>"><?php echo $row->EventsPublished; ?></a>
</dd>
</dl>
<dl class="floattext">
<dt class="venue_archivedevents">
<?php echo Text::_('COM_JEM_VENUES_EVENTS_ARCHIVED').':'; ?>
</dt>
<dd class="venue_archivedevents">
<a href="<?php echo $row->linkEventsArchived; ?>"><?php echo $row->EventsArchived; ?></a>
</dd>
</dl>
<?php if ( $this->settings->get('global_show_detailsadress',1)) : ?>
<?php if ($this->settings->get('global_show_mapserv') == 2 || $this->settings->get('global_show_mapserv') == 5) : ?>
<div class="jem-map">
<?php echo JemOutput::mapicon($row,null,$this->settings); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->settings->get('global_show_mapserv')== 3) : ?>
<input type="hidden" id="latitude" value="<?php echo $row->latitude;?>">
<input type="hidden" id="longitude" value="<?php echo $row->longitude;?>">
<input type="hidden" id="venue" value="<?php echo $row->venue;?>">
<input type="hidden" id="street" value="<?php echo $row->street;?>">
<input type="hidden" id="city" value="<?php echo $row->city;?>">
<input type="hidden" id="state" value="<?php echo $row->state;?>">
<input type="hidden" id="postalCode" value="<?php echo $row->postalCode;?>">
<?php echo JemOutput::mapicon($row,'venues',$this->settings); ?>
<?php endif; ?>
<?php if ($this->settings->get('global_show_locdescription',1) && $row->locdescription != '' && $row->locdescription != '<br />') : ?>
<h2 class="description">
<?php echo Text::_('COM_JEM_VENUE_DESCRIPTION').':'; ?>
</h2>
<div class="description" itemprop="description">
<?php echo $row->locdescription; ?>
</div>
<?php else : ?>
<div class="clr"> </div>
<?php endif; ?>
</div>
<?php endforeach; ?>
<!--pagination-->
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<!--copyright-->
<div class="copyright">
<?php echo JemOutput::footer( ); ?>
</div>
</div>
<?php echo JemOutput::lightbox(); ?>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_JEM_VENUES_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_JEM_VENUES_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="params">
<fieldset name="basic">
<field name="display_venues_num" type="text"
size="2"
default="5"
label="COM_JEM_VENUE_NUMBER"
description="COM_JEM_VENUE_NUMBER_DESC"
/>
</fieldset>
</fields>
</metadata>

View File

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

View File

@ -0,0 +1,138 @@
<?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;
?>
<div id="jem" class="jem_venues<?php echo $this->pageclass_sfx; ?>">
<div class="buttons">
<?php
$btn_params = array('task' => $this->task, 'print_link' => $this->print_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; ?>
<style>
.jem-img {
flex-basis: <?php echo $this->jemsettings->imagewidth; ?>px;
}
</style>
<!--Venue-->
<?php foreach($this->rows as $row) : ?>
<div itemscope itemtype="https://schema.org/Place" class="venue_id<?php echo $this->escape($row->locid); ?>">
<h2 class="jem">
<a href="<?php echo $row->linkEventsPublished; ?>" itemprop="url"><span itemprop="name"><?php echo $this->escape($row->venue); ?></span></a>
</h2>
<div class="jem-row">
<div class="jem-info">
<dl class="jem-dl" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<?php if (($this->settings->get('global_show_detlinkvenue',1)) && (!empty($row->url))) : ?>
<dt class="venue_website hasTooltip" data-placement="bottom" data-original-title="<?php echo Text::_('COM_JEM_WEBSITE'); ?>" >
<?php echo Text::_('COM_JEM_WEBSITE').':'; ?>
</dt>
<dd class="venue_website">
<a href="<?php echo $this->escape($row->url); ?>" target="_blank">
<?php
if (\Joomla\String\StringHelper::strlen($row->url) > 35) {
$urlclean = htmlspecialchars(\Joomla\String\StringHelper::substr($row->url, 0 , 35)) . '...';
} else {
$urlclean = htmlspecialchars($row->url);
}
echo $urlclean;
?>
</a>
</dd>
<?php endif; ?>
<?php if ($row->city) : ?>
<dt class="venue_city hasTooltip" data-placement="bottom" data-original-title="<?php echo Text::_('COM_JEM_CITY'); ?>">
<?php echo Text::_('COM_JEM_CITY').':'; ?>
</dt>
<dd class="venue_city" itemprop="addressLocality">
<?php echo $this->escape($row->city); ?>
</dd>
<?php endif; ?>
<?php if ($row->state) : ?>
<dt class="venue_state hasTooltip" data-placement="bottom" data-original-title="<?php echo Text::_('COM_JEM_STATE'); ?>">
<?php echo Text::_('COM_JEM_STATE').':'; ?>
</dt>
<dd class="venue_state" itemprop="addressRegion">
<?php echo $this->escape($row->state); ?>
</dd>
<?php endif; ?>
<?php if ($row->country) : ?>
<dt class="venue_country hasTooltip" data-placement="bottom" data-original-title="<?php echo Text::_('COM_JEM_COUNTRY'); ?>">
<?php echo Text::_('COM_JEM_COUNTRY').':'; ?>
</dt>
<dd class="venue_country">
<?php if ($row->country) :
$countryimg = JemHelperCountries::getCountryFlag($row->country);
echo $countryimg ? $countryimg : $row->country;
endif; ?>
<meta itemprop="addressCountry" content="<?php echo $row->country; ?>" />
</dd>
<?php endif; ?>
</dl>
</div>
<!-- FLYER -->
<div class="jem-img">
<?php echo JemOutput::flyer( $row, $row->limage, 'venue' ); ?>
</div>
</div>
<?php /* if ($this->settings->get('global_show_locdescription',1) && $row->locdescription != '' && $row->locdescription != '<br />') : ?>
<h3 class="description">
<?php echo Text::_('COM_JEM_VENUE_DESCRIPTION').':'; ?>
</h3>
<div class="description" itemprop="description">
<?php echo $row->locdescription; ?>
</div>
<?php else : ?>
<div class="clr"> </div>
<?php endif; */?>
<div class="jem-readmore">
<a href="<?php echo $row->linkEventsPublished; ?>" title="<?php echo Text::_('COM_JEM_EVENT_READ_MORE_TITLE'); ?>">
<button class="buttonfilter btn">
<?php echo Text::_('COM_JEM_EVENT_READ_MORE_TITLE'); ?>
</button>
</a>
</div>
</div>
<?php
if ($row !== end($this->rows)) :
echo '<hr class="jem-hr">';
endif;
?>
<?php endforeach; ?>
<!--pagination-->
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<!--copyright-->
<div class="copyright">
<?php echo JemOutput::footer( ); ?>
</div>
</div>
<?php echo JemOutput::lightbox(); ?>

View File

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

View File

@ -0,0 +1,141 @@
<?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\Uri\Uri;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Plugin\PluginHelper;
/**
* Venues-View
*/
class JemViewVenues extends JemView
{
/**
* Creates the Venuesview
*/
public function display($tpl = null)
{
$app = Factory::getApplication();
$document = $app->getDocument();
$jemsettings = JemHelper::config();
$settings = JemHelper::globalattribs();
$user = JemFactory::getUser();
$jinput = $app->input;
$print = $jinput->getBool('print', false);
$task = $jinput->getCmd('task', '');
//get menu information
$menu = $app->getMenu();
$menuitem = $menu->getActive();
$params = $app->getParams();
$model = $this->getModel();
// Load css
JemHelper::loadCss('jem');
JemHelper::loadCustomCss();
JemHelper::loadCustomTag();
if ($print) {
JemHelper::loadCss('print');
$document->setMetaData('robots', 'noindex, nofollow');
}
// Request variables
$items = $this->get('Items');
foreach ($items AS $item) {
// Create image information
$item->limage = JemImage::flyercreator($item->locimage, 'venue');
// Generate Venuedescription
if (!$item->locdescription == '' || !$item->locdescription == '<br />') {
//execute plugins
$item->text = $item->locdescription;
$item->title = $item->venue;
PluginHelper::importPlugin('content');
$app->triggerEvent('onContentPrepare', array('com_jem.venue', &$item, &$params, 0));
$item->locdescription = $item->text;
}
//build the url
if (!empty($item->url) && !preg_match('%^http(s)?://%', $item->url)) {
$item->url = 'https://'.$item->url;
}
//create target link
$item->linkEventsArchived = Route::_(JemHelperRoute::getVenueRoute($item->venueslug.'&task=archive'));
$item->linkEventsPublished = Route::_(JemHelperRoute::getVenueRoute($item->venueslug));
$item->EventsPublished = $model->AssignedEvents($item->locid,"1");
$item->EventsArchived = $model->AssignedEvents($item->locid,"2");
}
$pagetitle = $params->def('page_title', $menuitem->title);
$pageheading = $params->def('page_heading', $params->get('page_title'));
$pageclass_sfx = $params->get('pageclass_sfx');
//pathway
$pathway = $app->getPathWay();
$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=venues&task=archive'));
$print_link = Route::_('index.php?option=com_jem&view=venues&task=archive&print=1&tmpl=component');
$pagetitle .= ' - '.Text::_('COM_JEM_ARCHIVE');
$pageheading .= ' - '.Text::_('COM_JEM_ARCHIVE');
$params->set('page_heading', $pageheading);
} else {
$print_link = Route::_('index.php?option=com_jem&view=venues&print=1&tmpl=component');
}
// 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);
$document->setMetadata('keywords', $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');
$permissions->canEditPublishVenue = $user->can(array('edit', 'publish'), 'venue');
// Create the pagination object
$pagination = $this->get('Pagination');
$this->rows = $items;
$this->print_link = $print_link;
$this->params = $params;
$this->pagination = $pagination;
$this->item = $menuitem;
$this->jemsettings = $jemsettings;
$this->settings = $settings;
$this->permissions = $permissions;
$this->show_status = $permissions->canEditPublishVenue;
$this->task = $task;
$this->pagetitle = $pagetitle;
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
parent::display($tpl);
}
}