I will deal in layer.
function main_parts($content) {
if($this->template == 'ask') {
if(isset($content['form']['fields']['content']['value'])) {
$value = &$content['form']['fields']['content']['value'];
if(empty($value)) {
if(qa_opt('editor_for_qs') == '')
$value = 'Hi'.PHP_EOL.PHP_EOL.'[your question]';
else
$value = '<p>Hi</p><p>[your question]</p>';
}
}
} else if($this->template == 'question') {
if(isset($content['a_form']['fields']['content']['value'])) {
$value = &$content['a_form']['fields']['content']['value'];
if(empty($value))
if(qa_opt('editor_for_as') == '')
$value = 'Hi'.PHP_EOL.PHP_EOL.'[your answer]';
else
$value = '<p>Hi</p><p>[your answer]</p>';
}
if(isset($content['q_view']['c_form']['fields']['content']['value'])) {
$value = &$content['q_view']['c_form']['fields']['content']['value'];
if(empty($value))
if(qa_opt('editor_for_cs') == '')
$value = '[your comment]';
else
$value = '<p>[your comment]</p>';
}
if(isset($content['a_list']['as'])) {
$as = &$content['a_list']['as'];
if(is_array($as)) {
foreach($as as $key=>$a) {
if(isset($as[$key]['c_form']['fields']['content']['value'])) {
$value = &$as[$key]['c_form']['fields']['content']['value'];
if(empty($value))
if(qa_opt('editor_for_cs') == '')
$value = '[your comment]';
else
$value = '<p>[your comment]</p>';
}
}
}
}
}
qa_html_theme_base::main_parts($content);
}