Work in progress, keeping avatars locally

This introduces a new model to store the avatars and 3 uploads per user (gravatar, system and custom)

user can then pick which they want.
This commit is contained in:
Sam
2014-05-22 17:37:02 +10:00
committed by Sam Saffron
parent 4ccf07be8c
commit 6c1c8be794
42 changed files with 626 additions and 319 deletions

View File

@@ -22,6 +22,7 @@ if defined?(Rack::MiniProfiler)
(path !~ /^\/message-bus/) &&
(path !~ /topics\/timings/) &&
(path !~ /assets/) &&
(path !~ /\/avatar\//) &&
(path !~ /qunit/) &&
(path !~ /srv\/status/) &&
(path !~ /commits-widget/) &&

View File

@@ -307,10 +307,12 @@ en:
change_avatar:
title: "Change your avatar"
gravatar: "<a href='//gravatar.com/emails' target='_blank'>Gravatar</a>, based on"
gravatar_title: "Change your avatar on Gravatar's website"
refresh_gravatar_title: "Refresh your Gravatar"
letter_based: "System assigned avatar"
uploaded_avatar: "Custom picture"
uploaded_avatar_empty: "Add a custom picture"
upload_title: "Upload your picture"
upload_picture: "Upload Picture"
image_is_not_a_square: "Warning: we've cropped your image; it is not square."
change_profile_background:

View File

@@ -863,6 +863,7 @@ en:
allow_uploaded_avatars: "Allow users to upload their custom avatars"
allow_animated_avatars: "Allow users to use animated gif for avatars. WARNING: it is highly recommended to run the avatars:regenerate rake task after changing that setting."
automatically_download_gravatars: "Download gravatars for users upon account creation or email change"
digest_topics: "The maximum amount of topics to display in an email digest"
digest_min_excerpt_length: "How many characters we're aiming for for each post in the email digest"
default_digest_email_frequency: "How often users receive digest emails by default. They can change this setting in their preferences."

View File

@@ -366,6 +366,8 @@ Discourse::Application.routes.draw do
post "draft" => "draft#update"
delete "draft" => "draft#destroy"
get "avatar/:username/:size/:version.png" => "avatar#show", format: false
get "cdn_asset/:site/*path" => "static#cdn_asset", format: false
get "robots.txt" => "robots_txt#index"

View File

@@ -329,14 +329,13 @@ files:
allow_profile_backgrounds:
client: true
default: true
automatically_download_gravatars: true
allow_uploaded_avatars:
client: true
default: true
allow_animated_avatars:
client: true
default: false
detect_custom_avatars: true
max_daily_gravatar_crawls: 500
trust:
default_trust_level: 0
@@ -547,7 +546,11 @@ uncategorized:
default: ''
enable_cdn_js_debugging: true
show_create_topics_notice:
client: true
default: true
enable_system_avatars:
hidden: true
default: true