Ask Your Question
1

Best way to provide feedback on user actions?

asked 2012-07-27 21:13:26 -0500

theactiveactor gravatar image theactiveactor
147 7 2 6

I want to display a status message notifying the user the result of an action (e.g. question posted). Does AskBot have a built-in mechanism to achieve this?

delete close flag offensive retag edit

Comments

What do you mean by "status message"? Are you talking about the banner that appears at the top of the page when you receive a badge?

todofixthis ( 2012-07-28 10:38:11 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-07-28 12:16:26 -0500

Evgeny gravatar image Evgeny flag of Chile
10994 50 84 182
http://askbot.org/

updated 2012-07-28 12:20:56 -0500

From Python can be done this way:

request.user.message_set.create(message=_('You did it!'))

From javascript:

notify.show(gettext('You did it')); //will hang until deleted or the page reloaded
notify.show(gettext('Yeah'), true); //in this case message will flash and fade out

The fade-out effect will be available in the future release, probably 0.7.45.

Caveats - (1) we'll have to switch to using another method of messaging, because this one will be removed from the future Django releases; (2) javascript API can change in the future.

A separate question is - which messages you'd want to show and in what circumstances...

Encouraging messages are great, but should not be shown way too often.

link publish delete flag offensive edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-07-27 21:13:26 -0500

Seen: 33 times

Last updated: Jul 28 '12