Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

how can I show the question content below the related questions title

0 votes
7,215 views
asked Apr 13, 2014 in Q2A Core by Korkut
I want to show  content below the related questions title on sidebar ... is it possible???

thank you very much
Q2A version: 1.6
commented Apr 14, 2014 by jatin.soni
This is little difficult by modifying the widget. Because the query (function) doesn't have content key in array. Also any of the function doesn't allow to overriding it. So best way to do is writing own widget plugin.
commented Apr 22, 2014 by aydcery
nobody knows?????

2 Answers

0 votes
answered Apr 14, 2014 by QA-Themes
edited Apr 15, 2014 by QA-Themes
I wrote a code for creating excerpts for question lists, you can change it to apply it to related questions.

code: https://github.com/Towhidn/Q2A-Esteem-Theme/blob/master/esteem-theme/qa-admin-options.php#L15

in line 15, function starts. it reads question IDs from list and get's their content in one query. then adds it to question list array.

you will need to add this code to doctype() function, find list of related questions in $this->content instead of $q_list['qs'] and get excerpts and add them to array. thats all.
commented Apr 23, 2014 by Korkut
İf you can show the content could send to me your codes maybe i can fix your problem
commented Apr 24, 2014 by samlee
edited Apr 24, 2014 by samlee
I am doing it using the mouseover plugin this way :

in qa-mouseover-layer.php

find $q_list['qs'][$index]['title']='<SPAN TITLE="'.qa_html($text).'">'.@$question['title'].'</SPAN>';

and replace it with:
$q_list['qs'][$index]['content']='<p class="q-list-content">'.qa_html($text).'</p>';

there is another method using the q_item_title() function ( please see post : http://www.question2answer.org/qa/11764

In both ways , question image is output as a BlobID=xxxxx

Thank you!
0 votes
answered Apr 15, 2014 by Korkut
edited Aug 13, 2014 by Korkut

$themeobject->output('<LI CLASS="qa-related-q-item"><A HREF="'.qa_q_path_html($question['postid'], $question['title']).'">'.qa_html($question['title']).'</A></LI>');

when I change the 'title' with tags or views its working but 'content' is not working it must be easy to do that

commented Apr 21, 2014 by Korkut
moved Apr 21, 2014 by Scott
I really need this someone help to me pls
...