• Resolved marverix

    (@marverix)


    Hello,
    I wanted to contribute to the code, as it is on the GPLv2 license. Do you have already a GitHub repo for it? If not, have you thought about creating one so it would be easier for developers to contribute to your great plugin?
    Br,
    Marek

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author room34

    (@room34)

    Thanks for your interest. The plugin is under GPL as a requirement to include it on this directory. However I am not looking for additional contributors to the core project at this time, as it also underlies a paid add-on plugin I am developing, and I need to ensure that any changes to the base plugin align with my development roadmap for the overall project.

    Under terms of the GPL, I of course can’t stop you from taking the code, modifying it, and distributing your modified version (though of course I would prefer if you did not do that).

    What sorts of changes are you looking to contribute?

    Thread Starter marverix

    (@marverix)

    Hello,

    I’m not going to fork your plugin, as I don’t see any need to do that. Especially that (as you mentioned) you don’t look for any contributions, and it’s strictly related to your earnings.

    I modified locally “calendar-list.php”, to skip past events. When used with count=”1″ and showendtimes=”true”, works really nice as the “Show incoming event” widget.

    After L62 I have added:
    $current_time = time();

    And then after L174:

    $end_time = strtotime($day . '-' . $month . '-' . $year . ' ' . $event['end']);
    if ($current_time > $end_time) { continue; }

    Of course, would be much nicer to allow enable this feature as a flag (arg).

    • This reply was modified 4 years ago by marverix.
    Plugin Author room34

    (@room34)

    Just so I’m clear, this is intended to make events from the current date drop off the display after their time has passed, is that correct? (Strictly speaking, it wouldn’t have to be limited to just one event… the important thing is not showing events that happened earlier today but are already finished.)

    Great idea. I may take a slightly different approach to implementing it, but I think it’s a good feature to add.

    Plugin Author room34

    (@room34)

    As I think more about this, there will be an issue, in that the plugin caches the parsed calendar data using WordPress transients, by default for one hour.

    You can bypass that by adding reload="true" to the shortcode, but that is not great for performance.

    I think you’re on the right track with getting the current time in the template, because that won’t be affected by the caching. But then the event array would need to include more events than the number specified by count, so it has something to work with as those events pass.

    For now with your working change, using reload="true" will suffice. But I think there will be potential timezone issues if you’re using the PHP time() function. You may need to use the WordPress current_time() function instead, which accounts for the timezone setting in WordPress.

    • This reply was modified 4 years ago by room34.
    Thread Starter marverix

    (@marverix)

    Yes, I also realized mentioned issues after some testing. Maybe then it would be a good idea to just add a separate view? Like view=”incoming” ? Or something like that? This way we will omit complicating the list view, and just add special logic there. So it could work like that, that you are writing with args how many incoming events display? So something like this:

    [ics_calendar url="URL_HERE" view="incoming" count="3"]
    

    So above will display 3 incoming events? What do you think?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘GitHub Repo’ is closed to new replies.