diff --git a/app/assets/javascripts/discourse/templates/share_link.js.handlebars b/app/assets/javascripts/discourse/templates/share_link.js.handlebars
new file mode 100644
index 000000000..423d1d08c
--- /dev/null
+++ b/app/assets/javascripts/discourse/templates/share_link.js.handlebars
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/app/assets/javascripts/discourse/views/share_link_view.js b/app/assets/javascripts/discourse/views/share_link_view.js
new file mode 100644
index 000000000..982e09c19
--- /dev/null
+++ b/app/assets/javascripts/discourse/views/share_link_view.js
@@ -0,0 +1,14 @@
+/**
+ This view handles rendering of a link to share something on a
+ third-party site.
+
+ @class ShareLinkView
+ @extends Discourse.View
+ @namespace Discourse
+ @module Discourse
+**/
+Discourse.ShareLinkView = Discourse.View.extend({
+ templateName: 'share_link',
+ tagName: 'div',
+ classNameBindings: [':social-link']
+});
\ No newline at end of file
diff --git a/app/assets/javascripts/discourse/views/share_view.js b/app/assets/javascripts/discourse/views/share_view.js
index 30c5ea4f2..4f296c2e0 100644
--- a/app/assets/javascripts/discourse/views/share_view.js
+++ b/app/assets/javascripts/discourse/views/share_view.js
@@ -27,18 +27,6 @@ Discourse.ShareView = Discourse.View.extend({
}
}).observes('controller.link'),
- facebookUrl: function() {
- return ("http://www.facebook.com/sharer.php?u=" + this.get('controller.link'));
- }.property('controller.link'),
-
- twitterUrl: function() {
- return ("http://twitter.com/home?status=" + this.get('controller.link'));
- }.property('controller.link'),
-
- googlePlusUrl: function() {
- return ("https://plus.google.com/share?url=" + this.get('controller.link'));
- }.property('controller.link'),
-
didInsertElement: function() {
var _this = this;
$('html').on('click.outside-share-link', function(e) {
diff --git a/app/models/site_setting.rb b/app/models/site_setting.rb
index ad5b58a89..80cf91a9c 100644
--- a/app/models/site_setting.rb
+++ b/app/models/site_setting.rb
@@ -19,6 +19,7 @@ class SiteSetting < ActiveRecord::Base
client_setting(:traditional_markdown_linebreaks, false)
client_setting(:top_menu, 'popular|new|unread|favorited|categories')
client_setting(:post_menu, 'like|edit|flag|delete|share|bookmark|reply')
+ client_setting(:share_links, 'twitter|facebook|google+')
client_setting(:track_external_right_clicks, false)
client_setting(:must_approve_users, false)
client_setting(:ga_tracking_code, "")
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index e231cb527..ab4eb1680 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -10,7 +10,7 @@ en:
close: 'close'
twitter: 'share this link on Twitter'
facebook: 'share this link on Facebook'
- google_plus: 'share this link on Google+'
+ google+: 'share this link on Google+'
edit: 'edit the title and category of this topic'
not_implemented: "That feature hasn't been implemented yet, sorry!"
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index 271088f22..60a790b5f 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -362,6 +362,7 @@ en:
ga_tracking_code: "Google analytics tracking code code, eg: UA-12345678-9; see http://google.com/analytics"
top_menu: "Determine which items appear in the homepage navigation, and in what order. Example popular|read|favorited|unread|new|posted|categories"
post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply"
+ share_links: "Determine which items appear on the share dialog, and in what order. Example twitter|facebook|google+"
track_external_right_clicks: "Track external links that are right clicked (eg: open in new tab) disabled by default because it rewrites URLs"
topics_per_page: "How many topics are loaded by default on the topics list page"
posts_per_page: "How many posts are returned on a topic page"