mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
added share buttons to main post
This commit is contained in:
@@ -14,6 +14,7 @@ var RDB = require('./redis.js'),
|
||||
meta = require('./meta.js'),
|
||||
reds = require('reds'),
|
||||
topicSearch = reds.createSearch('nodebbtopicsearch'),
|
||||
nconf = require('nconf'),
|
||||
validator = require('validator');
|
||||
|
||||
(function(Topics) {
|
||||
@@ -404,7 +405,10 @@ var RDB = require('./redis.js'),
|
||||
'topic_id': tid,
|
||||
'expose_tools': privileges.editable ? 1 : 0,
|
||||
'posts': topicPosts,
|
||||
'main_posts': main_posts
|
||||
'main_posts': main_posts,
|
||||
'twitter-intent-url': 'https://twitter.com/intent/tweet?url=' + encodeURIComponent(nconf.get('url') + 'topic/' + topicData.slug) + '&text=' + encodeURIComponent(topicData.title),
|
||||
'facebook-share-url': 'https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(nconf.get('url') + 'topic/' + topicData.slug),
|
||||
'google-share-url': 'https://plus.google.com/share?url=' + encodeURIComponent(nconf.get('url') + 'topic/' + topicData.slug)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user