Commit Graph

32 Commits

Author SHA1 Message Date
Max Goodman
b847757069 Use cross domain https for slightly safer login.
Login UI code has been simplified and moved into the client side. CORS
is used for the cross-domain POST if available, otherwise an iframe and
cookie polling technique is used. Start fleshing out the new JS tree. :)
2011-10-07 14:51:25 -07:00
Max Goodman
205cfb5967 Add general jQuery cookie library and replace jquery.json. 2011-10-07 14:51:25 -07:00
Max Goodman
bf1ff113a7 Move external JS libs to their own directory. 2011-10-07 14:51:25 -07:00
Neil Williams
581cb4eac5 Make clean_static remove reddit.js and mobile.js. 2011-10-06 08:12:34 -07:00
Neil Williams
e754d7f93a Clean up the Cython build process. 2011-08-24 18:02:08 -07:00
Keith Mitchell
0709a0a0af Outbound click tracking
Clicks on listing links to be tracked via google-analytics
End users may disable google analytics to opt-out of tracking
2011-08-17 15:44:22 -07:00
Logan Hanks
19d09b37d6 Add flair.js module. 2011-07-28 11:21:47 -07:00
Max Goodman
e7ad7232ad Clean up css sprite building in the Makefile. 2011-07-22 11:42:04 -07:00
Max Goodman
ef5e77a289 Add sprite for compact.css to the make process. 2011-07-22 11:41:35 -07:00
Max Goodman
628f92af9d Prevent static file name linking from operating on symlinks. 2011-06-21 14:55:30 -07:00
Max Goodman
0d9877f56b Clean up any old .md5 files in make clean_names. 2011-06-20 12:12:23 -07:00
Max Goodman
21e447a520 Break name file cleaning off into its own make target. 2011-06-20 12:12:23 -07:00
Max Goodman
5e03b19ce8 Don't remove inis in make clean_static 2011-06-20 12:12:23 -07:00
Max Goodman
beb970fd56 Switch to symlinks for unique static filenames.
Disable static hash middleware, since it is no longer necessary.
2011-06-20 12:12:23 -07:00
Max Goodman
1733261a52 Add unique hashed filename json mapping file for serving static files.
When make is run, unique filenames are generated for JavaScript and CSS
files in /public/static/. Filenames are generated by appending a 64 bit
truncated SHA1 hash in websafe base64 format before the extension. The
filename mapping is stored in /public/static/names.json. Unique
filenames are now inserted by the static() template helper. Hashed
filenames can be served by Pylons, and hashed names are checked against
the names.json mapping when requested.
2011-06-20 12:12:23 -07:00
Max Goodman
555b5c17e8 Use python2.6 in the Makefile. 2011-06-20 12:12:23 -07:00
Max Goodman
542e22ffa8 New JS compilation, localization, and module system.
Add Google Closure Compiler to contribs for JS compilation.
2011-06-20 12:12:23 -07:00
Max Goodman
2d6e16014f Point buttons to compressed assets. Clean up headers. 2011-05-27 16:01:13 -07:00
Max Goodman
c5fd5ecd55 Remove reddit.css and sprite.png upon make clean. 2011-05-17 15:17:44 -07:00
Max Goodman
618b9e8d1d Upgrade to jQuery 1.6.1 loaded from the Google CDN. 2011-05-17 15:17:44 -07:00
Neil Williams
68a06c568b April 2011 Merge
* Show "this post is archived" message for things we won't allow votes on.
* Don't mark messages read when pulled via RSS
* Make compact (smartphone) interface respect user's toolbar
* preferences.
* Make mobile interface more friendly for kindles.
* Fix bug that caused comment tree corruption.
* Use cachebuster on traffic pixel for more accurate tracking.
* Make apps restart themselves after a configurable number of requests.
* Move to pycassa 1.0.8.
* Fix bug in calculations for "best" sort.
* Fixes for Firefox Mobile
* Add a global flag to disable editing of the wiki.
* Move the child-comment collapse button to the left.
* Updated list of disallows in robots.txt to save needless hits from
  crawlers.
