WordPress.org

Ready to get started?Download WordPress

Forums

Postie
Parsing Dates (6 posts)

  1. 35z5
    Member
    Posted 5 months ago #

    I'm sending a post by Postie with a subject of 2013-10-31 and this shows up as a new post in WordPress with the subject 2013-10-31, which is fine.

    Now today, I'm sending a post with subject 2013-11-02, and that is showing up as a WordPress post with subject 201302.

    I only have two categories, 2013 and 2014.

    Am I missing something? Can I turn off category parsing in the sujject line? All other months (ie subjects like 2013-03-14, 2013-06-18) work fine.

    Thanks,

    http://wordpress.org/plugins/postie/

  2. Wayne Allen
    Member
    Plugin Author

    Posted 5 months ago #

    You can try using slashes instead: 2013/03/14

    Postie is looking at all taxonomy entries not just categories.

  3. tfogarty
    Member
    Posted 3 months ago #

    Hello,
    I am experiencing this issue as well. Besides using slashes, is there a way to comment the dashes so that they will post verbatim? Looking through the Postie documentation I see that using "{POSTTITLE}" in the body of the message may be helpful, do I have that right?

    My objective would be to post "2014-01-04" for example. At the moment, it is coming through as "201404". It's not that bad of an issue. Just wanted to check with you before I switched to another date delimiter because the dashed date format is an ISO standard (https://en.wikipedia.org/wiki/ISO_8601) which is why that format is attractive to me.

    Many thanks.

  4. tfogarty
    Member
    Posted 3 months ago #

    As an update, I was experimenting with the categories, and found that if you only have one then the subject line containing -01- works well and posts the date as expected and does not remove it from the post's title. I am guessing that having a single category may have an effect on the category check which enables the check to be skipped because there is only one category. I would, however, still be interested to know if there is a way to support multiple categories _and_ keep the date in the subject line intact. Perhaps there is a way to use a comment indicator so the category check will be ignored?

    Either way, I'm happy with Postie and am pleased with the value it brings to my posting process. Thank you very much.

  5. Wayne Allen
    Member
    Plugin Author

    Posted 3 months ago #

    The category logic is not the greatest, but many people use it so I can't really change it. I have plans to add preferences for the different types of category delimiters which show solve this problem.

  6. tfogarty
    Member
    Posted 1 month ago #

    Hi Wayne,
    To follow up on the above conversation thread, when I posted an article with today's date (2014-03-01) Postie stripped out the "-03-". I would like to remove this particular feature from the "postie-functions.php" code. I am thinking that if I comment out the below I'll stand a good chance of being successful (I acknowledge that I'll have to do this each time Postie is updated which isn't an issue because Postie is awesome and worth it).

    Would you be able to advise what needs to be commented out? Here is what I think I identified as important to comment out:
    ----------------------------
    Found on lines 287-690:
    ----------------------------

    else if (preg_match_all('/-(.[^-]*)-/', $tmpSubject, $matches)) {
                preg_match("/-(.[^-]*)$/", $tmpSubject, $tmpSubject_matches);
                $tmpSubject = trim($tmpSubject_matches[1]);
            }

    ----------------------------

    ----------------------------
    Found on lines 2530-2534:
    ----------------------------

    if (preg_match_all('/-(.[^-]*)-/', $subject, $matches)) { // -<category>- -<category2>- <Subject>
            //preg_match("/-(.[^-]*)$/", $subject, $subject_matches);
            //$subject = trim($subject_matches[1]);
            $matchtypes[] = $matches;
        }

    ----------------------------

    Many thanks.

Reply

You must log in to post.

About this Plugin

About this Topic