Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
7.3k views
in Q2A Core by
I want to show  content below the related questions title on sidebar ... is it possible???

thank you very much
Q2A version: 1.6
by
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.
by
nobody knows?????

2 Answers

0 votes
by
edited by
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.
by
do i need to add this code in qa-widget-related.php???
by
the problem with this is when you have an image on the question body, it outputs nothing but Blob id. any idea how to resolve it ?
by
İf you can show the content could send to me your codes maybe i can fix your problem
by
edited by
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
by
edited by

$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

by
moved by
I really need this someone help to me pls
...