Forums

Editorial Calendar
Any Way to Display EXACT Post Times? (9 posts)

  1. technabob
    Member
    Posted 4 months ago #

    First off, great plugin. Should be standard WordPress functionality, IMHO. However, I have one minor issue. We schedule our posts every 45 minutes on one of our sites, but the calendar view rounds all times to the prior hour. This makes scheduling in that view very difficult for us, and it's something that would be really great if the calendar actually displayed the full time (or at least offered this as an option). We actually plan on increasing the frequency of posts, so this will become an even bigger issue for us over time.

    Thoughts?

    http://wordpress.org/extend/plugins/editorial-calendar/

  2. Zack Grossbart
    Member
    Posted 4 months ago #

    Thanks for using the calendar. We actually do support scheduling posts down to the minute. When you change the time in the quick edit screen you can either select the time from the pull down menu, or type in a type you want.

    The calendar still shows the times rounded to the hour so save space, but they posts will come in the right order based on their times, and the time will be saved.

    It would be possible to display the exact time in the calendar by changing the code, but there's no other way to do it.

    Thanks,
    Zack

  3. technabob
    Member
    Posted 4 months ago #

    Yep, I figured out that you can schedule to exact times, but it would still be really helpful for us to be able to see the post times on the calendar, since we often juggle things around during the day and without seeing the times on the calendar, you have to click into the post, which I can already do on the main wordpress admin.

    Please consider this as an enhancement for a future release if you can. I'd be happy to make a contribution via PayPal if that helps :)

  4. Zack Grossbart
    Member
    Posted 4 months ago #

    Thanks for the request and the offer of the donation. We don't take money, but it's always nice to get the offer.

    You could change the time format with a tweak to the PHP. Let me know if you're interested and I'll point you in the right direction.

    Thanks,
    Zack

  5. technabob
    Member
    Posted 4 months ago #

    Ok, thanks for the support. I suppose a patch would be the best thing for now - though I hate the idea of branching off the main build and having to patch every time you update. That said, getting a patch in there would be better than not having it at all.

    Feel free to send along any tips on where to change the PHP to tweak this.

  6. technabob
    Member
    Posted 4 months ago #

    Hah, I figured it out...

    On line 683 of edcal.php, I simply changed

    "formattedtime" : "<?php $this->edcal_json_encode(the_time($timeFormat)); ?>",

    to
    "formattedtime" : "<?php the_time() ?>",

    That seems to do the trick.

    Any other implications of that change?

  7. Zack Grossbart
    Member
    Posted 4 months ago #

    That's the area I was going to recommend, but you can do a little better by extending the PHP class from another file. If you override the edcal_postJSON function from another file you can still get upgrades and you don't have to keep making the same patch.

    I need to think of the best way to handle this in the calendar. Most people don't need the full time and I'm reluctant to add another preference. I need to think about it a little more.

    -Zack

  8. technabob
    Member
    Posted 4 months ago #

    Ah good thought on externalizing it. Can I modify the output of the edcal_postJSON function using a filter in my theme's functions.php? I wasn't sure of the order of execution of that stuff so didn't know if I could tackle it that way.

  9. Zack Grossbart
    Member
    Posted 4 months ago #

    I haven't tried it, but I think you could use the override_function function (http://php.net/manual/en/function.override-function.php). That way you can replace the whole function.

    You could also try a filter. The output of that function is simple JSON so it should be easy to change it. I haven't tried doing this, so I'm curious how it works.

    Thanks,
    Zack

Reply

You must log in to post.

About this Plugin

About this Topic