Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • I’m no expert, just a recent installer of this plug-in. I don’t work with the developer, but here’s some feedback. Although there needs to be better documentation and there are a couple of bugs that make it harder to use than needed (e.g., changing from a single photo to video doesn’t have a way to change back). THAT SAID, the plug-in does work wonderfully for me which is showing a single 360-pano on a web page with a few controls. My rating would be closer to 4 stars. Not arguing with septagon, just thinking it may be dependent on whether it meets your needs.

    I just did an update to 3.57 and I’m having lots of problems throughout my site. This is the error message that I get (even when I’m not playing with any PopUps):

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function sgpb\Actions::deletePopup(), 1 passed in /homepages/24/d136456346/htdocs/vasupportcalctest/wp-includes/class-wp-hook.php on line 290 and exactly 3 expected in /homepages/24/d136456346/htdocs/vasupportcalctest/wp-content/plugins/popup-builder/com/classes/Actions.php:64 Stack trace: #0 /homepages/24/d136456346/htdocs/vasupportcalctest/wp-includes/class-wp-hook.php(290): sgpb\Actions->deletePopup(‘publish’) #1 /homepages/24/d136456346/htdocs/vasupportcalctest/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array) #2 /homepages/24/d136456346/htdocs/vasupportcalctest/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #3 /homepages/24/d136456346/htdocs/vasupportcalctest/wp-includes/post.php(4620): do_action(‘transition_post…’, ‘publish’, ‘publish’, Object(WP_Post)) #4 /homepages/24/d136456346/htdocs/vasupportcalctest/wp-includes/post.php(4021): wp_transition_post_status(‘publish’, ‘publish’, Object(WP_Post)) #5 /homepages/24/d13645634 in /homepages/24/d136456346/htdocs/vasupportcalctest/wp-content/plugins/popup-builder/com/classes/Actions.php on line 64

    Please help ASAP! I had hoped to do an update of my website on Christmas Day when there were no users using it. Instead, it’s broken!

    Try:

    $newcontent = “<p>Sent from: ” . $from . “<br></p>”. $content;

    sorry, typo…

    //One very simple example might be:
    $newcontent = $from . $content; //’from’ (not ‘fom’)

    I’m not sure what you’re doing with the my_postie_post_function, so we’ll ignore that. I hope this helps:

    add_filter(‘postie_post_before’, ‘my_postie_post_before’, 10, 2);
    function my_postie_post_before($post,$headers) {
    $from = $headers[‘from’][‘mailbox’] . ‘@’ . $headers[‘from’][‘host’];
    // you also might want to do something with $headers[‘from’][‘personal’];
    $content = $post[‘post_content’];

    //This is where you would do all your manipulation
    //One very simple example might be:
    $newcontent = $fom . $content;

    //Then put it back in $post and you’re done
    $post[‘post_content’] = $newcontent;
    return $post;
    }

    I just went through something like this. I did it the very hard way and then, after some great feedback from the developer, did it a much easier way.

    My advice is DON’T add the information until you get to the “postie_post_before” filter. The initial documentation I read only had one input to your filter: $post. So I did a lot of manipulation with “postie_post_pre” where the same documentation said you have access to $email. I pulled the “from” header information and then added it to the content of the email for later processing with my filter for “postie_post_before”. Somewhere along the way before it got to “postie_post_before”, the email addresses became HTML and was way more complicated to parse.

    BUT as the developer pointed out, other (newer?) documentation for “postie_post_before” shows that you have access not only to $post, but to $email as well. So you can get the from information out of $headers[‘from’][‘mailbox’], $headers[‘from’][‘host’] and $headers[‘from’][‘personal’]. It’s very clean and can be added to $post[‘post_content’] wherever you want it.

    This is the documentation that describes calling your filter with both parameters: https://postieplugin.com/postie_post_before/. Not sure how I missed it, but there it was.

    Hope something in that helps.

    Thread Starter dburk

    (@dburk)

    I’m not sure what documentation I was reading before about postie_post_before, but I didn’t see that $headers was available to my postie_post_before filter. That simplifies things a great deal if I’m getting that right.

    Am I reading the documentation correctly that the data structure for what’s in $headers matches what was available in $email[header]….? So that $headers[‘to’][0][‘mailbox’] would give the same information here as $email[‘header’][‘to’][0][‘mailbox’] gives in the filter for postie_post_pre? Simplifies a lot if that’s right!

    (Just gave a well-deserved review…you’ve got quite the fan club!)

    Thread Starter dburk

    (@dburk)

    I may be pushing my luck and I’ll understand if you send me packing, but now that I have the “sender”‘s information, I want to be able to use that to:

    1) check the ‘mailbox’ against the list of WordPress’s categories and see if it exists and
    2) check it against the list of WordPress’s users and see if it exists and
    3) create a new WordPress category and/or user based on the “mailbox” depending on a whole lot of other things.

    Is any of that functionality available while Postie is doing its processing? I’d prefer being able to do it in my fix_title_and_content filter [add_filter(‘postie_post_before’, ‘fix_title_and_content’); ] but I couldn’t even use the “get_the_category_list();” function within my Postie filter.

    Again, thanks so much for your speedy response to the questions and your help.

    Thread Starter dburk

    (@dburk)

    Again, thanks so much!

    Thread Starter dburk

    (@dburk)

    Thanks for such a fast response! Of course that solved it.

    Since I have you, is there a way at any point in the processing to stop Postie from actually doing to post?

    Thread Starter dburk

    (@dburk)

    UPDATE: This is NOT a Postie issue at all! I was able to check the character sequence and it looks like there are “<br />” followed by a linefeed (ordinal=10). It seems that it’s WordPress that is taking the liberty to make those changes. Not sure where to address that but it doesn’t seem to be with this plugin.

    Thread Starter dburk

    (@dburk)

    Thanks for the response. I understand using the postie_post_before to modify the post. What I’m trying to get to is the full content of the email itself before it gets put into the fields of the post. Is there a way to get to the email itself and either modify it or modify the post based on information in the email that is not being used by Postie in the $post?

    I hope my question is making sense.

    Thank you very much!
    Danny

    Thread Starter dburk

    (@dburk)

    EDIT: I’m probably wrong about $email being the structure I’m looking for. I suspect $email is not the entire raw email information but just one of the fields parsed out of $email. Not sure what other elements are parsed out of the email text. Wondering if I’m going to have to parse the fields I need out of the full content. So I’m either looking for all fields that might be available from the parsing (including what was in the “From” field before Postie shortened it), OR I need to know where to get at the full text of the email so I can change it before Postie does anything with it.

    I hope I’m making any kind of sense with my question. Thank you again.

Viewing 13 replies - 1 through 13 (of 13 total)