First time here? Check out the FAQ!
1

print a question list

I am looking for a Q&A system to use in our organization to manage a list of proposal. While they are not technically "questions", the voting, comment and tagging system is great and fits exactly our needs.

However, there's one more feature that we would need and that all Q&A systems seem to lack: the possibility to obtain a page containing the text (not the title, but the full text without comments) of the items matching a search query/tags. This would be great especially for skimming through the list of questions and seeing if something has been asked already. It would be great for printing and offline viewing, too.

Does Askbot have anything similar? Is there any hope that this could be implemented in the near future?

Federico Poloni's avatar
95
Federico Poloni
asked 2010-08-17 09:43:05 -0500
edit flag offensive 0 remove flag close merge delete

Comments

btw, check out - we've just migrated http://asksci.com/questions/ from stackexchange:)
Evgeny's avatar Evgeny (2010-08-17 10:14:14 -0500) edit
add a comment see more comments

2 Answers

1

Hi Federico,

Is this something you want to completely replace the search results as shown now? It is very easy to make happen - I'm just trying to understand what parts of UI would need an adjustment.

I've just asked a follow-up question :).

Thanks.

Evgeny's avatar
13.2k
Evgeny
updated 2010-08-17 10:10:56 -0500, answered 2010-08-17 10:04:35 -0500
edit flag offensive 0 remove flag delete link

Comments

No, actually the best thing for me would be if the search stayed the same, and there were a small link somewhere saying like "show all the texts of the matching questions". So one can have the normal search behavior, plus the possibility to show their texts as well on request.
Federico Poloni's avatar Federico Poloni (2010-08-17 12:36:00 -0500) edit
The new "search results with their texts expanded" page could also be a simple static page (i.e. without any javascript at all). I'll reply to the other thread too, thanks for your consideration!
Federico Poloni's avatar Federico Poloni (2010-08-17 12:36:05 -0500) edit
I see in http://qa.nmrwiki.org/ the beginning of the text of each question is reported in the default view. This looks already very similar to what I'd like to have. How is it achieved starting from a default install? Can one configure the number of characters displayed?
Federico Poloni's avatar Federico Poloni (2010-08-18 06:23:21 -0500) edit
on that site question.summary field is shown right under the title, you probably want question.html field instead. This can be modified in template /askbot/skins/default/templates/questions.html.
Evgeny's avatar Evgeny (2010-08-18 11:19:42 -0500) edit
add a comment see more comments
1

Federico, looks like you'll need to modify skin template askbot/skins/default/templates/questions.html

<h2><a title="{{question.summary}}" 
    href="{% url question id=question.id%}{{question.title|slugify}}">
    {{question.title}}</a></h2>

to something like:

<h2>
    <a href="{% url question id=question.id %}">
        Problem {{question.id}}: {{question.title}}
    </a>
</h2>
<div class="question-body">{{question.html|safe}}</div>

The main thing is to display .html field of the question object and pass it through safe filter.

note: if you do not yet use git - it's a very good idea to start since it helps a great deal in maintaining forked code in sync with the updates of the parent project. Use

git clone http://github.com/ASKBOT/askbot-devel.git math_problems

Then stick to using the math_problems (or however you call it) repository. If you move files around, remember to use git mv instead of plain unix mv. This mistake cost me a lot of wasted time before.

In addition

Possibly you might want to modify search to restrict searching in question body only. That lives in the function askbot.models.question.QuestionManager.run_advanced_search - that would be a two-liner change.

Other than that - you'll need to change locale messages. For example - edit msgstr strings in file /askbot/locale/en/LC_MESSAGES/django.po. It is much better than extensively changing messages in the template files directly, because that way chances are you won't have to even touch many templates.

You can also create your own special locale:

cp -r askbot/locale/en askbot/locale/math

and in settings.py use

LANGUAGE_CODE='math'

Then take a look at the Django localization manual.

One last bit of localization (with javascript string translations) lies in the file:

askbot/skins/default/media/js/com.cnprog.i18n.js
Evgeny's avatar
13.2k
Evgeny
updated 2010-08-18 13:59:44 -0500, answered 2010-08-18 11:26:43 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks a lot. I'll let you know how everything goes --- though probably it's going to take some time, since we are moving to a new server right now. If we do adopt Askbot, I will surely try and contribute an Italian i18n back to the project. :)
Federico Poloni's avatar Federico Poloni (2010-08-18 13:01:53 -0500) edit
great, if you need help with the initial setup - please don't hesitate to ask. I can do it in a few minutes including the server configuration, if needed.
Evgeny's avatar Evgeny (2010-08-18 13:51:06 -0500) edit
add a comment see more comments