Ask Your Question

Custom reputation e.g. karma, badges

asked 2015-04-25 05:45:50 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

On my AskBot site, can I (without local patches to the code) customise the badges automatically awarded to users, the karma awarded or required for various events and actions, etc.?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2015-08-10 23:42:41 -0500

Evgeny gravatar image

updated 2015-08-10 23:50:23 -0500

It is true that existing badges cannot be renamed without either implementing a (quite simple) feature to allow that or to patch the code.

However additional custom badges can be added by creating corresponding module and registering with Askbot with a setting (a very basic example, real implementation is more involved):

ASKBOT_CUSTOM_BADGES = 'myproject.badges.BADGES'

And the file myproject/ could contain the following:

from askbot.models.badges import Commentator
class CommentStar(Commentator):
    #identical to commentator
    #how to implement badges read file askbot/models/

#the dictionary below links "askbot events" (not the same as django signals) with badges.
#to learn about the supported events see askbot/models/
    'post_comment': (CommentStar,), #when post is commented, badge CommentStar may be given
edit flag offensive delete link more

answered 2015-08-10 18:39:18 -0500

nongratis gravatar image

The badge names are tied up in the askbot library, and so cannot be changed without local patches. However, If you are an admin, it is possible to set the numerical variables associated with badge (required karma, number of votes, etcetera). These settings are in the subsections under Settings > Reputation, Badges, Votes & Flags.

This is using the standard site build using the latest ASKBOT repo version.

edit flag offensive delete link more

answered 2015-08-07 09:11:22 -0500

dharrah gravatar image

updated 2015-08-07 11:27:27 -0500

I asked the same thing just recently and got this response from Evgeny:

If you would like to modify badge names, this is possible to implement via a consulting agreement and perhaps custom hosting for your company.

I also know that there are two levels for custom managed hosting. One option is a shared host with a small (3-5) number of corporate customers and the second option would be a dedicated IP. Both allow custom themes and custom authentication. Development work is also available. Contact AskBot for exact costs.

I do know that if you host your own AskBot implementation, you can freely customize the badges. However, when I try to do that on my own site, I get an error (which I've posted in the forum) referring to a 'KeyError'. Still no response to that yet.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2015-04-25 05:45:50 -0500

Seen: 2,835 times

Last updated: Aug 10 '15