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,7 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view
title="Venue">
<message><![CDATA[COM_JEM_VENUE_VIEW_LAYOUT_DESC]]></message>
</view>
</metadata>

View File

@ -0,0 +1,424 @@
<?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\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
?>
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
<div class="buttons">
<?php
$btn_params = array('print_link' => $this->print_link, 'task' => $this->task, 'ical_link' => $this->ical_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; ?>
<?php if ($this->params->get('showintrotext')) : ?>
<div class="description no_space floattext">
<?php echo $this->params->get('introtext'); ?>
</div>
<p> </p>
<?php endif; ?>
<?php
$countcatevents = array ();
$countperday = array();
$limit = $this->params->get('daylimit', 10);
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
$showtime = $this->settings->get('global_show_timedetails', 1);
foreach ($this->rows as $row) :
if (!JemHelper::isValidDate($row->dates)) {
continue; // skip, open date !
}
//get event date
$year = date('Y', strtotime($row->dates));
$month = date('m', strtotime($row->dates));
$day = date('d', strtotime($row->dates));
@$countperday[$year.$month.$day]++;
if ($countperday[$year.$month.$day] == $limit+1) {
$var1a = Route::_('index.php?option=com_jem&view=day&id='.$year.$month.$day.(!empty($this->locid)?('&locid='.$this->locid):''));
$var1b = Text::_('COM_JEM_AND_MORE');
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
$id = 'eventandmore';
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
continue;
} elseif ($countperday[$year.$month.$day] > $limit+1) {
continue;
}
//for time in tooltip
$timehtml = '';
if ($showtime) {
$start = JemOutput::formattime($row->times);
$end = JemOutput::formattime($row->endtimes);
if ($start != '') {
$timehtml = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_TIME_SHORT').': </span>';
$timehtml .= $start;
if ($end != '') {
$timehtml .= ' - '.$end;
}
$timehtml .= '</div>';
}
}
$eventname = '<div class="eventName">'.Text::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
$eventid = $this->escape($row->id);
//initialize variables
$multicatname = '';
$colorpic = '';
$nr = is_array($row->categories) ? count($row->categories) : 0;
$ix = 0;
$content = '';
$contentend = '';
$catcolor = array();
//walk through categories assigned to an event
foreach((array)$row->categories AS $category) {
//Currently only one id possible...so simply just pick one up...
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
//wrap a div for each category around the event for show hide toggler
$content .= '<div id="catz" class="cat'.$category->id.'">';
$contentend .= '</div>';
//attach category color if any in front of the catname
if ($category->color) {
$multicatname .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span>&nbsp;'.$category->catname;
} else {
$multicatname .= $category->catname;
}
$ix++;
if ($ix != $nr) {
$multicatname .= ', ';
}
//attach category color if any in front of the event title in the calendar overview
if (isset($category->color) && $category->color) {
$colorpic .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span>';
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
}
//count occurence of the category
if (!isset($row->multi) || ($row->multi == 'first')) {
if (!array_key_exists($category->id, $countcatevents)) {
$countcatevents[$category->id] = 1;
} else {
$countcatevents[$category->id]++;
}
}
}
$color = '<div id="eventcontenttop" class="eventcontenttop">';
$color .= $colorpic;
$color .= '</div>';
// multiday
$multi_mode = 0; // single day
$multi_icon = '';
if (isset($row->multi)) {
switch ($row->multi) {
case 'first': // first day
$multi_mode = 1;
$multi_icon = HTMLHelper::_("image","com_jem/arrow-left.png",'', NULL, true);
break;
case 'middle': // middle day
$multi_mode = 2;
$multi_icon = HTMLHelper::_("image","com_jem/arrow-middle.png",'', NULL, true);
break;
case 'zlast': // last day
$multi_mode = 3;
$multi_icon = HTMLHelper::_("image","com_jem/arrow-right.png",'', NULL, true);
break;
}
}
//for time in calendar
$timetp = '';
if ($showtime) {
$start = JemOutput::formattime($row->times,'',false);
$end = JemOutput::formattime($row->endtimes,'',false);
switch ($multi_mode) {
case 1:
$timetp .= $multi_icon . ' ' . $start . '<br />';
break;
case 2:
$timetp .= $multi_icon . '<br />';
break;
case 3:
$timetp .= $multi_icon . ' ' . $end . '<br />';
break;
default:
if ($start != '') {
$timetp .= $start;
if ($end != '') {
$timetp .= ' - '.$end;
}
$timetp .= '<br />';
}
break;
}
} else {
if (!empty($multi_icon)) {
$timetp .= $multi_icon . ' ';
}
}
$catname = '<div class="catname">'.$multicatname.'</div>';
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
if (!empty($row->multienddate)) {
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
} else if ($row->enddates && $row->dates < $row->enddates) {
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
}
//venue
if ($this->jemsettings->showlocate == 1) {
$venue = '<div class="location"><span class="text-label">'.Text::_('COM_JEM_VENUE_SHORT').': </span>';
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
$venue .= '</div>';
} else {
$venue = '';
}
// state if unpublished
$statusicon = '';
if (isset($row->published) && ($row->published != 1)) {
$statusicon = JemOutput::publishstateicon($row);
$eventstate = '<div class="eventstate"><span class="text-label">'.Text::_('JSTATUS').': </span>';
switch ($row->published) {
case 1: $eventstate .= Text::_('JPUBLISHED'); break;
case 0: $eventstate .= Text::_('JUNPUBLISHED'); break;
case 2: $eventstate .= Text::_('JARCHIVED'); break;
case -2: $eventstate .= Text::_('JTRASHED'); break;
}
$eventstate .= '</div>';
} else {
$eventstate = '';
}
//date in tooltip
$multidaydate = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_DATE').': </span>';
switch ($multi_mode) {
case 1: // first day
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
break;
case 2: // middle day
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
break;
case 3: // last day
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
break;
default: // single day
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
break;
}
$multidaydate .= '</div>';
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
$editicon = '';
if (!$this->print) {
$btns = array();
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
}
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
}
if (!empty($btns)) {
$editicon .= '<div class="inline-button-right">';
$editicon .= join(' ', $btns);
$editicon .= '</div>';
}
}
//get border for featured event
$usefeaturedborder = $this->params->get('usefeaturedborder', 0);
$featuredbordercolor = $this->params->get('featuredbordercolor', 0);
$featuredclass = '';
$featuredstyle ='';
if($usefeaturedborder && $row->featured){
$featuredclass="borderfeatured";
$featuredstyle="border-color:" . $featuredbordercolor;
}
//generate the output
// if we have exact one color from categories we can use this as background color of event
$content .= '<div class="eventcontentinner event_id' . $eventid . ' cat_id' . $category->id . ' ' . $featuredclass . '" style="' . $featuredstyle;
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
$content .= '; background-color:'.array_pop($catcolor).'">';
} else {
$content .= '">' . $colorpic;
}
$content .= $editicon;
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
$content .= $contentend . '</div>';
$this->cal->setEventContent($year, $month, $day, $content);
endforeach;
// enable little icon right beside day number to allow event creation
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
$html = JemOutput::prepareAddEventButton('locid='.$this->locid);
$this->cal->enableNewEventLinks($html);
}
$displayLegend = (int)$this->params->get('displayLegend', 1);
if ($displayLegend == 2) : ?>
<!-- Calendar legend above -->
<div id="jlcalendarlegend">
<!-- Calendar buttons -->
<div class="calendarButtons">
<div class="calendarButtonsToggle">
<div id="buttonshowall" class="calendarButton btn btn-outline-dark">
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
</div>
<div id="buttonhideall" class="calendarButton btn btn-outline-dark">
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
</div>
</div>
</div>
<div class="clr"></div>
<!-- Calendar Legend -->
<div class="calendarLegends">
<?php
if ($this->params->get('displayLegend')) {
##############
## FOR EACH ##
##############
$counter = array();
# walk through events
foreach ($this->rows as $row) {
foreach ($row->categories as $cat) {
# sort out dupes for the counter (catid-legend)
if (!in_array($cat->id, $counter)) {
# add cat id to cat counter
$counter[] = $cat->id;
# build legend
if (array_key_exists($cat->id, $countcatevents)) {
?>
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
<?php
if (isset($cat->color) && $cat->color) {
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
}
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
?>
</div>
<?php
}
}
}
}
}
?>
</div>
</div>
<?php endif; ?>
<?php
// print the calendar
echo $this->cal->showMonth();
?>
<?php if (($displayLegend == 1) || ($displayLegend == 0)) : ?>
<!-- Calendar legend below -->
<div id="jlcalendarlegend">
<!-- Calendar buttons -->
<div class="calendarButtons">
<div class="calendarButtonsToggle">
<div id="buttonshowall" class="calendarButton btn btn-outline-dark">
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
</div>
<div id="buttonhideall" class="calendarButton btn btn-outline-dark">
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
</div>
</div>
</div>
<div class="clr"></div>
<!-- Calendar Legend -->
<div class="calendarLegends">
<?php
if ($displayLegend == 1) {
##############
## FOR EACH ##
##############
$counter = array();
# walk through events
foreach ($this->rows as $row) {
foreach ($row->categories as $cat) {
# sort out dupes for the counter (catid-legend)
if (!in_array($cat->id, $counter)) {
# add cat id to cat counter
$counter[] = $cat->id;
# build legend
if (array_key_exists($cat->id, $countcatevents)) {
?>
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
<?php
if (isset($cat->color) && $cat->color) {
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
}
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
?>
</div>
<?php
}
}
}
}
}
?>
</div>
</div>
<?php endif; ?>
<div class="clr"></div>
<div class="copyright">
<?php echo JemOutput::footer(); ?>
</div>
</div>

View File

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_JEM_VENUE_CALENDAR_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_JEM_VENUE_CALENDAR_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="request">
<fieldset name="request"
addfieldpath="/administrator/components/com_jem/models/fields"
>
<field name="id" type="modal_venue"
label="COM_JEM_SELECTVENUE"
description="COM_JEM_SELECTVENUE_DESC"
required="true"
/>
</fieldset>
</fields>
<fields name="params">
<fieldset name="basic"
addfieldpath="/administrator/components/com_jem/models/fields"
>
<field name="introtext" type="textarea"
filter="safehtml"
default=""
rows="8"
cols="30"
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">COM_JEM_SHOW</option>
<option value="0">COM_JEM_HIDE</option>
</field>
<field type="spacer" name="myspacer2" hr="true" />
<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="displayLegend" type="list"
default="1"
label="COM_JEM_DISPLAY_LEGEND"
description="COM_JEM_DISPLAY_LEGEND_DESC"
>
<option value="0">JNO</option>
<option value="2">COM_JEM_ABOVE</option>
<option value="1">COM_JEM_BELOW</option>
</field>
<field name="show_only_start" type="radio"
default="0"
label="COM_JEM_SHOWONLYSTARTDAY"
description="COM_JEM_SHOWONLYSTARTDAY_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="firstweekday" type="list"
default="1"
label="COM_JEM_SELECTFIRSTWEEKDAY"
description="COM_JEM_SELECTFIRSTWEEKDAYDESC"
>
<option value="0">COM_JEM_SUNDAY</option>
<option value="1">COM_JEM_MONDAY</option>
</field>
<field name="daylimit" type="text"
default="10"
label="COM_JEM_MAX_EVENTS_PER_DAY"
description="COM_JEM_MAX_EVENTS_PER_DAY_DESC"
/>
<field name="show_addevent_icon" type="radio"
default="0"
label="COM_JEM_SHOWADDEVENTICON"
description="COM_JEM_SHOWADDEVENTICON_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="show_editevent_icon" type="radio"
default="0"
label="COM_JEM_SHOWEDITEVENTICON"
description="COM_JEM_SHOWEDITEVENTICON_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="show_copyevent_icon" type="radio"
default="0"
label="COM_JEM_SHOWCOPYEVENTICON"
description="COM_JEM_SHOWCOPYEVENTICON_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field type="spacer" name="myspacer3" hr="true" />
<field name="eventlinkcolor" type="color"
default="#000000"
label="COM_JEM_CALENDAR_EVENTLINKCOLOR"
description="COM_JEM_CALENDAR_EVENTLINKCOLOR_DESC"
/>
<field name="eventbackgroundcolor" type="color"
default="#c8deb1"
label="COM_JEM_CALENDAR_EVENTBACKGROUNDCOLOR"
description="COM_JEM_CALENDAR_EVENTBACKGROUNDCOLOR_DESC"
/>
<field name="eventbg_usecatcolor" type="radio"
default="0"
label="COM_JEM_CALENDAR_USECATCOLOR"
description="COM_JEM_CALENDAR_USECATCOLOR_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="currentdaycolor" type="color"
default="#344280"
label="COM_JEM_CALENDAR_CURRENTDAYCOLOR"
description="COM_JEM_CALENDAR_CURRENTDAYCOLOR_DESC"
/>
<field name="eventandmorecolor" type="color"
default="#FFFF00"
label="COM_JEM_CALENDAR_EVENTANDMORECOLOR"
description="COM_JEM_CALENDAR_EVENTANDMORECOLOR_DESC"
/>
<field name="usefeaturedborder" type="radio"
default="0"
label="COM_JEM_CALENDAR_USEFEATUREDBORDER"
description="COM_JEM_CALENDAR_USEFEATUREDBORDER_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="featuredbordercolor" type="color"
default="#000080"
label="COM_JEM_CALENDAR_FEATUREDBORDERCOLOR"
description="COM_JEM_CALENDAR_FEATUREDBORDERCOLOR_DESC"
/>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,203 @@
<?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_venue<?php echo $this->pageclass_sfx . ' venue_id' . $this->venue->id; ?>" itemscope="itemscope" itemtype="https://schema.org/Place">
<div class="buttons">
<?php
$btn_params = array('id' => $this->venue->slug, 'slug' => $this->venue->slug, '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->escape($this->params->get('show_page_heading', 1))) : ?>
<h1 class="componentheading">
<span itemprop="name"><?php echo $this->escape($this->params->get('page_heading')); ?></span>
<?php
echo JemOutput::editbutton($this->venue, $this->params, NULL, $this->permissions->canEditVenue, 'venue');
echo JemOutput::copybutton($this->venue, $this->params, NULL, $this->permissions->canAddVenue, 'venue');
?>
</h1>
<?php endif; ?>
<?php if ($this->escape($this->params->get('page_heading')) != $this->escape($this->venue->title)) : ?>
<?php if ($this->escape($this->params->get('show_page_heading', 1))) : ?>
<h2 class="jem-venue-title">
<?php echo $this->escape($this->venue->title);?>
</h2>
<?php else : ?>
<h1 class="jem-venue-title">
<?php echo $this->escape($this->venue->title);?>
</h1>
<?php endif; ?>
<?php endif; ?>
<!--Venue-->
<h2 class="jem">
<?php echo Text::_('COM_JEM_VENUE'); ?>
</h2>
<?php echo JemOutput::flyer($this->venue, $this->limage, 'venue'); ?>
<?php if (($this->settings->get('global_show_detlinkvenue', 1)) && (!empty($this->venue->url))) : ?>
<dl class="location">
<dt class="venue"><?php echo Text::_('COM_JEM_WEBSITE'); ?>:</dt>
<dd class="venue">
<a href="<?php echo $this->venue->url; ?>" target="_blank"><?php echo $this->venue->urlclean; ?></a>
</dd>
</dl>
<?php endif; ?>
<?php if ($this->settings->get('global_show_detailsadress', 1)) : ?>
<dl class="location floattext" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<?php if ($this->venue->street) : ?>
<dt class="venue_street"><?php echo Text::_('COM_JEM_STREET'); ?>:</dt>
<dd class="venue_street" itemprop="streetAddress">
<?php echo $this->escape($this->venue->street); ?>
</dd>
<?php endif; ?>
<?php if ($this->venue->postalCode) : ?>
<dt class="venue_postalCode"><?php echo Text::_('COM_JEM_ZIP'); ?>:</dt>
<dd class="venue_postalCode" itemprop="postalCode">
<?php echo $this->escape($this->venue->postalCode); ?>
</dd>
<?php endif; ?>
<?php if ($this->venue->city) : ?>
<dt class="venue_city"><?php echo Text::_('COM_JEM_CITY'); ?>:</dt>
<dd class="venue_city" itemprop="addressLocality">
<?php echo $this->escape($this->venue->city); ?>
</dd>
<?php endif; ?>
<?php if ($this->venue->state) : ?>
<dt class="venue_state"><?php echo Text::_('COM_JEM_STATE'); ?>:</dt>
<dd class="venue_state" itemprop="addressRegion">
<?php echo $this->escape($this->venue->state); ?>
</dd>
<?php endif; ?>
<?php if ($this->venue->country) : ?>
<dt class="venue_country"><?php echo Text::_('COM_JEM_COUNTRY'); ?>:</dt>
<dd class="venue_country">
<?php echo $this->venue->countryimg ? $this->venue->countryimg : $this->venue->country; ?>
<meta itemprop="addressCountry" content="<?php echo $this->venue->country; ?>" />
</dd>
<?php endif; ?>
<!-- PUBLISHING STATE -->
<?php if (isset($this->venue->published) && !empty($this->show_status)) : ?>
<dt class="published"><?php echo Text::_('JSTATUS'); ?>:</dt>
<dd class="published">
<?php switch ($this->venue->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
for ($cr = 1; $cr <= 10; $cr++) {
$currentRow = $this->venue->{'custom'.$cr};
if (preg_match('%^http(s)?://%', $currentRow)) {
$currentRow = '<a href="' . $this->escape($currentRow) . '" target="_blank">' . $this->escape($currentRow) . '</a>';
}
if ($currentRow) {
?>
<dt class="custom<?php echo $cr; ?>"><?php echo Text::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr); ?>:</dt>
<dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd>
<?php
}
}
if ($this->settings->get('global_show_mapserv') == 1 || $this->settings->get('global_show_mapserv') == 4) {
echo JemOutput::mapicon($this->venue, null, $this->settings);
}
endif; ?>
</dl>
<?php if ($this->settings->get('global_show_mapserv') == 2 || $this->settings->get('global_show_mapserv') == 5) : ?>
<div class="jem-map">
<?php echo JemOutput::mapicon($this->venue, null, $this->settings); ?>
</div>
<?php endif;
if (isset($this->venue->published) && !empty($this->show_status)) : ?>
<!-- PUBLISHING STATE -->
<dl>
<dt class="published"><?php echo Text::_('JSTATUS'); ?>:</dt>
<dd class="published">
<?php switch ($this->venue->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; ?>
<?php if ($this->settings->get('global_show_mapserv') == 3) : ?>
<input type="hidden" id="latitude" value="<?php echo $this->venue->latitude; ?>">
<input type="hidden" id="longitude" value="<?php echo $this->venue->longitude; ?>">
<input type="hidden" id="venue" value="<?php echo $this->venue->venue; ?>">
<input type="hidden" id="street" value="<?php echo $this->venue->street; ?>">
<input type="hidden" id="city" value="<?php echo $this->venue->city; ?>">
<input type="hidden" id="state" value="<?php echo $this->venue->state; ?>">
<input type="hidden" id="postalCode" value="<?php echo $this->venue->postalCode; ?>">
<?php echo JemOutput::mapicon($this->venue, null, $this->settings); ?>
<?php endif; ?>
<?php if ($this->settings->get('global_show_locdescription', 1) && $this->venuedescription != '' &&
$this->venuedescription != '<br />') : ?>
<h2 class="description"><?php echo Text::_('COM_JEM_VENUE_DESCRIPTION'); ?></h2>
<div class="description no_space floattext" itemprop="description">
<?php echo $this->venuedescription; ?>
</div>
<?php endif; ?>
<?php $this->attachments = $this->venue->attachments; ?>
<?php echo $this->loadTemplate('attachments'); ?>
<?php if ($this->settings->get('global_show_listevents', 1)) : ?>
<!--table-->
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" id="adminForm">
<?php echo $this->loadTemplate('events_table'); ?>
<p>
<input type="hidden" name="option" value="com_jem" />
<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="view" value="venue" />
<input type="hidden" name="id" value="<?php echo $this->venue->id; ?>" />
</p>
</form>
<!--pagination-->
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<?php echo JemOutput::icalbutton($this->venue->id, 'venue'); ?>
<?php endif; ?>
<!--copyright-->
<div class="copyright">
<?php echo JemOutput::footer(); ?>
</div>
</div>
<?php echo JemOutput::lightbox(); ?>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_JEM_VENUE_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_JEM_VENUE_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="request">
<fieldset name="request"
addfieldpath="/administrator/components/com_jem/models/fields"
>
<field name="id" type="modal_venue"
label="COM_JEM_SELECTVENUE"
description="COM_JEM_SELECTVENUE_DESC"
required="true"
/>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,187 @@
<?php
/**
* @version 2.2.2
* @package JEM
* @copyright (C) 2013-2017 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
defined('_JEXEC') or die;
?>
<script type="text/javascript">
function tableOrdering(order, dir, view)
{
var form = document.getElementById("adminForm");
form.filter_order.value = order;
form.filter_order_Dir.value = dir;
form.submit(view);
}
</script>
<?php if ($this->settings->get('global_show_filter',1) || $this->settings->get('global_display',1)) : ?>
<div id="jem_filter" class="floattext">
<?php if ($this->settings->get('global_show_filter',1)) : ?>
<div class="jem_fleft">
<?php
echo '<label for="filter">'.JText::_('COM_JEM_FILTER').'</label>&nbsp;';
echo $this->lists['filter'].'&nbsp;';
?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search'];?>" class="inputbox" onchange="document.adminForm.submit();" />
<button class="buttonfilter" type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button class="buttonfilter" type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
</div>
<?php endif; ?>
<?php if ($this->settings->get('global_display',1)) : ?>
<div class="jem_fright">
<?php
echo '<label for="limit">'.JText::_('COM_JEM_DISPLAY_NUM').'</label>&nbsp;';
echo $this->pagination->getLimitBox();
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="table-responsive">
<table class="eventtable" style="width:<?php echo $this->jemsettings->tablewidth; ?>;" summary="jem">
<colgroup>
<?php if ($this->jemsettings->showeventimage == 1) : ?>
<col width="<?php echo $this->jemsettings->tableeventimagewidth; ?>" class="jem_col_event_image" />
<?php endif; ?>
<col width="<?php echo $this->jemsettings->datewidth; ?>" class="jem_col_date" />
<?php if ($this->jemsettings->showtitle == 1) : ?>
<col width="<?php echo $this->jemsettings->titlewidth; ?>" class="jem_col_title" />
<?php endif; ?>
<?php if ($this->jemsettings->showlocate == 1) : ?>
<col width="<?php echo $this->jemsettings->locationwidth; ?>" class="jem_col_venue" />
<?php endif; ?>
<?php if ($this->jemsettings->showcity == 1) : ?>
<col width="<?php echo $this->jemsettings->citywidth; ?>" class="jem_col_city" />
<?php endif; ?>
<?php if ($this->jemsettings->showstate == 1) : ?>
<col width="<?php echo $this->jemsettings->statewidth; ?>" class="jem_col_state" />
<?php endif; ?>
<?php if ($this->jemsettings->showcat == 1) : ?>
<col width="<?php echo $this->jemsettings->catfrowidth; ?>" class="jem_col_category" />
<?php endif; ?>
<?php if ($this->jemsettings->showatte == 1) : ?>
<col width="<?php echo $this->jemsettings->attewidth; ?>" class="jem_col_attendees" />
<?php endif; ?>
</colgroup>
<thead>
<tr>
<?php if ($this->jemsettings->showeventimage == 1) : ?>
<th id="jem_eventimage" class="sectiontableheader" align="left"><?php echo JText::_('COM_JEM_TABLE_EVENTIMAGE'); ?></th>
<?php endif; ?>
<th id="jem_date" class="sectiontableheader" align="left"><?php echo JHtml::_('grid.sort', 'COM_JEM_TABLE_DATE', 'a.dates', $this->lists['order_Dir'], $this->lists['order']); ?></th>
<?php if ($this->jemsettings->showtitle == 1) : ?>
<th id="jem_title" class="sectiontableheader" align="left"><?php echo JHtml::_('grid.sort', 'COM_JEM_TABLE_TITLE', 'a.title', $this->lists['order_Dir'], $this->lists['order']); ?></th>
<?php endif; ?>
<?php if ($this->jemsettings->showlocate == 1) : ?>
<th id="jem_location" class="sectiontableheader" align="left"><?php echo JHtml::_('grid.sort', 'COM_JEM_TABLE_LOCATION', 'l.venue', $this->lists['order_Dir'], $this->lists['order']); ?></th>
<?php endif; ?>
<?php if ($this->jemsettings->showcity == 1) : ?>
<th id="jem_city" class="sectiontableheader" align="left"><?php echo JHtml::_('grid.sort', 'COM_JEM_TABLE_CITY', 'l.city', $this->lists['order_Dir'], $this->lists['order']); ?></th>
<?php endif; ?>
<?php if ($this->jemsettings->showstate == 1) : ?>
<th id="jem_state" class="sectiontableheader" align="left"><?php echo JHtml::_('grid.sort', 'COM_JEM_TABLE_STATE', 'l.state', $this->lists['order_Dir'], $this->lists['order']); ?></th>
<?php endif; ?>
<?php if ($this->jemsettings->showcat == 1) : ?>
<th id="jem_category" class="sectiontableheader" align="left"><?php echo JHtml::_('grid.sort', 'COM_JEM_TABLE_CATEGORY', 'c.catname', $this->lists['order_Dir'], $this->lists['order']); ?></th>
<?php endif; ?>
<?php if ($this->jemsettings->showatte == 1) : ?>
<th id="jem_attendees" class="sectiontableheader" align="center"><?php echo JText::_('COM_JEM_TABLE_ATTENDEES'); ?></th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<?php if ($this->noevents == 1) : ?>
<tr align="center"><td colspan="20"><?php echo JText::_('COM_JEM_NO_EVENTS'); ?></td></tr>
<?php else : ?>
<?php $this->rows = $this->getRows(); ?>
<?php foreach ($this->rows as $row) : ?>
<?php if (!empty($row->featured)) : ?>
<tr class="featured featured<?php echo $row->id.$this->params->get('pageclass_sfx'); ?>" itemprop="event" itemscope="itemscope" itemtype="https://schema.org/Event" >
<?php else : ?>
<tr class="sectiontableentry<?php echo ($row->odd +1) . $this->params->get('pageclass_sfx'); ?>" itemprop="event" itemscope="itemscope" itemtype="https://schema.org/Event" >
<?php endif; ?>
<?php if ($this->jemsettings->showeventimage == 1) : ?>
<td headers="jem_eventimage" align="left" valign="top">
<?php
if (!empty($row->datimage)) :
$dimage = JemImage::flyercreator($row->datimage, 'event');
echo JemOutput::flyer($row, $dimage, 'event');
endif;
?>
</td>
<?php endif; ?>
<td headers="jem_date" align="left">
<?php
echo JemOutput::formatShortDateTime($row->dates, $row->times,
$row->enddates, $row->endtimes, $this->jemsettings->showtime);
echo JemOutput::formatSchemaOrgDateTime($row->dates, $row->times,
$row->enddates, $row->endtimes);
?>
</td>
<?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 1)) : ?>
<td headers="jem_title" align="left" valign="top">
<a href="<?php echo JRoute::_(JemHelperRoute::getEventRoute($row->slug)); ?>" itemprop="url">
<span itemprop="name"><?php echo $this->escape($row->title) . JemOutput::recurrenceicon($row); ?></span>
</a><?php echo JemOutput::publishstateicon($row); ?>
</td>
<?php endif; ?>
<?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 0)) : ?>
<td headers="jem_title" align="left" valign="top" itemprop="name">
<?php echo $this->escape($row->title) . JemOutput::recurrenceicon($row) . JemOutput::publishstateicon($row); ?>
</td>
<?php endif; ?>
<?php if ($this->jemsettings->showlocate == 1) : ?>
<td headers="jem_location" align="left" valign="top">
<?php
if ($this->jemsettings->showlinkvenue == 1) :
echo !empty($row->locid) ? "<a href='".JRoute::_(JemHelperRoute::getVenueRoute($row->venueslug))."'>".$this->escape($row->venue)."</a>" : '-';
else :
echo !empty($row->locid) ? $this->escape($row->venue) : '-';
endif;
?>
</td>
<?php endif; ?>
<?php if ($this->jemsettings->showcity == 1) : ?>
<td headers="jem_city" align="left" valign="top">
<?php echo !empty($row->city) ? $this->escape($row->city) : '-'; ?>
</td>
<?php endif; ?>
<?php if ($this->jemsettings->showstate == 1) : ?>
<td headers="jem_state" align="left" valign="top">
<?php echo !empty($row->state) ? $this->escape($row->state) : '-'; ?>
</td>
<?php endif; ?>
<?php if ($this->jemsettings->showcat == 1) : ?>
<td headers="jem_category" align="left" valign="top">
<?php echo implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist)); ?>
</td>
<?php endif; ?>
<?php if ($this->jemsettings->showatte == 1) : ?>
<td headers="jem_attendees" align="left" valign="top">
<?php echo !empty($row->regCount) ? $this->escape($row->regCount) : '-'; ?>
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table></div>

View File

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

View File

@ -0,0 +1,426 @@
<?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\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
?>
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
<div class="buttons">
<?php
$btn_params = array('print_link' => $this->print_link, 'task' => $this->task, 'ical_link' => $this->ical_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; ?>
<?php if ($this->params->get('showintrotext')) : ?>
<div class="description no_space floattext">
<?php echo $this->params->get('introtext'); ?>
</div>
<p> </p>
<?php endif; ?>
<?php
$countcatevents = array ();
$countperday = array();
$limit = $this->params->get('daylimit', 10);
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
$showtime = $this->settings->get('global_show_timedetails', 1);
foreach ($this->rows as $row) :
if (!JemHelper::isValidDate($row->dates)) {
continue; // skip, open date !
}
//get event date
$year = date('Y', strtotime($row->dates));
$month = date('m', strtotime($row->dates));
$day = date('d', strtotime($row->dates));
@$countperday[$year.$month.$day]++;
if ($countperday[$year.$month.$day] == $limit+1) {
$var1a = Route::_('index.php?option=com_jem&view=day&id='.$year.$month.$day.(!empty($this->locid)?('&locid='.$this->locid):''));
$var1b = Text::_('COM_JEM_AND_MORE');
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
$id = 'eventandmore';
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
continue;
} elseif ($countperday[$year.$month.$day] > $limit+1) {
continue;
}
//for time in tooltip
$timehtml = '';
if ($showtime) {
$start = JemOutput::formattime($row->times);
$end = JemOutput::formattime($row->endtimes);
if ($start != '') {
$timehtml = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_TIME_SHORT').': </span>';
$timehtml .= $start;
if ($end != '') {
$timehtml .= ' - '.$end;
}
$timehtml .= '</div>';
}
}
$eventname = '<div class="eventName">'.Text::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
$eventid = $this->escape($row->id);
//initialize variables
$multicatname = '';
$colorpic = '';
$nr = is_array($row->categories) ? count($row->categories) : 0;
$ix = 0;
$content = '';
$contentend = '';
$catcolor = array();
//walk through categories assigned to an event
foreach((array)$row->categories AS $category) {
//Currently only one id possible...so simply just pick one up...
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
//wrap a div for each category around the event for show hide toggler
$content .= '<div id="catz" class="cat'.$category->id.'">';
$contentend .= '</div>';
//attach category color if any in front of the catname
if ($category->color) {
$multicatname .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span>&nbsp;'.$category->catname;
} else {
$multicatname .= $category->catname;
}
$ix++;
if ($ix != $nr) {
$multicatname .= ', ';
}
//attach category color if any in front of the event title in the calendar overview
if (isset($category->color) && $category->color) {
$colorpic .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span>';
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
}
//count occurence of the category
if (!isset($row->multi) || ($row->multi == 'first')) {
if (!array_key_exists($category->id, $countcatevents)) {
$countcatevents[$category->id] = 1;
} else {
$countcatevents[$category->id]++;
}
}
}
$color = '<div id="eventcontenttop" class="eventcontenttop">';
$color .= $colorpic;
$color .= '</div>';
// multiday
$multi_mode = 0; // single day
$multi_icon = '';
if (isset($row->multi)) {
switch ($row->multi) {
case 'first': // first day
$multi_mode = 1;
$multi_icon = HTMLHelper::_("image","com_jem/arrow-left.png",'', NULL, true);
break;
case 'middle': // middle day
$multi_mode = 2;
$multi_icon = HTMLHelper::_("image","com_jem/arrow-middle.png",'', NULL, true);
break;
case 'zlast': // last day
$multi_mode = 3;
$multi_icon = HTMLHelper::_("image","com_jem/arrow-right.png",'', NULL, true);
break;
}
}
//for time in calendar
$timetp = '';
if ($showtime) {
$start = JemOutput::formattime($row->times,'',false);
$end = JemOutput::formattime($row->endtimes,'',false);
switch ($multi_mode) {
case 1:
$timetp .= $multi_icon . ' ' . $start . '<br />';
break;
case 2:
$timetp .= $multi_icon . '<br />';
break;
case 3:
$timetp .= $multi_icon . ' ' . $end . '<br />';
break;
default:
if ($start != '') {
$timetp .= $start;
if ($end != '') {
$timetp .= ' - '.$end;
}
$timetp .= '<br />';
}
break;
}
} else {
if (!empty($multi_icon)) {
$timetp .= $multi_icon . ' ';
}
}
$catname = '<div class="catname">'.$multicatname.'</div>';
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
if (!empty($row->multienddate)) {
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
} else if ($row->enddates && $row->dates < $row->enddates) {
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
}
//venue
if ($this->jemsettings->showlocate == 1) {
$venue = '<div class="location"><span class="text-label">'.Text::_('COM_JEM_VENUE_SHORT').': </span>';
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
$venue .= '</div>';
} else {
$venue = '';
}
// state if unpublished
$statusicon = '';
if (isset($row->published) && ($row->published != 1)) {
$statusicon = JemOutput::publishstateicon($row);
$eventstate = '<div class="eventstate"><span class="text-label">'.Text::_('JSTATUS').': </span>';
switch ($row->published) {
case 1: $eventstate .= Text::_('JPUBLISHED'); break;
case 0: $eventstate .= Text::_('JUNPUBLISHED'); break;
case 2: $eventstate .= Text::_('JARCHIVED'); break;
case -2: $eventstate .= Text::_('JTRASHED'); break;
}
$eventstate .= '</div>';
} else {
$eventstate = '';
}
//date in tooltip
$multidaydate = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_DATE').': </span>';
switch ($multi_mode) {
case 1: // first day
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
break;
case 2: // middle day
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
break;
case 3: // last day
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
break;
default: // single day
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
break;
}
$multidaydate .= '</div>';
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
$editicon = '';
if (!$this->print) {
$btns = array();
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
}
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
}
if (!empty($btns)) {
$editicon .= '<div class="inline-button-right">';
$editicon .= join(' ', $btns);
$editicon .= '</div>';
}
}
//get border for featured event
$usefeaturedborder = $this->params->get('usefeaturedborder', 0);
$featuredbordercolor = $this->params->get('featuredbordercolor', 0);
$featuredclass = '';
$featuredstyle ='';
if($usefeaturedborder && $row->featured){
$featuredclass="borderfeatured";
$featuredstyle="border-color:" . $featuredbordercolor;
}
//generate the output
// if we have exact one color from categories we can use this as background color of event
$content .= '<div class="eventcontentinner event_id' . $eventid . ' cat_id' . $category->id . ' ' . $featuredclass . '" style="' . $featuredstyle;
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
$content .= '; background-color:'.array_pop($catcolor);
$content .= '" onclick="location.href=\''.$detaillink.'\'">';
} else {
$content .= '" onclick="location.href=\''.$detaillink.'\'">' . $colorpic;
}
$content .= $editicon;
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
$content .= $contentend . '</div>';
$this->cal->setEventContent($year, $month, $day, $content);
endforeach;
// enable little icon right beside day number to allow event creation
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
$html = JemOutput::prepareAddEventButton('locid='.$this->locid);
$this->cal->enableNewEventLinks($html);
}
$displayLegend = (int)$this->params->get('displayLegend', 1);
if ($displayLegend == 2) : ?>
<!-- Calendar legend above -->
<div id="jlcalendarlegend">
<!-- Calendar buttons -->
<div class="calendarButtons jem-row jem-justify-start">
<button id="buttonshowall" class="calendarButton btn btn-outline-dark">
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
</button>
<button id="buttonhideall" class="calendarButton btn btn-outline-dark">
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
</button>
</div>
<div class="clr"></div>
<!-- Calendar Legend -->
<div class="calendarLegends jem-row jem-justify-start"">
<?php
if ($this->params->get('displayLegend')) {
##############
## FOR EACH ##
##############
$counter = array();
# walk through events
foreach ($this->rows as $row) {
foreach ($row->categories as $cat) {
# sort out dupes for the counter (catid-legend)
if (!in_array($cat->id, $counter)) {
# add cat id to cat counter
$counter[] = $cat->id;
# build legend
if (array_key_exists($cat->id, $countcatevents)) {
?>
<button class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
<?php
if (isset($cat->color) && $cat->color) {
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
}
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
?>
</button>
<?php
}
}
}
}
}
?>
</div>
</div>
<?php endif; ?>
<?php
// print the calendar
echo $this->cal->showMonth();
?>
<?php if (($displayLegend == 1) || ($displayLegend == 0)) : ?>
<!-- Calendar legend below -->
<div id="jlcalendarlegend">
<!-- Calendar buttons -->
<div class="calendarButtons jem-row jem-justify-start">
<div class="calendarButtonsToggle">
<button id="buttonshowall" class="calendarButton btn btn-outline-dark">
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
</button>
<button id="buttonhideall" class="calendarButton btn btn-outline-dark">
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
</button>
</div>
</div>
<div class="clr"></div>
<!-- Calendar Legend -->
<div class="calendarLegends jem-row jem-justify-start">
<?php
if ($displayLegend == 1) {
##############
## FOR EACH ##
##############
$counter = array();
# walk through events
foreach ($this->rows as $row) {
foreach ($row->categories as $cat) {
# sort out dupes for the counter (catid-legend)
if (!in_array($cat->id, $counter)) {
# add cat id to cat counter
$counter[] = $cat->id;
# build legend
if (array_key_exists($cat->id, $countcatevents)) {
?>
<button class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
<?php
if (isset($cat->color) && $cat->color) {
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
}
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
?>
</button>
<?php
}
}
}
}
}
?>
</div>
</div>
<?php endif; ?>
<div class="clr"></div>
<div class="copyright">
<?php echo JemOutput::footer(); ?>
</div>
</div>

View File

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_JEM_VENUE_CALENDAR_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_JEM_VENUE_CALENDAR_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="request">
<fieldset name="request"
addfieldpath="/administrator/components/com_jem/models/fields"
>
<field name="id" type="modal_venue"
label="COM_JEM_SELECTVENUE"
description="COM_JEM_SELECTVENUE_DESC"
required="true"
/>
</fieldset>
</fields>
<fields name="params">
<fieldset name="basic"
addfieldpath="/administrator/components/com_jem/models/fields"
>
<field name="introtext" type="textarea"
filter="safehtml"
default=""
rows="8"
cols="30"
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">COM_JEM_SHOW</option>
<option value="0">COM_JEM_HIDE</option>
</field>
<field type="spacer" name="myspacer2" hr="true" />
<field name="displayLegend" type="list"
default="1"
label="COM_JEM_DISPLAY_LEGEND"
description="COM_JEM_DISPLAY_LEGEND_DESC"
>
<option value="0">JNO</option>
<option value="2">COM_JEM_ABOVE</option>
<option value="1">COM_JEM_BELOW</option>
</field>
<field name="show_only_start" type="radio"
default="0"
label="COM_JEM_SHOWONLYSTARTDAY"
description="COM_JEM_SHOWONLYSTARTDAY_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="firstweekday" type="list"
default="1"
label="COM_JEM_SELECTFIRSTWEEKDAY"
description="COM_JEM_SELECTFIRSTWEEKDAYDESC"
>
<option value="0">COM_JEM_SUNDAY</option>
<option value="1">COM_JEM_MONDAY</option>
</field>
<field name="daylimit" type="text"
default="10"
label="COM_JEM_MAX_EVENTS_PER_DAY"
description="COM_JEM_MAX_EVENTS_PER_DAY_DESC"
/>
<field name="show_addevent_icon" type="radio"
default="0"
label="COM_JEM_SHOWADDEVENTICON"
description="COM_JEM_SHOWADDEVENTICON_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="show_editevent_icon" type="radio"
default="0"
label="COM_JEM_SHOWEDITEVENTICON"
description="COM_JEM_SHOWEDITEVENTICON_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="show_copyevent_icon" type="radio"
default="0"
label="COM_JEM_SHOWCOPYEVENTICON"
description="COM_JEM_SHOWCOPYEVENTICON_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field type="spacer" name="myspacer3" hr="true" />
<field name="eventlinkcolor" type="color"
default="#000000"
label="COM_JEM_CALENDAR_EVENTLINKCOLOR"
description="COM_JEM_CALENDAR_EVENTLINKCOLOR_DESC"
/>
<field name="eventbackgroundcolor" type="color"
default="#c8deb1"
label="COM_JEM_CALENDAR_EVENTBACKGROUNDCOLOR"
description="COM_JEM_CALENDAR_EVENTBACKGROUNDCOLOR_DESC"
/>
<field name="eventbg_usecatcolor" type="radio"
default="0"
label="COM_JEM_CALENDAR_USECATCOLOR"
description="COM_JEM_CALENDAR_USECATCOLOR_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="currentdaycolor" type="color"
default="#344280"
label="COM_JEM_CALENDAR_CURRENTDAYCOLOR"
description="COM_JEM_CALENDAR_CURRENTDAYCOLOR_DESC"
/>
<field name="eventandmorecolor" type="color"
default="#FFFF00"
label="COM_JEM_CALENDAR_EVENTANDMORECOLOR"
description="COM_JEM_CALENDAR_EVENTANDMORECOLOR_DESC"
/>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,231 @@
<?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_venue<?php echo $this->pageclass_sfx . ' venue_id' . $this->venue->id; ?>" itemscope="itemscope" itemtype="https://schema.org/Place">
<div class="buttons">
<?php
$btn_params = array('id' => $this->venue->slug, 'slug' => $this->venue->slug, '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->escape($this->params->get('show_page_heading', 1))) : ?>
<h1 class="componentheading">
<span itemprop="name"><?php echo $this->escape($this->params->get('page_heading')); ?></span>
<?php echo JemOutput::editbutton($this->venue, $this->params, NULL, $this->permissions->canEditVenue, 'venue'); ?>
</h1>
<?php endif; ?>
<?php if ($this->escape($this->params->get('page_heading')) != $this->escape($this->venue->title)) : ?>
<?php if ($this->escape($this->params->get('show_page_heading', 1))) : ?>
<h2 class="jem-venue-title">
<?php echo $this->escape($this->venue->title);?>
</h2>
<?php else : ?>
<h1 class="jem-venue-title">
<?php echo $this->escape($this->venue->title);?>
</h1>
<?php endif; ?>
<?php endif; ?>
<!--Venue-->
<h2 class="jem">
<?php /*
echo Text::_('COM_JEM_VENUE');
echo JemOutput::editbutton($this->venue, $this->params, NULL, $this->permissions->canEditVenue, 'venue');
echo JemOutput::copybutton($this->venue, $this->params, NULL, $this->permissions->canAddVenue, 'venue');
*/?>
</h2>
<div class="jem-row">
<div class="jem-info">
<?php if ($this->settings->get('global_show_detailsadress',1)) : ?>
<dl class="jem-dl" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<dt class="title hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_TITLE'); ?>"><?php echo Text::_('COM_JEM_TITLE').':'; ?></dt>
<dd class="title">
<?php echo $this->venue->title;?>
</dd>
<?php if (($this->settings->get('global_show_detlinkvenue', 1)) && (!empty($this->venue->url))) : ?>
<dt class="venue hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_WEBSITE'); ?>"><?php echo Text::_('COM_JEM_WEBSITE'); ?>:</dt>
<dd class="venue">
<a href="<?php echo $this->venue->url; ?>" target="_blank"><?php echo $this->venue->urlclean; ?></a>
</dd>
<?php endif; ?>
<?php if ($this->venue->street) : ?>
<dt class="venue_street hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_STREET'); ?>"><?php echo Text::_('COM_JEM_STREET'); ?>:</dt>
<dd class="venue_street" itemprop="streetAddress">
<?php echo $this->escape($this->venue->street); ?>
</dd>
<?php endif; ?>
<?php if ($this->venue->postalCode) : ?>
<dt class="venue_postalCode hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_ZIP'); ?>"><?php echo Text::_('COM_JEM_ZIP'); ?>:</dt>
<dd class="venue_postalCode" itemprop="postalCode">
<?php echo $this->escape($this->venue->postalCode); ?>
</dd>
<?php endif; ?>
<?php if ($this->venue->city) : ?>
<dt class="venue_city hasTooltip" 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($this->venue->city); ?>
</dd>
<?php endif; ?>
<?php if ($this->venue->state) : ?>
<dt class="venue_state hasTooltip" 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($this->venue->state); ?>
</dd>
<?php endif; ?>
<?php if ($this->venue->country) : ?>
<dt class="venue_country hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_COUNTRY'); ?>"><?php echo Text::_('COM_JEM_COUNTRY'); ?>:</dt>
<dd class="venue_country">
<?php echo $this->venue->countryimg ? $this->venue->countryimg : $this->venue->country; ?>
<meta itemprop="addressCountry" content="<?php echo $this->venue->country; ?>" />
</dd>
<?php endif; ?>
<!-- PUBLISHING STATE -->
<?php if (isset($this->venue->published) && !empty($this->show_status)) : ?>
<dt class="published hasTooltip" data-original-title="<?php echo Text::_('JSTATUS'); ?>"><?php echo Text::_('JSTATUS'); ?>:</dt>
<dd class="published">
<?php switch ($this->venue->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
for ($cr = 1; $cr <= 10; $cr++) {
$currentRow = $this->venue->{'custom'.$cr};
if (preg_match('%^http(s)?://%', $currentRow)) {
$currentRow = '<a href="' . $this->escape($currentRow) . '" target="_blank">' . $this->escape($currentRow) . '</a>';
}
if ($currentRow) {
?>
<dt class="custom<?php echo $cr; ?> hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr); ?>"><?php echo Text::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr); ?>:</dt>
<dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd>
<?php
}
}
?>
<?php
if ($this->settings->get('global_show_mapserv') == 1 || $this->settings->get('global_show_mapserv') == 4) {
echo JemOutput::mapicon($this->venue, null, $this->settings);
}
?>
</dl>
<?php
?>
</div>
<style>
.jem-img {
flex-basis: <?php echo $this->jemsettings->imagewidth; ?>px;
}
</style>
<div class="jem-img">
<?php echo JemOutput::flyer($this->venue, $this->limage, 'venue'); ?>
</div>
</div>
<?php elseif (isset($this->venue->published) && !empty($this->show_status)) : ?>
<!-- PUBLISHING STATE -->
<dl>
<dt class="published hasTooltip" data-original-title="<?php echo Text::_('JSTATUS'); ?>"><?php echo Text::_('JSTATUS'); ?>:</dt>
<dd class="published">
<?php switch ($this->venue->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; ?>
<?php
$global_show_mapserv = $this->settings->get('global_show_mapserv');
if ($global_show_mapserv == 2 || $global_show_mapserv == 3 || $global_show_mapserv == 5) : ?>
<div class="jem-map">
<?php if ($global_show_mapserv == 2 || $global_show_mapserv == 5) : ?>
<div class="jem-map">
<?php echo JemOutput::mapicon($this->venue, null, $this->settings); ?>
</div>
<?php endif; ?>
<?php if ($global_show_mapserv == 3) : ?>
<input type="hidden" id="latitude" value="<?php echo $this->venue->latitude; ?>">
<input type="hidden" id="longitude" value="<?php echo $this->venue->longitude; ?>">
<input type="hidden" id="venue" value="<?php echo $this->venue->venue; ?>">
<input type="hidden" id="street" value="<?php echo $this->venue->street; ?>">
<input type="hidden" id="city" value="<?php echo $this->venue->city; ?>">
<input type="hidden" id="state" value="<?php echo $this->venue->state; ?>">
<input type="hidden" id="postalCode" value="<?php echo $this->venue->postalCode; ?>">
<?php echo JemOutput::mapicon($this->venue, null, $this->settings); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->settings->get('global_show_locdescription', 1) && $this->venuedescription != '' &&
$this->venuedescription != '<br />') : ?>
<h2 class="description"><?php echo Text::_('COM_JEM_VENUE_DESCRIPTION'); ?></h2>
<div class="description no_space floattext" itemprop="description">
<?php echo $this->venuedescription; ?>
</div>
<?php endif; ?>
<?php $this->attachments = $this->venue->attachments; ?>
<?php echo $this->loadTemplate('attachments'); ?>
<?php if ($this->settings->get('global_show_listevents', 1)) : ?>
<!--table-->
<h2 class="jem">
<?php echo Text::_('COM_JEM_EVENTS'); ?>
</h2>
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" id="adminForm">
<?php echo $this->loadTemplate('events_table'); ?>
<p>
<input type="hidden" name="option" value="com_jem" />
<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="view" value="venue" />
<input type="hidden" name="id" value="<?php echo $this->venue->id; ?>" />
</p>
</form>
<!--pagination-->
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<?php echo JemOutput::icalbutton($this->venue->id, 'venue'); ?>
<?php endif; ?>
<!--copyright-->
<div class="copyright">
<?php echo JemOutput::footer(); ?>
</div>
</div>
<?php echo JemOutput::lightbox(); ?>

View File

@ -0,0 +1,186 @@
<?php
/**
* @version 2.3.0
* @package JEM
* @copyright (C) 2013-2020 joomlaeventmanager.net
* @copyright (C) 2005-2009 Christoph Lukes
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*
* @todo add check if CB does exists and if so perform action
*/
defined('_JEXEC') or die;
$linkreg = 'index.php?option=com_jem&amp;view=attendees&amp;id='.$this->item->id.($this->itemid ? '&Itemid='.$this->itemid : '');
?>
<div class="register">
<dl class="jem-dl floattext">
<?php $maxplaces = (int)$this->item->maxplaces; ?>
<?php $booked = (int)$this->item->booked; ?>
<?php if ($maxplaces > 0) : ?>
<dt class="register max-places hasTooltip" data-original-title="<?php echo JText::_('COM_JEM_MAX_PLACES'); ?>"><?php echo JText::_('COM_JEM_MAX_PLACES'); ?>:</dt>
<dd class="register max-places"><?php echo $maxplaces; ?></dd>
<?php endif; ?>
<br>
<?php if (($maxplaces > 0) || ($booked > 0)) : ?>
<dt class="register booked-places hasTooltip" data-original-title="<?php echo JText::_('COM_JEM_BOOKED_PLACES'); ?>"><?php echo JText::_('COM_JEM_BOOKED_PLACES'); ?>:</dt>
<dd class="register booked-places">
<?php if (empty($this->permissions->canEditAttendees)) : ?>
<?php echo $booked; ?>
<?php else : ?>
<a href="<?php echo $linkreg; ?>" title="<?php echo JText::_('COM_JEM_MYEVENT_MANAGEATTENDEES'); ?>"><?php echo $this->item->booked; ?> <i class="fa fa-external-link" aria-hidden="true"></i></a>
<?php endif; ?>
</dd>
<?php endif; ?>
<?php if ($maxplaces > 0) : ?>
<dt class="register available-places hasTooltip" data-original-title="<?php echo JText::_('COM_JEM_AVAILABLE_PLACES'); ?>"><?php echo JText::_('COM_JEM_AVAILABLE_PLACES'); ?>:</dt>
<dd class="register available-places"><?php echo ($maxplaces - $booked); ?></dd>
<?php endif; ?>
<br>
<?php
// only set style info if users already have registered and user is allowed to see it
if ($this->registers) :
?>
<dt class="register registered-users hasTooltip" data-original-title="<?php echo JText::_('COM_JEM_REGISTERED_USERS'); ?>"><?php echo JText::_('COM_JEM_REGISTERED_USERS'); ?>:</dt>
<dd class="register registered-users">
<ul class="fa-ul jem-registered-list">
<?php
if ($this->settings->get('event_comunsolution', '0') == 1) :
if ($this->settings->get('event_comunoption', '0') == 1) :
//$cparams = JComponentHelper::getParams('com_media');
//$imgpath = $cparams->get('image_path'); // mostly 'images'
$imgpath = 'images'; // CB does NOT respect path set in Media Manager, so we have to ignore this too
if (JFile::exists(JPATH_ROOT . '/components/com_comprofiler/plugin/templates/default/images/avatar/tnnophoto_n.png')) {
$noimg = 'components/com_comprofiler/plugin/templates/default/images/avatar/tnnophoto_n.png';
} elseif (JFile::exists(JPATH_ROOT . '/components/com_comprofiler/images/english/tnnophoto.jpg')) {
$noimg = 'components/com_comprofiler/images/english/tnnophoto.jpg';
} else {
$noimg = '';
}
endif;
endif;
if(!function_exists("jem_getStatusIcon")) {
if ($this->settings->get('event_show_more_attendeedetails', '0')) {
function jem_getStatusIcon($status) {
switch($status) {
case 2: // waiting list
return ' <i class="fa fa-li fa-hourglass-half jem-attendance-status-fa-hourglass-half hasTooltip" title="'.JText::_('COM_JEM_ATTENDEES_ON_WAITINGLIST').'"></i>';
break;
case 1: // attending
return ' <i class="fa fa-li fa-check-circle jem-attendance-status-fa-check-circle hasTooltip" title="'.JText::_('COM_JEM_ATTENDEES_ATTENDING').'"></i>';
break;
case 0: // invited
return ' <i class="fa fa-li fa-question-circle jem-attendance-status-fa-question-circle hasTooltip" title="'.JText::_('COM_JEM_ATTENDEES_INVITED').'"></i>';
break;
case -1: // not attending
return ' <i class="fa fa-li fa-times-circle jem-attendance-status-fa-times-circle hasTooltip" title="'.JText::_('COM_JEM_ATTENDEES_NOT_ATTENDING').'"></i>';
break;
default:
return $status;
}
}
} else {
function jem_getStatusIcon($status) {
return ' <i class="fa fa-li fa-check-circle jem-attendance-status-fa-check-circle hasTooltip" title="'.JText::_('COM_JEM_ATTENDEES_ATTENDING').'"></i>';
}
}
}
// loop through attendees
$registers_array = array();
if ($this->settings->get('event_show_more_attendeedetails', '0')) { // Show attendees, on waitinglist, invited and not attending.
$registers_array = array_merge($this->regs['attending'], $this->regs['waiting'], $this->regs['invited'], $this->regs['not_attending']);
} else {
$registers_array = $this->registers;
}
foreach ($registers_array as $register) :
echo '<li class="jem-registered-user">' . jem_getStatusIcon($register->status);
$text = '';
// is a plugin catching this ?
if ($res = $this->dispatcher->trigger('onAttendeeDisplay', array($register->uid, &$text))) :
echo $text;
endif;
// if CB
if ($this->settings->get('event_comunsolution', '0') == 1) :
if ($this->settings->get('event_comunoption', '0') == 1) :
// User has avatar
if (!empty($register->avatar)) :
if (JFile::exists(JPATH_ROOT . '/' . $imgpath . '/comprofiler/tn' . $register->avatar)) {
$useravatar = JHtml::image($imgpath . '/comprofiler/tn' . $register->avatar, $register->name);
} elseif (JFile::exists(JPATH_ROOT . '/' . $imgpath . '/comprofiler/' . $register->avatar)) {
$useravatar = JHtml::image($imgpath . '/comprofiler/' . $register->avatar, $register->name);
} else {
$useravatar = empty($noimg) ? '' : JHtml::image($noimg, $register->name);
}
echo '<a href="' . JRoute::_('index.php?option=com_comprofiler&task=userProfile&user=' . $register->uid) . '" title = "' . JText::_('COM_JEM_SHOW_USER_PROFILE') . '">' . $useravatar . ' <span class="username">' . $register->name . '</span></a>';
// User has no avatar
else :
$nouseravatar = empty($noimg) ? '' : JHtml::image($noimg, $register->name);
echo '<a href="' . JRoute::_('index.php?option=com_comprofiler&task=userProfile&user=' . $register->uid) . '" title = "' . JText::_('COM_JEM_SHOW_USER_PROFILE') .'">' . $nouseravatar . ' <span class="username">' . $register->name . '</span></a>';
endif;
else :
// only show the username with link to profile
echo '<span class="username"><a href="' . JRoute::_('index.php?option=com_comprofiler&amp;task=userProfile&amp;user=' . $register->uid) . '">' . $register->name . '</a></span>';
endif;
// if CB end - if not CB than only name
else :
// no communitycomponent is set so only show the username
echo '<span class="username">' . $register->name . '</span>';
endif;
echo '</li>';
// end loop through attendees
endforeach;
?>
</ul>
</dd>
<?php endif; ?>
</dl>
<?php if ($this->print == 0) : ?>
<dl class="jem-dl floattext">
<dt class="register registration hasTooltip" data-original-title="<?php echo JText::_('COM_JEM_YOUR_REGISTRATION'); ?>"><?php echo JText::_('COM_JEM_YOUR_REGISTRATION'); ?>:</dt>
<dd class="register registration">
<?php
if ($this->item->published != 1) {
echo JText::_('COM_JEM_WRONG_STATE_FOR_REGISTER');
} elseif (!$this->showRegForm) {
echo JText::_('COM_JEM_NOT_ALLOWED_TO_REGISTER');
} else {
switch ($this->formhandler) {
case 0:
echo JText::_('COM_JEM_TOO_LATE_UNREGISTER');
break;
case 1:
echo JText::_('COM_JEM_TOO_LATE_REGISTER');
break;
case 2:
// insert Breezing Form hack here
//echo JText::_('COM_JEM_LOGIN_FOR_REGISTER'); ?>
<input class="btn btn-primary btn-sm" type="button" value="<?php echo JText::_('COM_JEM_LOGIN_FOR_REGISTER'); ?>" onClick="window.location='/index.php?option=com_comprofiler&view=login&Itemid=4812';"/>
<br /><br />
<input class="btn btn-success btn-sm" type="button" value="<?php echo JText::_('COM_JEM_SIGNUPHERE_AS_GUEST'); ?>" onClick="window.location='/index.php?option=com_breezingforms&view=form&Itemid=3475&event=<?php echo $this->item->title; ?>&date=<?php echo $this->item->dates ?>&conemail=<?php echo $this->item->conemail ?>';"/>
<?php
break;
case 3:
case 4:
echo $this->loadTemplate('regform');
break;
}
}
?>
</dd>
</dl>
<?php endif; ?>
</div>

View File

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

View File

@ -0,0 +1,90 @@
<?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\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Router\Route;
/**
* Venue-Feed
*/
class JemViewVenue extends HtmlView
{
/**
* Creates the Event Feed of the Venue
*/
public function display($tpl = null)
{
$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');
$venue = $this->get('Venue');
// check for data error or missed access level
if (empty($venue) || empty($venue->locauthorised)) {
return;
}
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;
}
// 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,373 @@
<?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;
/**
* Venue-View
*/
class JemViewVenue extends JemView
{
public function __construct($config = array())
{
parent::__construct($config);
// additional path for common templates + corresponding override path
$this->addCommonTemplatePath();
}
/**
* Creates the Venue View
*/
public function display($tpl = null)
{
if ($this->getLayout() == 'calendar')
{
### Venue Calendar view ###
// initialize variables
$app = Factory::getApplication();
$document = $app->getDocument();
$menu = $app->getMenu();
$menuitem = $menu->getActive();
$jemsettings = JemHelper::config();
$settings = JemHelper::globalattribs();
$params = $app->getParams();
$uri = Uri::getInstance();
$pathway = $app->getPathWay();
$jinput = $app->input;
$print = $jinput->getBool('print', false);
$user = JemFactory::getUser();
$url = Uri::root();
$task = $jinput->getCmd('task', '');
$idVenue = $jinput->getCmd('id', '');
// Load css
JemHelper::loadCss('jem');
JemHelper::loadCss('calendar');
JemHelper::loadCustomCss();
JemHelper::loadCustomTag();
if ($print) {
JemHelper::loadCss('print');
$document->setMetaData('robots', 'noindex, nofollow');
}
$venue = $this->get('Venue');
// check for data error
if (empty($venue)) {
$app->enqueueMessage(Text::_('COM_JEM_VENUE_ERROR_VENUE_NOT_FOUND'), 'error');
return false;
}
$evlinkcolor = $params->get('eventlinkcolor');
$evbackgroundcolor = $params->get('eventbackgroundcolor');
$currentdaycolor = $params->get('currentdaycolor');
$eventandmorecolor = $params->get('eventandmorecolor');
$style = '
div#jem .eventcontentinner a, div#jem .eventandmore a {color:' . $evlinkcolor . ';}
.eventcontentinner {background-color:'.$evbackgroundcolor .';}
.eventandmore {background-color:' . $eventandmorecolor . ';}
.today .daynum {background-color:' . $currentdaycolor . ';}';
$document->addStyleDeclaration ($style);
// add javascript (using full path - see issue #590)
$document->addScript($url.'media/com_jem/js/calendar.js');
// Retrieve year/month variables
$year = $jinput->get('yearID', date("Y"),'int');
$month = $jinput->get('monthID', date("m"),'int');
// get data from model and set the month
$model = $this->getModel('VenueCal');
$model->setDate(mktime(0, 0, 1, $month, 1, $year));
$rows = $this->get('Items','VenueCal');
// Set Page title
$pagetitle = $params->def('page_title', $menuitem->title);
$params->def('page_heading', $params->get('page_title'));
$pageclass_sfx = $params->get('pageclass_sfx');
// 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'));
}
$document->setTitle($pagetitle);
$document->setMetaData('title', $pagetitle);
// create the pathway
if ($task == 'archive') {
$print_link = Route::_(JemHelperRoute::getVenueRoute($venue->slug).'&task=archive&print=1&tmpl=component');
$archive_link = Route::_('index.php?option=com_jem&view=venue&layout=calendar&id=' . $idVenue);
} else {
$print_link = Route::_(JemHelperRoute::getVenueRoute($venue->slug).'&print=1&tmpl=component');
$archive_link = $uri->toString() . (str_contains($uri->toString() ?? '','?')?'&':'?') . 'id=' . $venue->id;
}
// Check if the user has permission to add things
$permissions = new stdClass();
$permissions->canAddEvent = $user->can('add', 'event');
$permissions->canAddVenue = $user->can('add', 'venue');
$itemid = $jinput->getInt('Itemid', 0);
$venueID = $jinput->getInt('id', $params->get('id'));
$partItemid = ($itemid > 0) ? '&Itemid=' . $itemid : '';
$partVenid = ($venueID > 0) ? '&id=' . $venueID : '';
$partLocid = ($venueID > 0) ? '&locid=' . $venueID : '';
$partDate = ($year ? ('&yearID=' . $year) : '') . ($month ? ('&monthID=' . $month) : '');
$url_base = 'index.php?option=com_jem&view=venue&layout=calendar' . $partVenid . $partItemid;
$print_link = Route::_($url_base . $partDate . '&print=1&tmpl=component');
// init calendar
$cal = new JemCalendar($year, $month, 0);
$cal->enableMonthNav($url_base . ($print ? '&print=1&tmpl=component' : ''));
$cal->setFirstWeekDay($params->get('firstweekday',1));
$cal->enableDayLinks('index.php?option=com_jem&view=day'.$partLocid);
// map variables
$this->rows = $rows;
$this->locid = $venueID;
$this->params = $params;
$this->jemsettings = $jemsettings;
$this->settings = $settings;
$this->permissions = $permissions;
$this->cal = $cal;
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
$this->print_link = $print_link;
$this->archive_link = $archive_link;
$this->print = $print;
$this->ical_link = $partDate;
$this->task = $task;
}
else
{
### Venue List view ###
// initialize variables
$app = Factory::getApplication();
$document = $app->getDocument();
$menu = $app->getMenu();
$menuitem = $menu->getActive();
$jemsettings = JemHelper::config();
$settings = JemHelper::globalattribs();
$params = $app->getParams('com_jem');
$pathway = $app->getPathWay ();
$uri = Uri::getInstance();
$jinput = $app->input;
$task = $jinput->getCmd('task', '');
$print = $jinput->getBool('print', false);
$user = JemFactory::getUser();
$itemid = $app->input->getInt('id', 0) . ':' . $app->input->getInt('Itemid', 0);
// Load css
JemHelper::loadCss('jem');
JemHelper::loadCustomCss();
JemHelper::loadCustomTag();
if ($print) {
JemHelper::loadCss('print');
$document->setMetaData('robots', 'noindex, nofollow');
}
// get data from model
$rows = $this->get('Items');
$venue = $this->get('Venue');
// check for data error
if (empty($venue)) {
$app->enqueueMessage(Text::_('COM_JEM_VENUE_ERROR_VENUE_NOT_FOUND'), 'error');
return false;
}
// are events available?
$noevents = (!$rows) ? 1 : 0;
// Decide which parameters should take priority
$useMenuItemParams = ($menuitem && $menuitem->query['option'] == 'com_jem'
&& $menuitem->query['view'] == 'venue'
&& (!isset($menuitem->query['layout']) || $menuitem->query['layout'] == 'default')
&& $menuitem->query['id'] == $venue->id);
// get search & user-state variables
$filter_order = $app->getUserStateFromRequest('com_jem.venue.'.$itemid.'.filter_order', 'filter_order', 'a.dates', 'cmd');
$filter_order_DirDefault = 'ASC';
// Reverse default order for dates in archive mode
if($task == 'archive' && $filter_order == 'a.dates') {
$filter_order_DirDefault = 'DESC';
}
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.venue.'.$itemid.'.filter_order_Dir', 'filter_order_Dir', $filter_order_DirDefault, 'word');
$filter_type = $app->getUserStateFromRequest('com_jem.venue.'.$itemid.'.filter_type', 'filter_type', 0, 'int');
$search = $app->getUserStateFromRequest('com_jem.venue.'.$itemid.'.filter_search', 'filter_search', '', 'string');
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// Get image
$limage = JemImage::flyercreator($venue->locimage,'venue');
// Add feed links
$link = '&format=feed&id='.$venue->id.'&limitstart=';
$attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
$this->document->addHeadLink(Route::_($link . '&type=rss'), 'alternate', 'rel', $attribs);
$attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0');
$this->document->addHeadLink(Route::_($link . '&type=atom'), 'alternate', 'rel', $attribs);
// pathway, page title, page heading
if ($useMenuItemParams) {
$pagetitle = $params->get('page_title', $menuitem->title ? $menuitem->title : $venue->venue);
$pageheading = $params->get('page_heading', $pagetitle);
$pathwayKeys = array_keys($pathway->getPathway());
$lastPathwayEntryIndex = end($pathwayKeys);
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
//$pathway->setItemName(1, $menuitem->title);
} else {
$pagetitle = $venue->venue;
$pageheading = $pagetitle;
$params->set('show_page_heading', 1); // ensure page heading is shown
$pathway->addItem($pagetitle, Route::_(JemHelperRoute::getVenueRoute($venue->slug)));
}
$pageclass_sfx = $params->get('pageclass_sfx');
// create the pathway
if ($task == 'archive') {
$pathway->addItem (Text::_('COM_JEM_ARCHIVE'), Route::_(JemHelperRoute::getVenueRoute($venue->slug).'&task=archive'));
$print_link = Route::_(JemHelperRoute::getVenueRoute($venue->slug).'&task=archive&print=1&tmpl=component');
$pagetitle .= ' - ' . Text::_('COM_JEM_ARCHIVE');
$pageheading .= ' - ' . Text::_('COM_JEM_ARCHIVE');
$archive_link = Route::_('index.php?option=com_jem&view=venue-calendar');
} else {
//$pathway->addItem($venue->venue, Route::_(JemHelperRoute::getVenueRoute($venue->slug)));
$print_link = Route::_(JemHelperRoute::getVenueRoute($venue->slug).'&print=1&tmpl=component');
$archive_link = Route::_('index.php?option=com_jem&view=venue-calendar');
}
$params->set('page_heading', $pageheading);
// 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 & Meta data
$document->setTitle($pagetitle);
$document->setMetaData('title', $pagetitle);
$document->setMetadata('keywords', $venue->meta_keywords);
$document->setDescription(strip_tags($venue->meta_description));
// Check if the user has permission to add things
$permissions = new stdClass();
$permissions->canAddEvent = $user->can('add', 'event');
$permissions->canAddVenue = $user->can('add', 'venue');
// Check if the user has permission to edit-this venue
$permissions->canEditVenue = $user->can('edit', 'venue', $venue->id, $venue->created_by);
$permissions->canEditPublishVenue = $user->can(array('edit', 'publish'), 'venue', $venue->id, $venue->created_by);
// Generate Venuedescription
if (!$venue->locdescription == '' || !$venue->locdescription == '<br />') {
// execute plugins
$venue->text = $venue->locdescription;
$venue->title = $venue->venue;
PluginHelper::importPlugin ('content');
$app->triggerEvent ('onContentPrepare', array ('com_jem.venue', &$venue, &$params, 0));
$venuedescription = $venue->text;
}
// build the url
if (!empty($venue->url) && !preg_match('%^http(s)?://%', $venue->url)) {
$venue->url = 'https://' . $venue->url;
}
// prepare the url for output
if (\Joomla\String\StringHelper::strlen($venue->url) > 35) {
$venue->urlclean = $this->escape(\Joomla\String\StringHelper::substr($venue->url, 0, 35)) . '...';
} else {
$venue->urlclean = $this->escape($venue->url);
}
// create flag
if ($venue->country) {
$venue->countryimg = JemHelperCountries::getCountryFlag($venue->country);
}
// Create the pagination object
$pagination = $this->get('Pagination');
// filters
$filters = array ();
// ALL events have the same venue - so hide this from filter and list
$jemsettings->showlocate = 0;
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'=>'inputbox'), 'value', 'text', $filter_type);
$lists['search'] = $search;
// don't show venue-related columns on Venue view
$lists['hide'] = array('venue' => 1);
// mapping variables
$this->lists = $lists;
$this->action = $uri->toString();
$this->rows = $rows;
$this->noevents = $noevents;
$this->venue = $venue;
$this->print_link = $print_link;
$this->archive_link = $archive_link;
$this->print = $print;
$this->params = $params;
$this->limage = $limage;
$this->venuedescription = $venuedescription;
$this->pagination = $pagination;
$this->jemsettings = $jemsettings;
$this->settings = $settings;
$this->permissions = $permissions;
$this->show_status = $permissions->canEditPublishVenue;
$this->item = $menuitem;
$this->pagetitle = $pagetitle;
$this->task = $task;
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
}
parent::display($tpl);
}
}
?>

View File

@ -0,0 +1,56 @@
<?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;
use Joomla\CMS\Factory;
/**
* Raw: Venue
*/
class JemViewVenue extends HtmlView
{
/**
* Creates the output for the Venue view
*/
public function display($tpl = null)
{
$settings = JemHelper::config();
$settings2 = JemHelper::globalattribs();
$app = Factory::getApplication();
$jinput = $app->input;
$year = (int)$jinput->getInt('yearID', date("Y"));
$month = (int)$jinput->getInt('monthID', date("m"));
if ($settings2->get('global_show_ical_icon','0')==1) {
// Get data from the model
$model = $this->getModel('VenueCal');
$model->setState('list.start',0);
$model->setState('list.limit',$settings->ical_max_items);
$model->setDate(mktime(0, 0, 1, $month, 1, $year));
$rows = $model->getItems();
$venueid = $jinput->getInt('id');
// initiate new CALENDAR
$vcal = JemHelper::getCalendarTool();
$vcal->setConfig("filename", "events_venue_" . $venueid . "_" . $year . $month . "ics");
if (!empty($rows)) {
foreach ($rows as $row) {
JemHelper::icalAddEvent($vcal, $row);
}
}
// generate and redirect output to user browser
$vcal->returnCalendar();
}
}
}