Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+9 votes
1.1k views
in Q2A Core by
How to display "More information for your question" when someone mouse over question?

2 Answers

+2 votes
by
edited by
 
Best answer
Great question! There are two things that need to be done here.

First, in qa_post_html_fields(...) in qa-app-format.php, insert these lines:

elseif (strlen($post['content']))
    $fields['title']='<SPAN TITLE="'.qa_html($post['content']).'">'.$fields['title'].'</SPAN>';

... after ...

if ($microformats)
    $fields['title']='<SPAN CLASS="entry-title">'.$fields['title'].'</SPAN>';

Second, you need to ensure that more full information about the posts is retrieved from the database wherever you show a question list. You can do this on an individual basis by making sure that the $full parameter is set to true whenever an appropriate function from qa-db-selects.php is called.

Or you can just take a shortcut and change qa_db_posts_basic_selectspec(...) in qa-db-selects.php - where it says:

if ($full) {

... you can replace with...

if (true) {

Please note that this will mean more information is being retrieved from the database, but it shouldn't make a meaningful speed difference.
by
It is working fine. is it possible to add this as a optional feature?
by
Great feature would be great to add in next 1.3 q2a version. Or maybe it's possible to add code to qa-theme.php ? becouse after update i will loose this code.
by
This trick is not working proper in Version 1.3.

In the mouse over comment along with the question, appears the html tags.

The user is not able to read the question as it shows the html tags also.

Find the screenshot here

http://www.urappointed.com/err.jpg
0 votes
by
This is works, thanks, but the sentence which is longer than 1 line, I can see the: <p></p>, <a href= etc. html codes.....

How can get rid of them?
Q&A 1.5

Thanks
...