Hello, I insert more scripts to qa-mention-detect.php that allows to send an notification by mail to mentioned user. E-mail is sent without problem but "link to question" not included in mail body.
Here are my script. Could anyone take a look? I really appreciate.
$mention = "INSERT INTO ^mentions (to_id, from_id, question_id, post_id, post_type, date)
VALUES (#, #, #, #, $, #)";
$mention = qa_db_query_sub($mention, $value, $from, $questionid, $postid, strtoupper($type[0]), time());
//--* modified code from here:
$question = qa_db_single_select(qa_db_full_post_selectspec(null, $postid));
$user = qa_db_single_select(qa_db_user_account_selectspec($value, true));
$handle = qa_get_logged_in_handle();
$subject = isset($handle)?$handle." ".qa_lang_html('addon/mentioned_you')
:qa_lang('main/anonymous')." ".qa_lang_html('addon/mentioned_you');
$sub = array( '^q_handle' => $user["handle"],
'^q_title' => $question["title"],
'^q_content' => $question["content"],
'^url' => qa_path(qa_q_request($postid, $question["title"]), null, qa_opt('site_url'))
);
qa_send_notification(null,
$user["email"],
null,
$subject,
"Hello, ".$user["handle"]."!\n\n".$subject,
$sub);