Home › Forums › Calendar Products › Events Calendar PRO › Calendar widget current day – Link current and future day
- This topic has 9 replies, 2 voices, and was last updated 13 years, 7 months ago by
Jonah.
-
AuthorPosts
-
September 6, 2012 at 2:58 am #24612
Michael
ParticipantHi,
I need for the Mini calendar widget an link to the event-list when
I click at the actually day (today). The class is tribe-events-present.
Further it wont be nice, when a click of an day with events in the future
bring the user to the eventlist for this day.
Is this possible?
Thank you for helping and regards
MikeSeptember 6, 2012 at 2:52 pm #24662Jonah
ParticipantHi Michael, yes this is possible. I have a snippet which will make this work. First make a copy of /wp-content/plugins/the-events-calendar/views/table.php and place in an ‘events’ folder in your theme. Then open it up and find lines 102-106 that look like this:
if( function_exists('tribe_get_linked_day') && count( $monthView[$day] ) > 0 ) {
$return .= tribe_get_linked_day($date, $day); // premium
} else {
$return .= $day;
}
…and replace with the following:
if( function_exists('tribe_get_linked_day') ) {
$date = tribe_get_start_date( '', false, 'Y-m-'.$day.'' );
$return .= ( count($monthView[$day]) ) ? "$day" : $day;
} else {
$return .= ( count($monthView[$day]) ) ? "$day" : $day;
}
I hope that helps but let me know if you need anything else.– Jonah
September 7, 2012 at 1:41 am #24671Michael
ParticipantHi Jonah,
thank you for your quick answer. One thing is nice one thing is wrong 🙂
Your fix show me an link for events in the calendar widget but not an
link to the event list for the *actual day (today)*. Is this possible too?
Regards MikeSeptember 7, 2012 at 9:44 am #24686Jonah
ParticipantHi Michael,
Place this https://www.sourcedrop.net/DD4a2418cefec in /wp-content/plugins/the-events-calendar/views/table-mini.php wherever you want it to appear. Make sure to make a copy of table-mini.php and place in an ‘events’ folder in your theme first.
I hope that helps!
– Jonah
September 10, 2012 at 3:11 am #24740Michael
ParticipantHi Jonah,
sorry, but this is not what I mean. I wrote “I need for the Mini calendar widget an link to the event-list when I click at the actually day (today)”
This mean the highlighted day field (the day number) *in* the calendar of the widget!Thank you for help again …
Regards MikeSeptember 10, 2012 at 11:34 am #24756Jonah
ParticipantHi Michael,
So you want the day links in the mini calendar widget to go to the event list for that day? That’s what it should be doing by default. What are you experiencing that is different? Do you have an example site I can take a look at?
Thanks,
JonahSeptember 11, 2012 at 1:21 am #24799Michael
ParticipantI have tested again, I can’t click on the highlighted day in the mini calendar widget. Example: http://melibokus-cms.de
September 11, 2012 at 8:10 am #24808Jonah
ParticipantHi Michael,
As this is a customization issue I’m afraid we cannot help you out any further. You’ll need to hire someone to help you or figure it out on your own. Good luck!
Regards,
– JonahSeptember 12, 2012 at 1:41 am #24870Michael
ParticipantHmmm, I don’t understand that! First you wrote “That’s what it should be doing by default.” and after you take a look at the website you wrote “As this is a customization issue I’m afraid we cannot help you out any further.”?! What’s up? Default or customization?
September 12, 2012 at 1:40 pm #24942Jonah
ParticipantHey Michael,
I said: “So you want the day links in the mini calendar widget to go to the event list for that day? That’s what it should be doing by default. What are you experiencing that is different? Do you have an example site I can take a look at?” – sorry, this is not what it does by default (the mini calendar days are not clickable by default), and it is a customization and my modification I sent you if applied in the correct place should work but if it doesn’t there’s no guarantees that I will be able to make it work for you. Can you verify that this is what you’re trying to accomplish (to make days with events in the mini cal clickable and have it direct to that day) and verify you’ve placed the above code in the correct place? Maybe you could paste your table.php file @ http://snippi.com/ so I can verify your changes… Again, make sure you are making a copy of /wp-content/plugins/the-events-calendar/views/table.php and placing it in an ‘events’ folder in your theme folder, not in the themes directory.
I hope that helps and clarifies things for you.
Regards,
Jonah -
AuthorPosts
- The topic ‘Calendar widget current day – Link current and future day’ is closed to new replies.
