Plugin Author
YOP
(@yourownprogrammer)
Hi systus232,
In the email body, replace every occurrence of %xyz% with [xyz] (for example, replace %VOTE_DATE% with [ VOTE_DATE]).
Let us know if you need more help.
Regards,
YOP Team
Hi Yop,
thanks that’s better, If I have a registered user what are the values I should add? I need their email adress and last_name?
Thanks and regards
Plugin Author
YOP
(@yourownprogrammer)
Hey systus232,
Edit yop_poll_model.php and in register_vote function, after
$body = str_replace( '[POLL_NAME]', $this->poll['name'], $poll_options['email_notifications_body'] );
add
$user_info = get_userdata($voter['user_id']);
$body = str_replace( '[EMAIL_USER]', $user_info->user_email , $body );
$body = str_replace( '[NAME_USER]', $user_info->user_lastname , $body );
Next, edit the poll and in Notifications Body: add the tags [EMAIL_USER] and [NAME_USER]
Best wishes,
YOP Team
Hi,
I have add the lines
$body = str_replace( ‘[POLL_NAME]’, $this->poll[‘name’], $poll_options[’email_notifications_body’] );
$user_info = get_userdata($voter[‘user_id’]);
$body = str_replace( ‘[EMAIL_USER]’, $user_info->user_email , $body );
$body = str_replace( ‘[NAME_USER]’, $user_info->user_lastname , $body );
$body = str_replace( ‘[QUESTION]’, $this->poll[‘question’], $body );
And into the Yop Poll
<p>Un nouveau vote [VOTE_DATE] pour [POLL_NAME]</p>
<p>Details:</p>
[QUESTION]
<p><b>Réponse:</b>
[ANSWERS]
</p>
<p><b>VoteID:</b>
[VOTE_ID]</p>
[EMAIL_USER] and [NAME_USER]
But I get
Details:
Votez pour le thème que vous voulez voir créé par Hypnose Attitude.
Réponse:
Prendre confiance
VoteID:
vote_id_54108f39629f2
[EMAIL_USER] and [NAME_USER]
Where is my mistake?
Regards
Plugin Author
YOP
(@yourownprogrammer)
Hey systus232,
After
$body = str_replace( '[POLL_NAME]', $this->poll['name'], $poll_options['email_notifications_body'] );
add
$user_info = get_userdata($voter['user_id']);
$body = str_replace( '[EMAIL_USER]', $user_info->user_email , $body );
$body = str_replace( '[NAME_USER]', $user_info->user_lastname , $body );
Let us know if you need more help.
Regards,
YOP Team
Hi,
I finally right place above code 🙂
But please, insert it directly into the official version to another update came.
Thank you very much