• Resolved Fred17

    (@f14m07)


    Hi Franky
    I use the hook template from the documentation: add_action(’emefs_submit_event_action’,’eme_mail_event’);

    I try to add in the email the image of the event location using the shortcode #_LOCATIONIMAGETHUMB

    But this shortcode seems to be ignored. Is there a solution?
    Frédéric

    PS:The other forum at e-dynamics send me a 403 access forbiden as I send my request?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Franky

    (@liedekef)

    Have you activated the sending of html messages? Because if not, this placeholder (not shortcode) will return empty.
    Next to that: I don’t think you can specify your location image using emefs

    Thread Starter Fred17

    (@f14m07)

    Yes, sending html messages is activated. Perhaps a limitation of the $body variable whitch is only text?

    Plugin Author Franky

    (@liedekef)

    It depends on your function definition of eme_mail_event(): you need to do all the replacements yourself there (if you want to start including placeholders).
    So if you need that placeholder to be replaced by the actual value, you need to call the function eme_replace_event_location_placeholders before sending the mail. Example (where $body contains your email body and extra location placeholders:

    $body = eme_replace_event_location_placeholders ( $body, $event );

    Thread Starter Fred17

    (@f14m07)

    In your exemple here https://www.e-dynamics.be/wordpress/category/documentation/12-hooks-and-filters/
    You already use this function : $body=eme_replace_placeholders($body_format, $event, “text”);
    so I thought all placeholder types were replaced. Can I use $body=eme_replace… twice ?

    Thread Starter Fred17

    (@f14m07)

    Thank you Franky for guiding me. I solved my problem by adding a line to the example:
    $body_format=eme_replace_event_location_placeholders ( $body_format, $event );
    before this one
    $body=eme_replace_placeholders($body_format, $event, “text”);

    And the image is in the e-mail.:-)
    Frédéric

    Plugin Author Franky

    (@liedekef)

    Well, I didn’t know the function, so in that case, this would’ve been sufficient too (dropping the “text”:

    $body=eme_replace_placeholders($body_format, $event);

    By default “html” is the preferred format, but in the doc I indeed had “text” for $body. I’ll clarify that.

    • This reply was modified 2 years, 5 months ago by Franky.
    Thread Starter Fred17

    (@f14m07)

    exactly, it’s even simpler

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Insert Image in a hook model of the documentation’ is closed to new replies.