slimndap / wp-theatre

A free plugin to publish your events on a WordPress website. Perfect for theaters, music venues, cinemas and festivals.
https://wp.theater
GNU General Public License v3.0
39 stars 22 forks source link

Calendar widget with dates in the past #192

Open studiomcpike opened 8 years ago

studiomcpike commented 8 years ago

Like I said on the support-forum : It would be a nice asset that you can go back to previous months in the Calendar widget to show past events (that are marked on the calendar).

Thanks!

studiomcpike commented 8 years ago

Actually like at the bottom of www.pulpdeluxe.be where I used another plugin. There you can click on events in the past and go back a couple of months.

ss1

StudioRATATA commented 7 years ago

Hi! Alight, so this is my first comment on github. And as a disclaimer, I'm a scriptkiddy no to basic knowledge.

Having that said. I've fixed it by replacing the following: in "wpt_calendar.php" $filters = array( 'start' => 'now', ); to $filters = array( $events_filters['start'] = date('2015-01-01', $start_time), ); (I know this isn't how it is supposed to be, but it seems to work, though I'm sure it breaks something else :) )

and

$start_time = strtotime($month); if ($start_time < time()) { $events_filters['start'] = 'now'; } else { $events_filters['start'] = date('Y-m-d', $start_time); } to $start_time = strtotime($month); if ($start_time < time()) { $events_filters['start'] = date('2015-01-01', $start_time); } else { $events_filters['start'] = date('Y-m-d', $start_time); }

Would be cool to make it possible with a option checkbox in widget setting. And as an option with the shortcode.

Again, major rookie here :)

slimndap commented 7 years ago

Thanks a lot for submitting this! I will look into this when I'll be working on the next release.

StudioRATATA commented 7 years ago

Great! Thanks Jeroen. These functions are particular handy for a theatre that has, for example, a festival with multiple days.

Fijne avond!