* Fix vote_q by splitting it into vote_link_q and vote_comment_q.
* Fix bug where /reddits crashes due to 'promos' subreddit.
2011-04-18 16:30:48 -07:00
KeyserSosa
9a4271f641 Upgrade Instructions
====
   * Uninstall the python Cassandra package that we previously depended on (it has a namespace conflict with the new package we depend on).  To find it:

     $ python -c "import cassandra; print cassandra.__file__"

    and rm -r the .egg directory after "site-packages/"

   * This version relies on cython, so if "make" fails, you may have to install cython via your distro's package manager.

     $ cd reddit/r2
     $ python setup.py develop # possibly with "sudo" depending on your install
     $ make

   * Cassandra is now required for the caching layer.  An example storage-conf.xml can be found in reddit/srv/cassandra.  Make sure that the additional <Keyspace> items are included in your conf file.

   * remove the query_queue_reader services if they are running.  add new gen_time_listings.sh instead.  Suggested cron:

    0    */2 *   *   *   $SCRIPTS/gen_time_listings.sh year '("month","year")'
    */5  *   *   *   *   $SCRIPTS/gen_time_listings.sh week '("day","week")'
    *    *   *   *   *   $SCRIPTS/gen_time_listings.sh hour '("hour",)'

   where $SCRIPTS is the location of this script directory

