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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
asked 10 years ago
This post is a wiki. Anyone with karma >100 is welcome to improve it.

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
nongratis's avatar
1
nongratis
answered 9 years ago
link

Comments

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
}

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 9 years ago, updated 9 years ago
link

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
dharrah's avatar
21
dharrah
answered 9 years ago, updated 9 years ago
link

Comments

see more comments