Support » Themes and Templates » Floating images, wrapping text: Postie challenge

  • Greetings!
    I’m getting ready to hit the road where I post by email using Postie to retrieve my words of wisdom and images.

    The posts look better when the text flows around the images, so I added classes to wrap right or left in layout.css, in the entry section:
    `.entry .il
    size: auto;
    float: left;
    margin:0 12px 0 0;

    Then, as an example, in my post I write this to float an image fetched by Postie:
    `<div class = "ir">
    *Click to see at full size*

    This works fine when I go to Postie in the CP options and manually fetch the email. However, the formatting code is stripped from the post when it is fecthed using cronless Postie and several other strategies to automate the posting-by-email. (unfortunately I do not have access to Crontab on my server so I have not tried that)

    To see me messing aroung with this can of worms you might take a peek at my WordPress 2.2 at:

    When fetched manually, the emailed post shows this html for the image: `
    <div class = "ir"> <!--Mime Type of File is image/jpeg --><div class="postie-image-div"><img src="" alt="phenomOnMk.jpg" title="phenomOnMk.jpg" style="border: none;" class="postie-image" /></div> *Click to see at full size* </div>`

    But when fetched with automation my div tag for the image is stripped, somehow, somewhere parsed out . . but WHY?

    I’ll be experienting a bit more to make this work, but maybe someone here can point me in the right direction?


Viewing 2 replies - 1 through 2 (of 2 total)
  • OKOKOK! It turns out that you need to run Postie with a cookie set- i.e. from the CP or from a browser that still has a valid cookie to offer. When Postie is croned, there is no cookie of course, and so lots of styling and stuff is parsed out in the process, I presume for very valid security reasons.

    My solution was to crone a “robot” user agent that will first log in to WP as admin to get a cookie set in its cookieJar, and then GET Postie. This way the CSSses, custom <DIV>s etc. stay put, and now my images are floating and the text is wrapping according to my custom classes.

    I’m sure someone who knows WP better will be making a more elegant solution to this, ah, feature.

    Hi vnomad!

    I´m having the same problems.
    Could you post your “robot”-script so I can try if it works also with me?



Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Floating images, wrapping text: Postie challenge’ is closed to new replies.