Support » Plugin: Cleverness To-Do List » Can't work with Postie?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Cindy Kendrick

    (@elusivelight)

    Is it setting the author correctly?

    I see something in Postie’s faqs http://postieplugin.com/faq/ that mention the author being set as admin instead of the current user sometimes. My plugin pulls posts from a specific user for certain instances depending on the plugin settings.

    I haven’t used Postie myself, but if they’re showing up in the database with the post_type of todo and a status of publish, it could be that the author is not set correctly. This will mainly affect individual and master list view types.

    Thread Starter Paul Barthmaier (pbrocks)

    (@pbarthmaier)

    Thanks for the quick response! Sadly, no, it’s not anything that simple. It seems that there are 3 crucial edits to the database necessary to get the todos to show. Basically we’ll need to:

    1. Change the guid to include the post_type
    2. Add _status to the wp_postmeta
    3. Add _priority to the wp_postmeta

    I’ve tried different combinations, but it seems that all three are necessary in order for the todo to be seen.

    Not knowing your plugin that well, could you recommend a reasonable direction to make this happen or is it just too complicated?

    Plugin Author Cindy Kendrick

    (@elusivelight)

    This is what I’m doing to insert a new todo:
    https://gist.github.com/cleverness/837a374c8c1614f8fd00

    You shouldn’t need to do anything to the guid.

    It looks like you should be able to add the post_meta using either
    http://postieplugin.com/downloads/postie-shortcodes-addon/

    or writing something yourself
    http://postieplugin.com/extending/
    with postie_post_after
    and setting _status to 0 and _priority to 1 (for normal)

    Thread Starter Paul Barthmaier (pbrocks)

    (@pbarthmaier)

    Great, thanks for the pointer! I should be able to get it from here, if I can leave the guid alone. However, the ones that show in my database have post_type=todo& inserted between the ? and p=. Perhaps that shouldn’t be, but I’ve tried on a few different sites and it seems consistent.

    Thread Starter Paul Barthmaier (pbrocks)

    (@pbarthmaier)

    Thanks again for the help. Converting your suggestion to php within the nice framework provided by Postie, here’s what I added:

    function my_postie_post_function($post) {
    
      add_post_meta($post['ID'], '_status', 0);
      add_post_meta($post['ID'], '_priority', 1); 
    
      return $post;
    
    }
    
    add_filter('postie_post_after', 'my_postie_post_function');

    Seems to be working just fine. And apparently the guid is unaffected when Postie adds the todo. Still finding that insertion from above if entered from the dashboard.

    Plugin Author Cindy Kendrick

    (@elusivelight)

    Glad it’s working! That’s odd about the guid.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can't work with Postie?’ is closed to new replies.