Main menu

Forum


× Help Forum English

End date is not shown

  • PeteSCCS
  • Auteur du sujet
  • Cet utilisateur est bloqué
  • Cet utilisateur est bloqué
Plus d'informations
il y a 10 ans 7 mois #7493 par PeteSCCS
End date is not shown a été créé par 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?
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 10 ans 7 mois #7501 par Lyr!C
Réponse de Lyr!C sur le sujet 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) .

Fichier attaché :

Les utilisateur(s) suivant ont remercié: PeteSCCS

Connexion ou Créer un compte pour participer à la conversation.

  • PeteSCCS
  • Auteur du sujet
  • Cet utilisateur est bloqué
  • Cet utilisateur est bloqué
Plus d'informations
il y a 10 ans 6 mois #7631 par PeteSCCS
Réponse de PeteSCCS sur le sujet 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.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 10 ans 6 mois #7643 par Lyr!C
Réponse de Lyr!C sur le sujet 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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • PeteSCCS
  • Auteur du sujet
  • Cet utilisateur est bloqué
  • Cet utilisateur est bloqué
Plus d'informations
il y a 10 ans 6 mois #7664 par PeteSCCS
Réponse de PeteSCCS sur le sujet 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...

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 10 ans 6 mois #7688 par Lyr!C
Réponse de Lyr!C sur le sujet 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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • PeteSCCS
  • Auteur du sujet
  • Cet utilisateur est bloqué
  • Cet utilisateur est bloqué
Plus d'informations
il y a 10 ans 6 mois #7703 par PeteSCCS
Réponse de PeteSCCS sur le sujet 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 :)

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 10 ans 6 mois #7704 par Lyr!C
Réponse de Lyr!C sur le sujet 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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: Lyr!C
Temps de génération de la page : 0.121 secondes

 

Follow Us

Créez vos templates Joomla avec Template Creator CK

acymailing logo new