Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
906 views
in Q2A Core by
If it is possible, how could one avoid sending the content of the answers or comments ? So that a user only receives the information that there is an answer to his question together with the link to the site ?

I want to use it that way, to make the users coming back to read the answer or comment on the site.

1 Answer

+2 votes
by
Ok, I figured it out myself. If someone is interested:

In the folder: include there is a file: qa-lang-emails.php where all the email text is located. You can change everything but not the parts with the ^ symbols. These are placeholders for the script. You still can take them off if You need to.

For example if You want to change the message text regarding a new answer and just show a link to the answer You need to get rid of : \n\n^open^a_content^close\n\n:

'q_answered_body' => "Your question on ^site_title has just been answered:\n\n^open^a_content^close\n\nYour question was:\n\n^open^q_title^close\n\nIf you like this answer, you may select it as the best:\n\n^url\n\nThank you,\n\n^site_title",

and change it for example to:

'q_answered_body' => "Your question\n\n^open^q_title^close\n\non ^site_title has just been answered. Please see here:\n\n^url\n\nThank you,\n\n^site_title",

Output would be now without the answer text, but still with the link to the site where the user can read the answer and visit that way Your site again. Good for the adsense users as well.

Regards
monk333
by
You're mostly right about this, but might be better off creating your own pseudo language file (see advanced documentation on translating Q2A) that contains these changes, so that you can easily upgrade Q2A's core files in future without having to reapply your change. You only need to include the phrases you want changed.
by
Yes, done, one easily could forget these changes until the next update and they would be gone as these files are overwritten. Thank You so far.
One detail I would be happy to change still: The link in this case has an ID anchor and jumps to the answer, this is logic so far. But to familiarize especially new users with the site, the menue and so on, I would like to jump to the top of the page instead. Is this easily possible to achieve ?

Thanks and best regards

monk333
by
Yes - look at the qa_answer_create(...) function in qa-app-post-create.php and change the qa_anchor('A', $postid) code fragment to null instead.
by
Done, works perfectly, thanks !
...