Main menu

Forum


× Help Forum English

[SOLVED] Eventlist: both dates

  • tuco
  • Topic Author
  • New Member
  • New Member
More
7 years 2 months ago - 7 years 1 month ago #13914 by tuco
[SOLVED] Eventlist: both dates was created by 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
Attachments:
Last edit: 7 years 1 month ago by Lyr!C.

Please Log in or Create an account to join the conversation.

 

  • tuco
  • Topic Author
  • New Member
  • New Member
More
7 years 2 months ago - 7 years 2 months ago #13915 by tuco
Replied by tuco on 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
Attachments:
Last edit: 7 years 2 months ago by tuco. Reason: adding image
The following user(s) said Thank You: Lyr!C

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
7 years 2 months ago #13934 by Lyr!C
Replied by Lyr!C on 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.2
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 Attachment:

The following user(s) said Thank You: tuco

Please Log in or Create an account to join the conversation.

  • tuco
  • Topic Author
  • New Member
  • New Member
More
7 years 2 months ago - 7 years 2 months ago #13936 by tuco
Replied by tuco on 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.

Part of the message is hidden for the guests. Please log in or register to see it.


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
Last edit: 7 years 2 months ago by tuco.

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
7 years 2 months ago #13950 by Lyr!C
Replied by Lyr!C on 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 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 :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.2
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 Attachment:

Please Log in or Create an account to join the conversation.

  • tuco
  • Topic Author
  • New Member
  • New Member
More
7 years 2 months ago - 7 years 2 months ago #13955 by tuco
Replied by tuco on 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
Attachments:
Last edit: 7 years 2 months ago by tuco.

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
7 years 2 months ago #13966 by Lyr!C
Replied by Lyr!C on 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.2
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 Attachment:

Please Log in or Create an account to join the conversation.

  • tuco
  • Topic Author
  • New Member
  • New Member
More
7 years 2 months ago #13968 by tuco
Replied by tuco on 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

Please Log in or Create an account to join the conversation.

  • tuco
  • Topic Author
  • New Member
  • New Member
More
7 years 2 months ago #13971 by tuco
Replied by tuco on 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

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
7 years 2 months ago #13972 by Lyr!C
Replied by Lyr!C on 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.2
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 Attachment:

Please Log in or Create an account to join the conversation.

Moderators: Lyr!C
Time to create page: 0.300 seconds

 

Follow Us

acymailing logo new

Create your Joomla templates with Template Creator CK