• Resolved increatives

    (@increatives)


    Hi, i sent you an email a couple of days with no response.

    I’m using yop poll in a small website, where there is a q&a vote poll.
    Everytime a user votes, an email is sent to the admin with the answer, but i need to include the actual total results aswell.

    Is this possible?
    Thanks in advance,
    Ivan

    https://www.ads-software.com/plugins/yop-poll/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author YOP

    (@yourownprogrammer)

    Hello

    Edit models/abstract_model.php and after

    $body = str_replace('%VOTE_DATE%', current_time('mysql'), $body);

    and this line

    $body = str_replace( '%POLL_TOTAL_VOTES%', $this->poll_total_votes , $body );

    Also, edit js/yop-poll-general-options.js

    and replace this line

    words: ['%VOTE_DATE%', '%POLL_NAME%','%WP_USERNAME%','%WP_FIRST_NAME%','%WP_LAST_NAME%', '[ QUESTION ] ','[/QUESTION]', '[ ANSWERS ]', ' %ANSWER_VALUE%', '[/ANSWERS]','[ CUSTOM_FIELDS ]','%CUSTOM_FIELD_NAME%','%CUSTOM_FIELD_VALUE%','[/CUSTOM_FIELDS]'],

    with this one

    words: ['%VOTE_DATE%', '%POLL_NAME%','%POLL_TOTAL_VOTES%','%WP_USERNAME%','%WP_FIRST_NAME%','%WP_LAST_NAME%', '[ QUESTION ] ','[/QUESTION]', '[ ANSWERS ]', ' %ANSWER_VALUE%', '[/ANSWERS]','[ CUSTOM_FIELDS ]','%CUSTOM_FIELD_NAME%','%CUSTOM_FIELD_VALUE%','[/CUSTOM_FIELDS]'],

    Finally, you can use %POLL_TOTAL_VOTES% tag in the notification message.

    Best
    YOP Team

    benchmarkgraphics

    (@benchmarkgraphics)

    Hello,

    Thanks for this fix, but won’t it have to be repeated after every time the plugin is updated?

    Thanks,

    Benchmark Team

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[urgent]Display results in email to Admin’ is closed to new replies.