$qa_content['q_view'] = qa_page_q_question_view($question, $parentquestion, $closepost, $usershtml, $formrequested);
    $qa_content['title'] = $qa_content['q_view']['title'];
    $qa_content['description'] = qa_html(qa_shorten_string_line(qa_viewer_text($question['content'], $question['format']), 150));
    $categorykeyword = @$categories[$question['categoryid']]['title'];
    $qa_content['keywords'] = qa_html(implode(',', array_merge(qa_using_categories() && strlen($categorykeyword) ? array($categorykeyword) : array(), qa_tagstring_to_tags($question['tags']))));
    // as far as I know, META keywords have zero effect on search rankings or listings, but many people have asked for this
}
$microdata = qa_opt('use_microdata');
if ($microdata) {
    $qa_content['head_lines'][] = '<meta itemprop="name" content="' . qa_html($qa_content['q_view']['raw']['title']) . '">';
    $qa_content['html_tags'] = ' itemscope itemtype="http://schema.org/QAPage"';
    $qa_content['main_tags'] = ' itemscope itemtype="http://schema.org/Question"';
}
//	Prepare content for an answer being edited (if any) or to be added
if ($formtype == 'a_edit') {
    $qa_content['a_form'] = qa_page_q_edit_a_form($qa_content, 'a' . $formpostid, $answers[$formpostid], $question, $answers, $commentsfollows, @$aeditin[$formpostid], @$aediterrors[$formpostid]);
    $qa_content['a_form']['c_list'] = qa_page_q_comment_follow_list($question, $answers[$formpostid], $commentsfollows, true, $usershtml, $formrequested, $formpostid);
    $jumptoanchor = 'a' . $formpostid;
} elseif ($formtype == 'a_add' || $question['answerbutton'] && !$formrequested) {
    $qa_content['a_form'] = qa_page_q_add_a_form($qa_content, 'anew', $captchareason, $question, @$anewin, @$anewerrors, $formtype == 'a_add', $formrequested);
    if ($formrequested) {
        $jumptoanchor = 'anew';
    } elseif ($formtype == 'a_add') {
        $qa_content['script_onloads'][] = array("qa_element_revealed=document.getElementById('anew');");
    }
}
//	Prepare content for comments on the question, plus add or edit comment forms
if ($formtype == 'q_close') {
    $qa_content['q_view']['c_form'] = qa_page_q_close_q_form($qa_content, $question, 'close', @$closein, @$closeerrors);
    $jumptoanchor = 'close';
} elseif ($formtype == 'c_add' && $formpostid == $questionid || $question['commentbutton'] && !$formrequested) {
            // don't show if shown by default
            $qa_content['q_view']['form']['buttons']['answer'] = array('tags' => 'NAME="doanswerq"', 'label' => qa_lang_html('question/answer_button'), 'popup' => qa_lang_html('question/answer_q_popup'));
        }
        if ($question['commentbutton']) {
            $qa_content['q_view']['form']['buttons']['comment'] = array('tags' => 'NAME="docommentq"', 'label' => qa_lang_html('question/comment_button'), 'popup' => qa_lang_html('question/comment_q_popup'));
        }
    }
    //	Information about the question of the answer that this question follows on from (or a question directly)
    if (isset($parentquestion)) {
        $parentquestion['title'] = qa_block_words_replace($parentquestion['title'], qa_get_block_words_preg());
        $qa_content['q_view']['follows'] = array('label' => qa_lang_html($question['parentid'] == $parentquestion['postid'] ? 'question/follows_q' : 'question/follows_a'), 'title' => qa_html($parentquestion['title']), 'url' => qa_path_html(qa_q_request($parentquestion['postid'], $parentquestion['title']), null, null, null, $question['parentid'] == $parentquestion['postid'] ? null : qa_anchor('A', $question['parentid'])));
    }
}
//	Prepare content for an answer being edited (if any)
if ($formtype == 'a_edit') {
    $qa_content['q_view']['a_form'] = qa_page_q_edit_a_form($formpostid);
}
//	Prepare content for comments on the question, plus add or edit comment forms
$qa_content['q_view']['c_list'] = qa_page_q_comment_follow_list($question);
// ...for viewing
if ($formtype == 'c_add' && $formpostid == $questionid) {
    // ...to be added
    $qa_content['q_view']['c_form'] = qa_page_q_add_c_form(null);
} elseif ($formtype == 'c_edit' && @$commentsfollows[$formpostid]['parentid'] == $questionid) {
    // ...being edited
    $qa_content['q_view']['c_form'] = qa_page_q_edit_c_form($formpostid, null);
}
//	Prepare content for existing answers
$qa_content['a_list']['as'] = array();
if (qa_opt('sort_answers_by') == 'votes') {
    foreach ($answers as $answerid => $answer) {