Forum
Events not showing up properly
I'm using the events app for managing the events on band website. Unfortunately the events are not showing up in the correct chronical order:
In the "index.php" file the events are embedded by this:
<?php perch_events_custom(array(
'filter' => 'eventDateTIme',
'match' => 'gte',
'value' => date('Y-m-d'),
'template' => 'events/event.html'
)); ?>
and the template "event.html" looks like this:
<div class="medium-6 columns events">
<article class="event" data-equalizer-watch>
<div class="event-date">
<p class="event-tag"><perch:events id="eventDateTime" format="%A" /></p>
<p class="event-datum"><perch:events id="eventDateTime" format="%d.%m." /></p>
<p class="event-time"><perch:events id="eventDateTime" format="%H:%M" /> Uhr</p>
</div>
<div class="event-desc">
<h4 class="event-desc-header"><perch:events id="eventTitle" /></h4>
<div class="event-desc-detail"><perch:events id="eventDescHTML" type="textarea" textile="true" editor="redactor" html="true" encode="false" />
<perch:if exists="url">
<a href="https://<perch:events id="url" type="text" label="Veranstaltungs-Webseite" replace="https://|" />" target="_blank">weitere Infos</a>
</perch:if>
</div>
</div>
</article>
</div>
When adding the events there's also an issue with displaying the date for the events in March:
The date is inserted correctly by the date picker but it is not seen on the overview.
Here's the diagnostic report:
Perch: 2.8.25, PHP: 7.0.3, MySQL: 5.5.45, with PDO Server OS: SunOS, cgi-fcgi Installed apps: content (2.8.25), assets (2.8.25), categories (2.8.25), perch_events (1.9.2), perch_forms (1.8.3) App runtimes: <?php $apps_list = array( 'content', 'perch_events', 'perch_forms', ); PERCH_LOGINPATH: /perch PERCH_PATH: /mnt/webv/a1/78/5477578/htdocs/soundofgambia/perch PERCH_CORE: /mnt/webv/a1/78/5477578/htdocs/soundofgambia/perch/core PERCH_RESFILEPATH: /mnt/webv/a1/78/5477578/htdocs/soundofgambia/perch/resources Image manipulation: GD PHP limits: Max upload 32M, Max POST 48M, Memory: 128M, Total max file upload: 32M F1: dc1fef2ad0fcd9f943c02ebb43d85dbc Resource folder writeable: Yes HTTP_HOST: soundofgambia.de DOCUMENT_ROOT: /home/strato/http/power/rid/75/78/5477578/htdocs SCRIPT_NAME: /perch/core/settings/diagnostics/index.php REQUEST_URI: /perch/core/settings/diagnostics/
Have you tried sorting them on
eventDateTime
?cool, just added
and now it works :). Thanks.
So on custom templates the events are not sorted automatically, correct?
But theres still the issue, that the dates for March are not shown correctly on the Control Panel (like on the second picture on my first post). Could it be issue due to the German localization?
Which locale setting are you using?
in my config.php I use:
Try
de_DE.utf8
instead.That's quite funny: I've added de_DE.utf8 to my config.php and then everything was in Englisch (but now it shows also the events from march with a date) ... even on the Website.
To avoid that on the website the dates are shown in English I have to add
to my index.php.
So now in the Control panel the dates are shown in English and on the Website in German.
How are you formatting the dates in your template?
This is my template:
I wonder if it's case-sensitive. Try:
I tried it, but it has no effect on the control panel. The date is still shown in English.
To make it more convenient to my customer I changed the style in the template for the control panel from "05 March 2016" to "05.03.2016" (so I don't have to care about the language settings and for my client it works fine).