WordPress.org

Ready to get started?Download WordPress

Forums

Postie
Image template and inline images not working (9 posts)

  1. Grimpond
    Member
    Posted 3 years ago #

    WordPress 3.12
    Postie 1.4.2
    PHP Version : 5.2.12-2

    Postie is working perfectly in most aspects, and the plugin is perfect for our needs, but we can not get the custom image template to work, nor the inline images(#img1# etc)

    Posts are posted and the image are added as what appears to be the default WP gallery

    Am I missing something?
    Any help appreciated

    D

  2. mattleech
    Member
    Posted 3 years ago #

    Hi Grimpond,

    I've been having problems with postie and multiple images, are your symptoms the same as mine posted here: http://forum.robfelty.com/topic/fix-for-only-one-attached-picture-uploadin-to-post

    If so then I have a fix for you.

  3. Grimpond
    Member
    Posted 3 years ago #

    Hey matt,

    Similar but not the same.. all images for me end up in a 'gallery' at the end of the post, and I end up with #imgX# stuck through the post.

    My biggest frustration is the none of the standard image templates work when selected, and consequently the custom fails as well.

    If you think the 'fix' might help, I would be happy to see it :)

    D

  4. mattleech
    Member
    Posted 3 years ago #

    Hi Grimpond,

    I've posted a quick guide here: http://mattleech.com/?p=297

    Please backup your existing ReplaceImagePlaceHolders function before overwriting it.

    Good luck!

  5. 3rdaxis
    Member
    Posted 3 years ago #

    mattleech

    I tried your code after looking everywhere and trying every fix I could find for multiple image attachment problem in postie. Even with a fresh install of WP and Postie, everything works fine except when i add more than one image to an email, it will not post.

    The issue i have with your code is once i replace the original with yours I get an error at line 1823 $value = '[gallery]'; and tells me there is wrong syntax. Iv tried several times making sure i was only replacing the code i was supposed to and i always get that error at that line. Is there something Im missing?

    Thanks

  6. mattleech
    Member
    Posted 3 years ago #

    @3rdaxis, that's very strange as my modifications are all after that point in the processing. Here's my entire ReplaceImagePlaceHolders function for you to copy and paste, let me know if you still have the problem after trying this:

    [Code moderated as per the Forum Rules. Please use the pastebin]

  7. 3rdaxis
    Member
    Posted 3 years ago #

    @mattleech thanks for the quick reply. This time around though im getting this error Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /home/content/w/i/l/wildcatfan42/html/wordpress/wp-content/plugins/postie/postie-functions.php on line 1819

    Its halting from the first line of the modified code. function ReplaceImagePlaceHolders(&$content,$attachments, $config) {

    Is there a specific template your using for the images?

    Thanks

  8. 3rdaxis
    Member
    Posted 3 years ago #

    @mattleech I found a solution to the multiple image problem. Under settings > Media I set the Large size way up and now there is no issue with the original postie code. After not being able to use your code, i started to think about what would cause it to fail and sent a bunch of very small pictures which all posted just fine, so it was not the number of pics, So I figured it must be the size.

    Thanks for your help though. Messing with your code is what got me thinking on the solution to my problem.

  9. mattleech
    Member
    Posted 3 years ago #

    @3rdaxis, I usually find that "Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE" is caused by a missing ;

    I remember thinking that the problem could be related to file size but I found that sometimes the small images would fail too. Then I ran tests for image dimensions but those results were also inconsistent.

    I hope that keeping the file sizes small continues to work. Let me know if the problem arises again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic