- Posts: 17
- Thank you received: 2
ic-period-startdate
ic-single-startdate
Please Log in or Create an account to join the conversation.
<?php // Next Date ('next' 'today' or 'last date' if no next date) ?>
<?php if (iCDate::isDate($item->startdate) && $item->weekdays) : ?>
<span class="ic-period-startdate">
<?php echo JHtml::date($item->startdate, 'D j. M Y', null); ?>
</span> -
<span class="ic-period-enddate">
<?php echo JHtml::date($item->enddate, 'D j. M Y', null); ?>
</span>
<?php elseif ($dateday) : ?>
<span class="ic-period-startdate">
<?php echo JHtml::date($dateday, 'D j. M Y', null); ?>
</span>
<?php else : ?>
<span class="ic-period-startdate">
<?php echo JHtml::date($item->next, 'D j. M Y', null); ?>
</span>
<?php endif; ?>
Please Log in or Create an account to join the conversation.
For now, this is not possible with one event, if multiple periode... You will have to create multiple events (using save a copy to gain time) and set separated period for each one.In my case, an (longer) event wont go all the weekdays but only Wednesday to Sunday. So I have to choose to add the weekdays.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
tuco wrote: With these changes I can live, ....although...It would be nice if I could change the look of the weekday, so the visitors could easily see that this opening is weekdays and that opening is weekend... for example. If the effort isn't to high
My skills aren't so good... How can I extract the weekday out of the $EVENT_DATE ? or is the $item->startdate better to use?
Well, perhaps complaining on high level ...but it would be nice if you know a way.
greetings and all the best for your project
tuco
Please Log in or Create an account to join the conversation.
<?php if (iCDate::isDate($item->startdate) && $item->weekdays) : ?>
<!-- my stupid code -->
<?php if $item->weekdays == 0 || $item->weekdays == 6: ?>
<span class="red">
<?php echo JHtml::date($item->startdate, 'D', null); ?>
</span>
...
Please Log in or Create an account to join the conversation.
<?php echo JHtml::date($item->startdate, 'D', null); ?>
Please Log in or Create an account to join the conversation.
Well, that would be another nice thingI thought you meant the list of opened days in event details view
No, that was only a "shot in the blue" (like we say in German )Did you test your code already ?
Please Log in or Create an account to join the conversation.
<?php if (iCDate::isDate($item->startdate) && $item->weekdays) : ?>
<!-- here my Trying...-->
<?php if $item->weekdays == 0 || $item->weekdays == 6: ?>
<span style="color:#6FC691;">
<?php echo JHtml::date($item->startdate, 'D', null); ?>
</span>
<?php else : ?>
<span style="color:#E63884;">
<?php echo JHtml::date($item->startdate, 'D', null); ?>
</span>
<?php endif; ?>
...
If event has a Startdate AND Weekdays are set then
If Startdate Weekday is Saturday OR Sunday then
<span class="ic-wkday-sunday"> output 'D' </span>
else
<span class="ic-wkday-other-day"> output 'D' </span>
end if
output Startdate 'j. M Y'
If Enddate Weekday is Saturday OR Sunday then
<span class="ic-wkday-sunday"> output 'D' </span>
else
<span class="ic-wkday-other-day"> output 'D' </span>
end if
output Enddate 'j. M Y'
and then further
<?php elseif ($dateday) : ?>
<span class="ic-period-startdate">
<?php echo JHtml::date($dateday, 'D j. M Y G:i', null); ?>
</span>
<?php else : ?>
<span class="ic-period-startdate">
<?php echo JHtml::date($item->next, 'D j. M Y G:i', null); ?>
</span>
<?php endif; ?>
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.