• Resolved ogarbe

    (@ogarbe)


    As I can’t post any comments on the Postie blog (https://www.economysizegeek.com/wp-mail), I post here my correction for Postie and the categories problem :

    config_form.php Line 138

    replace :

    $categories = $wpdb->get_results(”SELECT * FROM $wpdb->categories ORDER BY cat_name”);

    by

    $categories = get_categories(array(’orderby’ =>’name’));

    and on postie.functions.php, line 1526, replace :

    $sql_name = ‘SELECT cat_ID
    FROM ‘ . $wpdb->categories. ‘
    WHERE cat_name=\” . addslashes($match) . ‘\”;
    $sql_id = ‘SELECT cat_ID
    FROM ‘ . $wpdb->categories. ‘
    WHERE cat_ID=\” . addslashes($match) . ‘\”;
    $sql_sub_name = ‘SELECT cat_ID
    FROM ‘ . $wpdb->categories. ‘
    WHERE cat_name LIKE \” . addslashes($match) . ‘%\’ limit 1′;
    
    if ( $category = $wpdb->get_var($sql_name) ) {
    //then category is a named and found
    } elseif ( $category = $wpdb->get_var($sql_id) ) {
    //then cateogry was an ID and found
    } elseif ( $category = $wpdb->get_var($sql_sub_name) ) {
    //then cateogry is a start of a name and found
    }
    
    if ($category) {
    $post_categories[] = $category;
    }

    by

    $categories = get_categories(array(’orderby’ =>’name’));
    foreach ($categories as $category) {
    if ($match == $category->cat_name) {
    $post_categories[] = $category->cat_ID;
    continue;
    }
    if ($match == $category->cat_ID) {
    $post_categories[] = $category->cat_ID;
    continue;
    }
    if (strpos($category->cat_name,$match) !== false) {
    $post_categories[] = $category->cat_ID;
    }
    }

    Not related with 2.3 but there is a bug in postieIMAP.php, line 70 :

    the correct line is :

    if (eregi(”google”,$server)) {
Viewing 8 replies - 1 through 8 (of 8 total)
  • I posted an update at benjaminfleischer.com/code to postie mod based on the mod by Greg and Olivier , from the original economysizegeek page. My version also adds an option to use ajax to confirm posts (in case you have a filter bouncing them to your post_to_email address)

    Benjamin, does your postie mod avoid querying via SQL per Oliver’s recommendation? and does it also include Oliver’s ‘postieIMAP.php, line 70’ bug fix?

    Anyone else seeing these little bugs:

    -“Default post by mail category” dropdown in “Message Settings” of “Postie Options” does not save when changed.
    -when clicking on the Quick read me, all of the nav links change to have wp-content rather than wp-admin.

    I also noticed that if an article has an apostrophe the backslash (\) (which I’m assuming is used to escape it) still appears in the article heading.

    Also, if an article is forwarded and HTML is turned on the formatting of the page goes awry and for example, the article will block navigation elements.

    I found that using the above fixes for Postie and WordPress 2.3.3 worked. However, I was only seeing Categories in the Postie options that had posts in them.

    I had to change the changed line to this

    $categories = get_categories(array(’orderby’ =>’name’,'hide_empty' => false));

    And the same thing in the second code replacement.

    Thanks! I have been working all day trying to figure out the cat problem when I finally came across this patch. It worked!

    CanisFirebrand: Your patch was also needed and thank you so much!

    Just wanted to add my voice to say MANY THANKS to ogarbe and CanisFirebrand for the patches!!!

    This solved the problem for me as well, and I was going crazy trying to figure it out… Google is my friend, and so are you two!

    Thanks again!

    Hi Guys!

    I got another problem I wasn′t able to solve yet: Everything works fine – everything but the pictures. When I′m sending a message incl. a pic, I got base64 code instead of the picture.

    –AKMAILBOUNDARY
    Content-Type: application/octet-stream; name=”krone.gif”
    Content-Transfer-Encoding: base64
    
    R0lGODlhaQL2AfcAABsaGxwbGh0cGh4dGh8eGhwbHB0cHR4dHh8eHyAfGiEg
    GiIhGiMiGSQjGSUkGSYlGScmGSgnGSopGSwrGC4tGDAvGDQzFzY1Fzg2Fzo5

    And so on…

    Got some hint for me? What′s going on, what can I do?

    Thanks!
    Alex

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Postie and 2.3’ is closed to new replies.