Main menu

Forum


× Help Forum English

End date is not shown

  • PeteSCCS
  • Autore della discussione
  • Utente bloccato
  • Utente bloccato
Di più
10 Anni 7 Mesi fa #7493 da PeteSCCS
End date is not shown è stato creato da PeteSCCS
I have an event over a period (see attachment)

I would expect the Events and Event Details display to show:
Wednesday, 25 June 2014 08:30 - Thursday, 26 June 2014 16:30

But instead the end date is left out completely. If I enable All Dates display, the same thing happens. (see attachments)

How can I get iCagenda to display the end date?
Allegati:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
10 Anni 7 Mesi fa #7501 da Lyr!C
Risposta da Lyr!C al topic End date is not shown
Hello,

The screen shot attached are for a one day period event, with a start and end time different.
Not the same as you example in text.

For a period with start and end date different, today, it is displayed only in the bottom "all dates" list.
But, i'm working on developement to change this, and to allow an option to be able to display only start, or start and end date in this case.

Today, it's possible, but by editing the php code of a theme pack. All depends where you want to change this, and if you know how to create a custom theme pack (different named pack, to prevent removal by an update).


For example, in file YOURTHEME_event.php, you can replace this :
<strong><?php echo $EVENT_VIEW_DATE_TEXT; ?>:</strong>&nbsp;<?php echo $EVENT_VIEW_DATE; ?>

By this :
<strong><?php echo JText::_('COM_ICAGENDA_EVENT_PERIOD'); ?>:</strong>&nbsp;<?php echo $item->startDate; ?> <?php echo $item->startTime; ?> - <?php echo $item->endDate; ?> <?php echo $item->endTime; ?>

Cyril

Latest version : iCagenda 3.9.8
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Ringraziano per il messaggio: PeteSCCS

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • PeteSCCS
  • Autore della discussione
  • Utente bloccato
  • Utente bloccato
Di più
10 Anni 6 Mesi fa #7631 da PeteSCCS
Risposta da PeteSCCS al topic End date is not shown
Hi,

Yes, sorry, I had entered the wrong end date.

I tried your suggested code, but of course without some PHP logic, it doesn't work so well with single day events, etc.

But then I thought, "why not use the same thing as All Dates", so I entered
<strong><?php echo $EVENT_PERIOD; ?></strong>
into my template, and it works quite well. The date now includes the text "from..." and "...to..." but that's acceptable (if I wanted to change this, is it possible using templating, or would it require editing core extension files?).

Generally, we don't have recurring events – I wonder if using $EVENT_PERIOD would be a problem then – would it show all of the dates rather than the next date?

Thanks.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
10 Anni 6 Mesi fa #7643 da Lyr!C
Risposta da Lyr!C al topic End date is not shown
About removing of "from" and "to" you can do an override of the translation string directly in joomla admin!

Video tutorial : www.icagenda.com/docs/documentation/8-vi...joomla-administrator

The strings to search are :
COM_ICAGENDA_PERIOD_FROM = "from"
COM_ICAGENDA_PERIOD_TO = "to"

Hope this help ;-)
Cyril

Latest version : iCagenda 3.9.8
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • PeteSCCS
  • Autore della discussione
  • Utente bloccato
  • Utente bloccato
Di più
10 Anni 6 Mesi fa #7664 da PeteSCCS
Risposta da PeteSCCS al topic End date is not shown
Hi,

I'm still having problems with this.

If I just use $EVENT_PERIOD in my template (mytemplate_event.php), then for events that have a single date, nothing is displayed. Only events with dates "over a period" have their dates displayed.

So I thought, just use some if/else:
if ($EVENT_PERIOD) { 
  echo $EVENT_PERIOD; }
else { 
  echo $item->startDate; }

Now a date is shown, but it's completely wrong! E.g. the event date is set to Wednesday 29 October 2014, but Tuesday, 30 November 1999 is displayed!

Looking at the mytemplate_events.php file, I see that the variable $EVENT_DATE is used, but if I try to use this variable in the mytemplate_event.php file, it is empty.

Very confused...

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
10 Anni 6 Mesi fa #7688 da Lyr!C
Risposta da Lyr!C al topic End date is not shown
Hi!

I think your code should be :
if ($EVENT_PERIOD) { 
  echo $EVENT_PERIOD; }
else { 
  echo $EVENT_DATE; }

...

Latest version : iCagenda 3.9.8
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • PeteSCCS
  • Autore della discussione
  • Utente bloccato
  • Utente bloccato
Di più
10 Anni 6 Mesi fa #7703 da PeteSCCS
Risposta da PeteSCCS al topic End date is not shown
Sorry maybe I wasn't clear – I found that EVENT_DATE is used in the _events.php file, and used it in the _event.php file, so my code is as you suggest.

But this results in a blank line - no date is displayed - if the event is a single date (or multiple single dates).

That what's confusing :)

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
10 Anni 6 Mesi fa #7704 da Lyr!C
Risposta da Lyr!C al topic End date is not shown
Okay...

Sorry, as i'm refactoring all the code, i'm sometimes lost in my own coding! ;-)

In fact, it could depends on the dates settings... if a period in the same time.

Maybe try with $item->next (direct next date from data) in place of $EVENT_DATE (date return by a function).

And if not solving your issue, could you post dates entered for the event with no date displayed this way, so that i will reproduce it.

Best Regards,
Cyril

Latest version : iCagenda 3.9.8
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

Moderatori: Lyr!C
Tempo creazione pagina: 0.179 secondi

 

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new