WordPress.org

Ready to get started?Download WordPress

Forums

RS EVENT multiday
[resolved] 12:00 AM end time on old posts (5 posts)

  1. renowden
    Member
    Posted 1 year ago #

    I have just upgraded the plugin to the latest version and all of my old posts now have an end time of 12:00 AM. Presumably because they were carried over from the previous version which didn't support end times. How can I set them so that they don't show an end time at all? New posts are ok.

    http://wordpress.org/extend/plugins/rs-event-multiday/

  2. renowden
    Member
    Posted 1 year ago #

    I have hacked around it for the time being by using %STARTTIME% instead of %TIME% in rs_event_post() in my theme files. It doesn't seem to be a problem in rs_event_list().

    I would guess that the problem relates to the code around $fake_secondend but I haven't figured out how this works yet.

  3. wp-lefty
    Member
    Plugin Author

    Posted 1 year ago #

    Are you sure, that the problem occurs just with rs_event_post() and definitely not with rs_event_list()?
    If this is the case, it would be good news, because now I can localize the bug. It is on line 914.
    Please change the code as followed:

    before (with bug):

    $fake_secondend = mysql2date('s', gmdate('Y-m-d H:i:s', $ts_p_endtime));

    new (bugfix):

    $fake_secondend = $ts_p_endtime ? mysql2date('s', gmdate('Y-m-d H:i:s', $ts_p_endtime)) : 58;

    And please let me know, if your problem is solved, so I can add that bugfix to version 1.3.2

    Btw: The $fake_second and the "fake_sencondend just help to store or identify the information, if a starttime and/or endtime is entered or not.

  4. renowden
    Member
    Posted 1 year ago #

    Great Florian, that seems to have fixed it.

    I figured that's what the "fakes' were doing - a few comments in the code saying how it works could be useful for future maintenance.

  5. wp-lefty
    Member
    Plugin Author

    Posted 1 year ago #

    resolved

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.