• Resolved oxygensmith

    (@oxygensmith)


    Hi there SpeakOut,

    I’m just implementing a signature-by-signature email confirmation process on our website. I’d like to do a couple of modifications to the confirmation email. So far, I see that there isn’t an interface for this.

    It looks like I can modify the “confirm_message” parameter in the $options array on line 154 in the file includes/install.php. But I still get the default message. Is there anything I can do about this?

    What I’d like to do is:
    – Email the confirmation email as an HTML email that will take bold and italic at least.
    – Change the default confirmation email message to elaborate the reason why they have to click the email, and fix English punctuation.
    – Add the first name to the subject line of the email. e.g. “Rob, thanks for signing our petition.”

    What I’ve changed the confirm_message element’s value to is:
    "confirm_message" => __( "Greetings", "speakout" ) . " %first_name%.\r\n\r\n" . __( "Thank you for signing our petition <b>%petition_title%</b>", "speakout" ). " on our <a href='https://www.soctagon.art/speakout'>Soctagon.art</a> website</a>. To verify your intent to sign, we need you to click the link below, which will confirm your intent to sign. Without clicking on this link, you won't be added to our petition, and the Premier and relevant MLAs will not be notified of your concerns through our system." . __( "Please confirm your email address by clicking or copying and pasting the link below:", "speakout" ) . "\r\n\r\n%confirmation_link%\r\n\r\n<b>If you did not sign this petition</b>, you can safely ignore this email - your name will not be added to it.\r\n\r\nThank you,\r\n<b>" . get_bloginfo( "name" ) . "</b>"

    But yeah, the confirmation still displays the default message.

    The link to the petition on the site is here. (I’m doing this on a test website first where I normally test plugins.)

    https://www.soctagon.art/speakout/

    Thanks so much for your support and we’re sending a donation to you!

    • This topic was modified 4 years, 4 months ago by oxygensmith.
    • This topic was modified 4 years, 4 months ago by oxygensmith. Reason: substitute links in example with dummy links

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author SpeakOut! Steve

    (@123host)

    You are on the right track, but in the wrong place. install.php is, as its name implies, the initial settings when the plugin is installed.

    If you wanted to edit it directly you would have to manipulate the data in wp_options.speakout_options. But that isn’t easy because of the way data is saved, with a character count at the beginning of segments.

    I will look at making that editable in the plugin.

    If I was going to do it before a plugin update, I would edit line 21 in /wp-content/plugins/speakout/includes/class.mail.php where you will find $message = stripslashes( $options['confirm_message'] );.

    I think that will be enough for you to go on.

    Plugin Author SpeakOut! Steve

    (@123host)

    I started working on this and I remembered why I haven’t done this in the past – it would be easy for someone to insert a malicious link or piece of code into the confirmation email.

    Yes, someone with enough motivation could edit the code to do exactly that, but at least I would not be enabling them by making the message editable.

    Your thoughts?

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

The topic ‘Customize confirmaton message – not working?’ is closed to new replies.