Sergey Korovin
asked 9 years ago

Situation:
1. Unregistered “Question author” wants to ask a question using “ask new question” form on the page.
2. Unregistered “Question author” types his question, name and e-mail adress.
3. Another Registered user (in my situation – Admin) answers the question of Answer_author.
4. “Question author” does not reseive any e-mail notifications. So, “Question author” has no way to recognize, that someone answered his question.

Question 1:
How can I let “Question author” know about answers and comments on his question?

Question 2:
How can I give a possibility to new Unregistered user become Registered user?

3 Answers
DominicStaff
answered 9 years ago

1/ You can anable the email notification in the Dashboard > Question > Settings > Email tabs.
2/ At the moment, we have disable temporary this option in the latest version. If you want to display the login/register link in the single question, you can open the single-question.php file in the templates folder and add the following code under line 2.

<?php
if ( dwqa_current_user_can( 'post_answer' ) ) {

dwqa_load_template( 'answer', 'submit-form' );

} else { ?>

<?php if ( is_user_logged_in() ) { ?>

<div class="alert"><?php _e( 'You do not have permission to submit answer.','dwqa' ) ?>

<?php } else { ?>

<h3 class="dwqa-title">

<?php

printf( '%1$s <a href="%2$s" title="%3$s">%3$s %4$s', **( 'Please login or', 'dwqa' ), wp_registration_url(), **( 'Register', 'dwqa' ), __( 'to Submit Answer', 'dwqa' ) );

?>

<div class="login-box">

<?php wp_login_form( array( 'redirect' => get_post_permalink( $question_id ) ) ); ?>

<?php

}

}

?>
Sergey Korovin
replied 9 years ago

Dominic, thank you very much for your answer!

Regarding question 1, I want to say that all the notifications in the Dashboard > Question > Settings > Email tabs are enebled – all the checkboxes are marked. But still the unregistered “Question author” does not receive any notifications on his e-mail that he typed together with his question.

Actually my target is to let all the users discuss all the questions.
To reach this target I need:
a/ All questions, answers and comments must be signed with User Name (not “unknown user”, but “Alexander”, “John”, “Bill” etc.). That’s why I asked about registration form.
b/ “Question author” must reseive e-mail notifications, when someone answers his question.
c/ Any user who is interested in this disqussion must have possibility to subscribe for other answers (this function exist as far as I see).

May be there is an easy way to reach my target?
Thanks for helping.

Sergey Korovin
answered 9 years ago

By the way,

the single question page with inserted code you gave to me

makes single question page return "code 500".

DominicStaff
answered 9 years ago

About the notification, you need to install the wpMandrill or WP Mail SMTP to allow send the email. and add the code under line 20. If you still get the 500 errror, please send me username & password of your site for further checking.

Powered by DW Question & Answer Pro