Features and Bugfixes
====
 * Mobile reddit:
   * templates are in r2/templates of the form *.compact
   * css is r2/public/static/css/compact.css
     * beginning of a sass-based (http://sass-lang.com/) compact.scss
   * reachable via .compact extension or from the "i" subdomain.
 * Cassandra is now *required*, and votes are currently written out to both cassandra and postgres (part of an eventual migration).
 * attempt to make the db connection code a little smarter.
   * A dropped DB connection will mark the connection dead and randomly attempt to reconnect.
   * A dropped db connection on start will permanently mark the connection as dead.
 * Calculate the time-filtered top/controversy listings using mapreduce instead of prec_links (new cron job in reddit/scripts)
 * allow default user/pass for database to be specified with '*' to fallback on db_user and db_pass in the INI file
 * Search feedback buttons
 * make deleted comments not show up in your inbox.
 * move last_visited into cassandra
 * Swallow rare, race-conditiony POST_save/hide/subscribe problems
 * Apparently we haven't been breaking properly for the past few weeks.
2010-06-16 17:01:50 -07:00
Jeremy Edberg
253c4730f9 * Add services and scripts to public repos for ease of reddit installation
* bring discount up to date
 * fix consistency errors in the self-serve traffic page
2010-05-18 16:43:06 -07:00
KeyserSosa
e87f520d45 New Features:
* 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
2010-05-17 13:28:21 -07:00
ketralnis
2869eaf8b9 New features:
* Activate negative-result caching for HardCache chain
    * begin migration to pylibmc:
       * Add pylibmc to the list of required packages in preparation for the replacement of the memcached library
       * Start using pylibmc for the rendercaches
    * Tweak the computation of the normalized hot page to be a bit faster when the precomputer is available, by relying on the precomputer's internal permacached structure.
    * Default to a SelfEmptyingCache for scripts run from `paster run'.  Note that processes that run forever are still responsible for resetting their local-caches, but this can now be done with g.reset_caches()
    * threaded messaging patch part 1: backend changes only.  This will allow migrate.py to be run to move new onto inbox and will start tracking message trees for users.
    * Specify some queries to run at most once per day
    * Refactored safemarkdown() and added soup testing

    Additions:
    * Added _byID_rel()
    * Made error messages more verbose for:
       1. byID lookups of too-big thing_ids
       2. memcache failures
       3. Solr Nones
    * Award._all_awards() now sorts by date
    * Trophy.by_{account,award}() now cache properly
    * new feedback page with helpful links
    * Try to reduce the length of the query-queue by not adding known-long queries at all, rather than adding them and skipping them
    * whitespace clean up
    * simplify the 'why did my CC get denied' email checking.
    * added missing translation strings and users now get PMs when they are added as translators

    Bugfixes:
    * Fix a bug in unsaving
    * BeautifulSoup stopped hosting 3.0.7a, but 3.0.8 still uses the good parser
    * Better search error handling
    * Properly reset the cache-chains (incl. the hardcache; d'oh!) per-request
    * Fix an attribute error on listings where some items have author_ids and some don't
    * Bug when forcing recalculation of memoized functions
    * the subreddit creation and edit form aren't dealing with errors properly
    * buttons fix
2010-05-17 13:27:17 -07:00
KeyserSosa
5ef76b96c7 New features:
* self service sponsored links (initial version with no targeting)
       * credit card processing with authorize.net (and corresponding interaction code)
    * hardcache -- for persistent cache keys with expiration
    * Awards code
    * messaging overhaul round 1.  Added mark as unread as well as message sorting

  Additions:
    * add TedScraper and improve youtube scraper (ala tritelife); move traffic link on sponsored links and make them still visible when the promotion is over
    * compressify all of our pngs, and set it up so thumbs, sr images, and the sprite get compressed every time they are generated
    * rate limit logins (naive way)
    * add a limit to the length of the moderator sidebox.
    * add over18 thumbnail handling and NSFW label on nsfw content
    * make NSFW label optional, and make the operation of the pref checkboxes sensible
    * add the option (for moderators) to remove a subreddit from the default set
    * Combine the queue handling code to be easily plumbed, and use it to precompute /comments

  Bugfixes:
    * trap duplicate vote error
    * Fixed new mail mouseover on toolbar
    * spammers can't send empty bodied emails any more (they will get rejected as they should).
2010-05-17 13:26:22 -07:00
KeyserSosa
bf9f43ccac Messaging/commenting
===
 - add confidence sorting to comments
   * common values are precomputed for speedier response
   * best is made the default sort on comment pages
 - messages will now be delivered once one is moderator/contributor/banned
 - UI updates to messaging page, including added show parent functionality to messages
 - Remove the rate-limit on comments on your own self-posts
 - Give users some leeway in editing their comments: don't show an edit star if the edit is within the first few minutes of a comment's lifetime
 - Office Assistant will help users when they write to admins

Backend
===
 - Replace the postgres-based query_queue with an AMQP based one
   * Set up amqp queues for async tasks such as search updates and the scrapers
   * service monitor updates, adding queue-tracking support
 - Allow find_recent_broken_things to specify both from_time and to_time
 - add a ini file parameter to disallow db writes (to create read-only reddit instances for crawlers)

New features
===
 - self-serve advertisement:
   * complete overhaul of sponsored link code
   * functions for talking with authorize.net
   * added pay domain and https support
   * added ability to share traffic from sponsored links
   * auto-reject promotions that are too old and unpaid for
 - awards
 - allow widget to have its links to have a target (in case it is iframed)
 - automatic_reddits:
   * Don't show automatic_reddits in the horizontal topbar
 - Listing numbers are always in order with no gaps
 - add support for sprites for common (r2.lib.contrib.nymph)

Admin
===
 - added a takedown page for dealing with DMCA requests properly
   * status code 404 on takedown pages
   * JSON returns same string as in the explanation text
   * nofollow on markdown in explanation
   * title and image optional
 - Added /c/(comment_id) for admins
 - updates to JS to rate-limit voting, commenting, and anything else that could be just as easily done by a script-kiddie to cheat.
 - make ad frame dynamic and add tracking pixel
 - add the ability to add a sponsored banner to the rightbox of a reddit
 - add the ability to show custom css on cnamed and/or non-cnamed versions of a reddit
 - allow us to ignore reports from report-spammers.

Bugfixes
===
 - Fix sorting of duplicate links (patch by Chromakode)
 - fix traffic bug on main traffic page when it is the first of the month.
 - toolbar redirects to comments page on self posts rather than generating the frame
 - half-assed unicode handling in menus giving us bugs again.  Switched to the whole-ass approach
 - added Thing._byID36
 - Support /help/foo/bar
2009-12-01 13:42:06 -08:00
KeyserSosa
9c4ebbbdfd Allow submissions with short enough titled to be made into T-shirts thru spreadshirt. 2009-07-15 11:03:15 -07:00
KeyserSosa
84c1375339 Epic Caching Update. Major features (mostly in r2.lib.wrapped)
* Wrapped -> Templated in cases when there is no thing to be wrapped
 * cachable templates out of cachable pieces which can be reused
 * auto-generation of cache keys for cachable content
 * c.render_style used to propagate current style to children
 * cut down on the number of c and g variables in thing templates.
 * buttons in printable.html now in printablebuttons.html with handler classes in r2.lib.pages.things (planned destination of add_props).
2009-07-06 14:36:33 -07:00
ketralnis
a07c576d1a Some toolbar upgrades 2009-05-29 12:04:00 -07:00
spez
c837ef147c update copyright strings. show star on admin comments after they've been editted 2009-02-11 13:54:09 -08:00
KeyserSosa
4440ccfc6e overhaul of JS and form handling code, not based on jQuery 2009-01-26 15:11:23 -08:00