Main menu

Forum


× Help Forum English

[SOLVED] Eventlist: both dates

  • tuco
  • Autore della discussione
  • New Member
  • New Member
Di più
7 Anni 3 Mesi fa - 7 Anni 2 Mesi fa #13914 da tuco
[SOLVED] Eventlist: both dates è stato creato da tuco
Hello,
I try to bring this:



to this:



So, the Start-Date and beneath the End-Date, to see that this event is more than one day...
I think this was usually displayed, or am I wrong.
Anyway, where can I adjust this?

edit:
I found that, when I add a new event that last few days AND I'm not add the weekdays from the dates-menu then I get:


And the startdate becomes in Firebug (tag):
ic-period-startdate
but then this event will no longer displayed in the calendar-module! What the heck?!
When I change this and add the weekdays again, the start-date and end-date in the eventlist are gone...
(And the startdate becomes the tag:
ic-single-startdate

greetings from Thuringia
Allegati:
Ultima Modifica 7 Anni 2 Mesi fa da Lyr!C.

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

  • tuco
  • Autore della discussione
  • New Member
  • New Member
Di più
7 Anni 3 Mesi fa - 7 Anni 3 Mesi fa #13915 da tuco
Risposta da tuco al topic Eventlist: both dates
Hello, everyone,
I made it myself with the Infos from Thread:
#13529
(that was hairy ...at least for me)
I put that code into my _my_themepack_events.php at line 126 aproximate:
<?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; ?>
and so it looks like:


That's how I wanted it.

I hope this works also furthermore…but if there is an more elegant way – let me know!
I think the problem has something to do with the issue, if an event goes more than 1 day and you didn’t set the standard “from - to” but rather (in my case) set any weekdays.
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.
But:
Can I let it stand so, as I changed it above, or is there an update of iCagenda is planed in that way, that makes my changes obsolete?
Can you give a short Info to that issue, please?
Otherwise I set the thread to solved.

Thanks to Cyril and jonmar for these hints.
Boys and girls at iCagenda you make a good job! Go on this way!
Greetings
Allegati:
Ultima Modifica 7 Anni 3 Mesi fa da tuco. Motivo: adding image
Ringraziano per il messaggio: Lyr!C

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

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
7 Anni 3 Mesi fa #13934 da Lyr!C
Risposta da Lyr!C al topic Eventlist: both dates
Hello,

First, the weekdays option is meant to divide one period into individual one-day dates, so if a full period, don't select days ;-)

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.

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.
But it is in the roadmap for 4.0.0 to allow multiple period for one event, with more option to includ/exclude day(s) (what you will need) ;-)

So, i can confirm you that your theme pack change is ok, and will be needed until 4.0.0 to be available (not before months, but i will do my best to achieve it this year).

Hope this answers your questions ?

Best regards,
Cyril

Latest version : iCagenda 3.9.3
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: tuco

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

  • tuco
  • Autore della discussione
  • New Member
  • New Member
Di più
7 Anni 3 Mesi fa - 7 Anni 3 Mesi fa #13936 da tuco
Risposta da tuco al topic Eventlist: both dates
Thank you for your answers.

I had to choose this way (long event with weekdays) because in our case we have any exhibitions, but our house isn't open all the week, only Wednesday to Sunday. So I have to set this with weekdays, so that our visitors become not confused, if they see: Hey, from Monday to Sunday the exhibition is open... And then they come to us on Tuesday (often a long way to go) and find our doors closed.

Parte di questo messaggio è nascosta ai visitatori. Prego registrarsi e/o effettuare l'accesso per vederla.


Anyway, fine that I've got your blessing with the changes ;)
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 :unsure:
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
Ultima Modifica 7 Anni 3 Mesi fa da tuco.

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

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
7 Anni 3 Mesi fa #13950 da Lyr!C
Risposta da Lyr!C al topic Eventlist: both dates
Hello,

This is one of my goals for 4.0.0 : to have possibility to set open/close days and as well, to remove some specific days from a period ;-)

tuco ha scritto: 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 :unsure:
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


You can get weekdays in your custom theme file like this : $item->weekdays

It will return a comma-separated list of number.
0 is Sunday, 1 is Monday, 2 is Tuesday... and so on!

So, you can do some specific php code to display as you want.

Could you tell me where and how you see it ?

Thank!
Regards,
Cyril

Latest version : iCagenda 3.9.3
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.

  • tuco
  • Autore della discussione
  • New Member
  • New Member
Di più
7 Anni 3 Mesi fa - 7 Anni 3 Mesi fa #13955 da tuco
Risposta da tuco al topic Eventlist: both dates
Hallo,
I think it has to be right after the if-command at line 126 (see above):
<?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>
  ...
I don't know, if this is somehow right... or in this direction.
My knowledge to this isn't enough.

It should look something like this:



Greetings
Allegati:
Ultima Modifica 7 Anni 3 Mesi fa da tuco.

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

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
7 Anni 3 Mesi fa #13966 da Lyr!C
Risposta da Lyr!C al topic Eventlist: both dates
Oh!

I thought you meant the list of opened days in event details view (that you only wanted to change the display...)

About the list, yes your code seems ok to me :
<?php echo JHtml::date($item->startdate, 'D', null); ?>

Did you test your code already ?

Regards,
Cyril

Latest version : iCagenda 3.9.3
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.

  • tuco
  • Autore della discussione
  • New Member
  • New Member
Di più
7 Anni 3 Mesi fa #13968 da tuco
Risposta da tuco al topic Eventlist: both dates
Hello,

I thought you meant the list of opened days in event details view

Well, that would be another nice thing ;-)

Did you test your code already ?

No, that was only a "shot in the blue" (like we say in German ;-))

I haven't enough time and quiet for this yet.
I'm going to do this these days, and I will report definitely again :-)

Anyway, thank you for your time and patient for the moment.

Greetings

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

  • tuco
  • Autore della discussione
  • New Member
  • New Member
Di più
7 Anni 3 Mesi fa #13971 da tuco
Risposta da tuco al topic Eventlist: both dates
No, I didn't get it.
I'm too stupid for this php-stuff.

I tried, but the whole output is getting crap.

I've inserted the folowing:
<?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; ?>	
			...

I don't know how to set the right syntax to get the number of the days.

The if-command should do something like this:
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; ?>

Perhaps someone got some minutes and may code this.

I'm at the end of the street...sorry

Greetings

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

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
7 Anni 3 Mesi fa #13972 da Lyr!C
Risposta da Lyr!C al topic Eventlist: both dates
As i'm leaving for Paris in a few hours, not time to test your code yet, but i see an error :

- missing parenthesis for "if"
<?php if ($item->weekdays == 0 || $item->weekdays == 6) : ?>

So, this could explain a mess-up output. (but don't have the full code you did...)

Control too if all "if" statement has a closing "endif" line ;-)

Hope this helps ?

Best regards,
Cyril

Latest version : iCagenda 3.9.3
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.264 secondi

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new