Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.2k views
in Q2A Core by

I read this topic : http://www.question2answer.org/qa/50582/show-question-content-on-the-main-page but I can not figure out what I need to insert into the qa-theme.php file

Q2A version: 1.7.4

2 Answers

+1 vote
by

If you want to populate the question lists with question content (in addition to question title) you can use this plugin.

https://github.com/arjunsuresh/qlistdesc

by
the plugin needs some modifications. First, DESC appear in the same class (<div class="qa-q-item-title">). The content should be shown in its own class (<div class="q-content">)
by
+1
This is not working @arjunsuresh .
by
+2
Can you please fix the issue in your above plugin @arjunsuresh ??
+2 votes
by

to separate TITLE and CONTENT div classes. Replace entire foreach code with below modified one in @arjunsuresh's plugin layer.php.

foreach ($q_list['qs'] as $index => $question) {

if (isset($postinfo[$question['raw']['postid']])) {

$thispost = $postinfo[$question['raw']['postid']];

$text = qa_viewer_text($thispost['content'], $thispost['format']);

$text = htmlspecialchars(preg_replace('/\s+/', ' ', $text));  // Remove duplicated blanks, new line characters, tabs, etc

//$text = qa_shorten_string_line($text, $maxlength);

if($this->template =='blogs')

$title =  $thispost['title'];

else $title = isset($question['title']) ? $question['title'] : '';

if(strlen($title) < $minlength){

$text = '<div class="q-content">'. qa_substr($text,0,$maxlength).'...</div>';

$q_list['qs'][$index]['title'] = $title;

$q_list['qs'][$index]['content'] = $text;

}

}

}

enjoy... 

by
Çok teşekkür ederim, çok işime yaradı :)
by
There is layer.php there. Could you please verify it again? It's not working on my site.
...