Commit Graph

83 Commits

Author SHA1 Message Date
Régis Hanol
f51e3b2131 FIX: should not be able to rename a system badge 2017-02-20 14:35:05 +01:00
Robin Ward
7341b0d03c Don't give notifications to admins for trust level notifications 2017-01-10 12:18:48 -05:00
Sam
35d248ab0d FIX: if badge has an image do not override icon 2016-10-21 10:54:16 +11:00
Régis Hanol
e55e2aff94 FIX: FirstReplyByEmail badge wasn't granted
DEPRECATED: PostProcess badge trigger
2016-08-10 19:24:01 +02:00
Régis Hanol
e97e0bb311 FEATURE: new FirstReplyByEmail bronze badge 2016-06-13 15:37:14 +02:00
James Cook
c0e25b5a9a Replace certain uses of 'gsub' with 'tr' or 'chomp' for a speed
improvement
2016-06-10 22:08:37 -05:00
Robin Ward
0396b14b70
FEATURE: New "First Onebox" badge 2016-04-12 15:31:14 -04:00
Sam
44bf69e3a7 FIX: badges were not localizing correctly
Overrides were not working
2016-04-08 17:52:50 +10:00
Robin Ward
c30d327b77 FEATURE: Two new badges - First Emoji and First Mention 2016-04-05 15:17:41 -04:00
Sam
aae835a42f FIX: all badges got revoked due to ensure consistency query 2016-03-29 23:54:18 +11:00
Sam
418bc4a844 FIX: when ensuring consistency also delete orphan badges 2016-03-29 16:41:03 +11:00
Arpit Jalan
bae836c7c5 FIX: badge display name should be translated from server.en.yml file 2016-03-28 23:59:53 +05:30
Sam
fe51f84aa7 FEATURE: allow admins to enter badge long descriptions
FIX: fallback to description if badge long description is missing

Also moves all badge localization into server.en, this slims the client down

serializers pass down localized names/descriptions/long descriptions
2016-03-28 18:38:57 +11:00
Robin Ward
717b54d64b Adjust badges to match descriptions cc @coding-horror 2016-03-22 10:51:42 -04:00
Robin Ward
1fba835d4f FIX: Use a logging table for daily likes given. Use it for badges. 2016-03-18 11:18:54 -04:00
Robin Ward
d9080b9d69 Rename "My Cup Runneth Over" to "Higher Love". Winwood! 2016-03-17 11:42:41 -04:00
Sam Saffron
14a77aa1e0 FIX: notify on bronze popular link and nice share 2016-03-17 10:33:34 +11:00
Robin Ward
7c384fc740 Adjusted "Gives Back" badge 2016-03-16 13:48:14 -04:00
Robin Ward
35c2339c2a Updated badges for receiving likes 2016-03-16 13:03:17 -04:00
Robin Ward
25c26dcd51 Create rarity levels for using up all likes 2016-03-16 12:31:26 -04:00
Robin Ward
3130dade49 Effectively remove new badges for now 2016-03-15 16:44:42 -04:00
Robin Ward
06591022fe FEATURE: Generous badge 2016-03-15 16:08:29 -04:00
Robin Ward
cfe18c3f5b FEATURE: Gives Back badge 2016-03-15 16:08:29 -04:00
Robin Ward
e60da531ba FEATURE: Admired Badge for high like ratio 2016-03-15 16:08:29 -04:00
Sam
32c681c96b annotate models 2016-02-23 10:33:53 +11:00
Sam
5b16adc0e8 FIX: sharing badges were off by 1 2015-10-13 12:32:29 +11:00
Gerhard Schlager
25e9aa7653 FIX: Use user's locale for badge notifications 2015-09-24 00:33:33 +02:00
Sam
c1ecd6f4ce update annotations 2015-09-18 10:41:10 +10:00
Régis Hanol
d96531b163 FEATURE: bronze/silver/gold badges for popular links 2015-08-27 18:52:31 +02:00
Régis Hanol
b8cf797e31 FIX: ensure Badge consistency 2015-08-14 13:03:49 +02:00
Sam
2955507a57 FEATURE: badges for inviting users
First invite = Promoter
3 TL2 = Campaigner
10 TL3 = Champion
2015-05-15 12:04:41 +10:00
Régis Hanol
0fca0e9758 FEATURE: 1 year anniversary badge 2015-02-18 19:30:07 +01:00
Sam
6bed4e1bf0 add allowed_ips to api_keys
update annotations
2014-11-20 14:53:15 +11:00
Sam
4e2f1811ca a bit hackish, override fa-certificate for default icon (it is set by pg in the column default) 2014-10-07 12:01:06 +11:00
Sam
72a28aeb7c FEATURE: always show highest trust level badge in card
FEATURE: fa-user icon for trust level badges
2014-10-02 16:08:31 +10:00
Sam Saffron
8ba8846589 FIX: Allow Reader badge if you over read a topic 2014-09-16 07:07:47 +10:00
Sam
42104685f7 FIX: badge flood 2014-09-11 13:34:19 +10:00
Sam
43e132d5a6 FEATURE: sharing badges (nice share, good share, great share)
FIX: bad translation
2014-09-11 13:10:37 +10:00
Sam
7f3797b635 FEATURE: Nice Topic, Good Topic and Great Topic badges
Note we will revoke all old badges post badges that went to post #1
and instead get topic badges
2014-09-11 12:36:37 +10:00
riking
808460a28f Fix magic numbers, extra param references 2014-08-31 19:36:31 -07:00
riking
1833b43ae2 FEATURE: Badge query validation, preview results, and EXPLAIN
Upon saving a badge or requesting a badge result preview,
BadgeGranter.contract_checks! will examine the provided badge SQL for
some contractual obligations - namely, the returned columns and use of
trigger parameters.

Saving the badge is wrapped in a transaction to make this easier, by
raising ActiveRecord::Rollback on a detected violation.

On the client, a modal view is added for the badge query sample run
results, named admin-badge-preview.
The preview action is moved up to the route.
The save action, on failure, triggers a 'saveError' action (also in the
route).

The preview action gains a new parameter, 'explain', which will give the
output of an EXPLAIN query for the badge sql, which can be used by forum
admins to estimate the cost of their badge queries.
The preview link is replaced by two links, one which omits (false) and
includes (true) the EXPLAIN query.

The Badge.save() method is amended to propogate errors.

Badge::Trigger gets some utility methods for use in the
BadgeGranter.contract_checks! method.

Additionally, extra checks outside of BadgeGranter.contract_checks! are
added in the preview() method, to cover cases of null granted_at
columns.

An uninitialized variable path is removed in the backfill() method.

TODO - it would be nice to be able to get the actual names of all
columns the provided query returns, so we could give more errors
2014-08-31 11:25:44 -07:00
Sam
87d2be3ecf FIX: ensure triggered badges are never triggered if filter is missing 2014-08-27 18:02:13 +10:00
Sam
414c6d191f FIX: remove nullable dates post upgrade to Rails 4 2014-08-27 15:19:25 +10:00
Sam
953d3f2151 PERF: add optional delta badge filtering
This is tricky and optional, some badges are very expensive to calculate

pass in :backfill , :post_ids and :user_ids to all badge queries so they
can do pre-filtering, if you do it after the sub-query it is too late
2014-08-08 10:02:43 +10:00
Sam
b5045a005f PERF: last seen index on users 2014-08-07 13:33:11 +10:00
Sam
0b01310c84 FIX: system badges where created under id 100 2014-08-06 10:51:39 +10:00
Sam
0ccb8e17cb remove invalid join 2014-08-04 16:55:16 +10:00
Sam
03c8f09be8 PERF: finalize porting to new incoming links structure 2014-08-04 16:43:57 +10:00
Sam
ebf385aedc FEATURE: allow title overridable 2014-07-30 08:46:59 +10:00
Sam
354d40a6ea FIX: system attribute not set correctly on new badges 2014-07-25 15:22:29 +10:00