Skip to content

Commit

Permalink
New Features:
Browse files Browse the repository at this point in the history
    * Make the new targeted self-serve promotion the default
      * add TheOatmeal's comic to our source.  (http://www.theoatmeal.com)
      * add targetting
      * add rerunning or suplementing existing campaigns
      * move all sponsored link listings to be precomputed
    * deputy moderation
      * /about/trials and /about/modqueue
      * Have trials train the spam filter
      * Allow admins to see all trials, site-wide, at /r/all/about/trials
      * Allow trials to be ended while votes are still coming in when the jury opinion is near-unanimous
    * offload scraping to embed.ly
    * Use boto for s3cp instead of forking curl

    Additions:
    * migrated all graphs to use Flot
    * Implement per-user suspiciousness quota and print over-quota trace
      * Keep track of how many questionable links a user has outstanding at any given time
    * add links to the FAQ and walkthru
    * add a differnt thumbnail for self posts (thanks to licensplate)
    * Add some visual tracking for comments trees
    * Relabel:  ban / unban => remove / approve
    * Use big remove / approve buttons when the listing relates to moderation,
      or when the item has reports or is on trial
    * Merge unban, ignore, and a new approve this non-banned link into one
    * Be a little smarter about the way we allow caching of subreddit stylesheets
    * make cassandra's cache chain cache negative results (and yes that commit message is bigger than the patch)
    * add All, friends, random, and mod to topbar
    * add a local render precache (optional)
    * better noimage.png from paradox460
    * Add a 'legacy' mode to CMemcache that will allow us to use it as a drop-in replacement for testing purposes. Modifies python-memcached to use the same 'crc' hashing algorithm that pylibmc does, and removes a feature in python-memcached that we aren't using. Contributed by Joe Terranova <joeterranova@gmail.com>
    * Everyone sees cake
    * Added g.system_user

    Bugfixes:
    * improve validation of media embed, and remove a todo from link.py by putting all of the child div stuff in pages
    * Feed/JSON updates
      * Add selftext to RSS feeds
      * Add subreddit names to Comments in JSON
      * add is_self param to indicate self posts
    * Don't shade the background of child comments of spam
    * shorted the cache lifetime for AllSR to 1 min
    * Tell everyone that we actually own the trademarks we claim to own (footer update)
    * You no longer get an orange alien when one of your reddits sends an automated message to a user
  • Loading branch information
KeyserSosa committed May 17, 2010
1 parent 67814d5 commit e87f520
Show file tree
Hide file tree
Showing 99 changed files with 7,698 additions and 2,467 deletions.
2 changes: 1 addition & 1 deletion r2/Makefile
Expand Up @@ -21,7 +21,7 @@
################################################################################

# Jacascript files to be compressified
js_targets = jquery.js jquery.json.js jquery.reddit.js reddit.js ui.core.js ui.datepicker.js sponsored.js
js_targets = jquery.js jquery.json.js jquery.reddit.js reddit.js ui.core.js ui.datepicker.js sponsored.js jquery.flot.js jquery.lazyload.js
# CSS targets
main_css = reddit.css
css_targets = reddit-ie6-hax.css reddit-ie7-hax.css mobile.css spreadshirt.css
Expand Down
5 changes: 4 additions & 1 deletion r2/example.ini
Expand Up @@ -161,7 +161,7 @@ tracking_secret = abcdefghijklmnopqrstuvwxyz0123456789
ip_hash =
S3KEY_ID = ABCDEFGHIJKLMNOP1234
S3SECRET_KEY = aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890AbCd
s3_thumb_bucket = /your.bucket.here/
s3_thumb_bucket = your.bucket.here
default_thumb = /static/noimage.png

MIN_DOWN_LINK = 0
Expand All @@ -182,6 +182,8 @@ rising_period = 12 hours
# time of ratelimit purgatory (min)
RATELIMIT = 10

QUOTA_THRESHOLD = 0

num_comments = 200
max_comments = 500
num_default_reddits = 10
Expand All @@ -200,6 +202,7 @@ share_reply = noreply@yourdomain.com
agents =

feedback_email = abuse@localhost
system_user = reddit

# t-shirt stuff
spreadshirt_url =
Expand Down
39 changes: 20 additions & 19 deletions r2/r2/config/routing.py
Expand Up @@ -32,13 +32,13 @@ def make_map(global_conf={}, app_conf={}):

admin_routes.add(mc)

mc('/login', controller='front', action='login')
mc('/logout', controller='front', action='logout')
mc('/verify', controller='front', action='verify')
mc('/adminon', controller='front', action='adminon')
mc('/adminoff', controller='front', action='adminoff')
mc('/login', controller='forms', action='login')
mc('/logout', controller='forms', action='logout')
mc('/verify', controller='forms', action='verify')
mc('/adminon', controller='forms', action='adminon')
mc('/adminoff', controller='forms', action='adminoff')
mc('/submit', controller='front', action='submit')
mc('/validuser', controller='front', action='validuser')
mc('/validuser', controller='forms', action='validuser')

mc('/over18', controller='post', action='over18')

Expand All @@ -63,6 +63,7 @@ def make_map(global_conf={}, app_conf={}):
requirements=dict(where='subscriber|contributor|moderator'))

mc('/buttons', controller='buttons', action='button_demo_page')
mc('/upgradebuttons', controller='buttons', action='upgrade_buttons')
#the frame
mc('/button_content', controller='buttons', action='button_content')
#/button.js and buttonlite.js - the embeds
Expand All @@ -78,7 +79,6 @@ def make_map(global_conf={}, app_conf={}):
mc('/feedback', controller='feedback', action='feedback')
mc('/ad_inq', controller='feedback', action='ad_inq')


mc('/admin/i18n', controller='i18n', action='list')
mc('/admin/i18n/:action', controller='i18n')
mc('/admin/i18n/:action/:lang', controller='i18n')
Expand All @@ -103,10 +103,10 @@ def make_map(global_conf={}, app_conf={}):
mc('/user/:username/:where', controller='user', action='listing',
where='overview')

mc('/prefs/:location', controller='front',
mc('/prefs/:location', controller='forms',
action='prefs', location='options')

mc('/juryduty', controller='front', action='juryduty')
mc('/depmod', controller='forms', action='depmod')

mc('/info/0:article/*rest', controller = 'front',
action='oldinfo', dest='comments', type='ancient')
Expand All @@ -126,8 +126,8 @@ def make_map(global_conf={}, app_conf={}):
mc('/duplicates/:article/:title', controller = 'front',
action = 'duplicates', title=None)

mc('/mail/optout', controller='front', action = 'optout')
mc('/mail/optin', controller='front', action = 'optin')
mc('/mail/optout', controller='forms', action = 'optout')
mc('/mail/optin', controller='forms', action = 'optin')
mc('/stylesheet', controller = 'front', action = 'stylesheet')
mc('/frame', controller='front', action = 'frame')
mc('/framebuster/:blah', controller='front', action = 'framebuster')
Expand All @@ -136,12 +136,12 @@ def make_map(global_conf={}, app_conf={}):

mc('/promoted/edit_promo/:link',
controller='promote', action = 'edit_promo')
mc('/promoted/pay/:link',
mc('/promoted/pay/:link/:indx',
controller='promote', action = 'pay')
mc('/promoted/graph',
controller='promote', action = 'graph')
mc('/promoted/:action', controller='promote',
requirements = dict(action = "new_promo"))
requirements = dict(action = "edit_promo|new_promo|roadblock"))
mc('/promoted/:sort', controller='promote', action = "listing")
mc('/promoted/', controller='promoted', action = "listing",
sort = "")
Expand All @@ -151,7 +151,7 @@ def make_map(global_conf={}, app_conf={}):

mc('/', controller='hot', action='listing')

listing_controllers = "hot|saved|new|recommended|randomrising|comments"
listing_controllers = "hot|saved|new|randomrising|comments"

mc('/:controller', action='listing',
requirements=dict(controller=listing_controllers))
Expand All @@ -168,8 +168,9 @@ def make_map(global_conf={}, app_conf={}):
mc('/message/moderator/:subwhere', controller='message', action='listing',
where = 'moderator')

mc('/password', controller='forms', action="password")
mc('/:action', controller='front',
requirements=dict(action="password|random|framebuster"))
requirements=dict(action="random|framebuster|selfserviceoatmeal"))
mc('/:action', controller='embed',
requirements=dict(action="help|blog"))
mc('/help/*anything', controller='embed', action='help')
Expand All @@ -187,11 +188,11 @@ def make_map(global_conf={}, app_conf={}):

mc('/d/:what', controller='api', action='bookmarklet')

mc('/resetpassword/:key', controller='front',
mc('/resetpassword/:key', controller='forms',
action='resetpassword')
mc('/verification/:key', controller='front',
mc('/verification/:key', controller='forms',
action='verify_email')
mc('/resetpassword', controller='front',
mc('/resetpassword', controller='forms',
action='resetpassword')

mc('/post/:action/:url_user', controller='post',
Expand All @@ -205,7 +206,7 @@ def make_map(global_conf={}, app_conf={}):
mc('/api/gadget/click/:ids', controller = 'api', action='gadget', type='click')
mc('/api/gadget/:type', controller = 'api', action='gadget')
mc('/api/:action', controller='promote',
requirements=dict(action="promote|unpromote|new_promo|link_thumb|freebie|promote_note|update_pay|refund|traffic_viewer|rm_traffic_viewer"))
requirements=dict(action="promote|unpromote|edit_promo|link_thumb|freebie|promote_note|update_pay|refund|traffic_viewer|rm_traffic_viewer|edit_campaign|delete_campaign|meta_promo|add_roadblock|rm_roadblock"))
mc('/api/:action', controller='api')

mc("/button_info", controller="api", action="info", limit = 1)
Expand Down
2 changes: 1 addition & 1 deletion r2/r2/controllers/__init__.py
Expand Up @@ -24,7 +24,6 @@
from listingcontroller import SavedController
from listingcontroller import NewController
from listingcontroller import BrowseController
from listingcontroller import RecommendedController
from listingcontroller import MessageController
from listingcontroller import RedditsController
from listingcontroller import ByIDController as ByidController
Expand All @@ -35,6 +34,7 @@
from listingcontroller import MyredditsController

from feedback import FeedbackController
from front import FormsController
from front import FrontController
from health import HealthController
from buttons import ButtonsController
Expand Down
6 changes: 3 additions & 3 deletions r2/r2/controllers/ads.py
Expand Up @@ -26,14 +26,14 @@

class AdsController(RedditController):

@validate(VAdmin())
@validate(VSponsorAdmin())
def GET_index(self):
res = AdminPage(content = AdminAds(),
show_sidebar = False,
title = 'ads').render()
return res

@validate(VAdmin(),
@validate(VSponsorAdmin(),
ad = VAdByCodename('adcn'))
def GET_assign(self, ad):
if ad is None:
Expand All @@ -44,7 +44,7 @@ def GET_assign(self, ad):
title='assign an ad to a community').render()
return res

@validate(VAdmin(),
@validate(VSponsorAdmin(),
ad = VAdByCodename('adcn'))
def GET_srs(self, ad):
if ad is None:
Expand Down

0 comments on commit e87f520

Please sign in to comment.