First time here? Check out the FAQ!
0

Custom reputation e.g. karma, badges

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.?

asked 2015-04-25 05:45:50 -0500
This post is a wiki. Anyone with karma >100 is welcome to improve it.
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

3 Answers

0

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.

nongratis's avatar
1
nongratis
answered 2015-08-10 18:39:18 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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/badges.py could contain the following:

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

#the dictionary below links "askbot events" (not the same as django signals) with badges.
#to learn about the supported events see askbot/models/badges.py
BADGES = {
    'post_comment': (CommentStar,), #when post is commented, badge CommentStar may be given
}
Evgeny's avatar
13.2k
Evgeny
answered 2015-08-10 23:42:41 -0500, updated 2015-08-10 23:50:23 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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.

dharrah's avatar
21
dharrah
answered 2015-08-07 09:11:22 -0500, updated 2015-08-07 11:27:27 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments