Merge branch 'master' of github.com:designcreateplay/NodeBB

v1.18.x
Julian Lam 11 years ago
commit 879855744d

@ -123,7 +123,7 @@
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="disableSocialButtons"> <strong>Disable social buttons on posts</strong>
<input type="checkbox" data-field="disableSocialButtons"> <strong>Disable social buttons</strong>
</label>
</div>
<div class="checkbox">

@ -10,12 +10,13 @@
<div>
<button id="new_post" class="btn btn-primary {show_topic_button}">[[category:new_topic_button]]</button>
<!-- IF !disableSocialButtons -->
<div class="inline-block pull-right">
<a href="#" id="facebook-share"><i class="fa fa-facebook-square fa-2x"></i></a>&nbsp;
<a href="#" id="twitter-intent"><i class="fa fa-twitter-square fa-2x"></i></a>&nbsp;
<a href="#" id="google-share"><i class="fa fa-google-plus-square fa-2x"></i></a>&nbsp;
</div>
<!-- ENDIF !disableSocialButtons -->
</div>
<hr/>

@ -80,6 +80,7 @@ var db = require('./database.js'),
'category_id': category_id,
'active_users': [],
'topics': [],
'disableSocialButtons': meta.config.disableSocialButtons !== undefined ? parseInt(meta.config.disableSocialButtons, 10) !== 0 : false,
'twitter-intent-url': 'https://twitter.com/intent/tweet?url=' + encodeURIComponent(nconf.get('url') + 'category/' + category_slug) + '&text=' + encodeURIComponent(category_name),
'facebook-share-url': 'https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(nconf.get('url') + 'category/' + category_slug),
'google-share-url': 'https://plus.google.com/share?url=' + encodeURIComponent(nconf.get('url') + 'category/' + category_slug),

@ -3,11 +3,12 @@
*/
var fs = require('fs'),
path = require('path'),
express = require('express'),
winston = require('winston'),
util = require('util'),
socketio = require('socket.io'),
meta = require('./meta.js');
meta = require('./meta');
var opts = {
/*
@ -72,10 +73,20 @@ var opts = {
/* Open the streams to log to: either a path or stdout */
var stream;
if(value && fs.existsSync(value)) {
fs.stat(value, function(err, stats) {
if(stats.isDirectory()) {
stream = fs.createWriteStream(path.join(value, 'nodebb.log'), {flags: 'a'});
} else {
stream = fs.createWriteStream(value, {flags: 'a'});
}
else
stream.on('error', function(err) {
winston.error(err.message);
});
});
} else {
stream = process.stdout;
}
return stream;
}
@ -112,8 +123,7 @@ var opts = {
*/
if(meta.config.loggerStatus > 0) {
return opts.express.ofn(req,res,next);
}
else {
} else {
return next();
}
}
@ -140,13 +150,15 @@ var opts = {
for(var v in clients) {
var client = clients[v];
if(client.oEmit != undefined && client.oEmit != client.emit)
if(client.oEmit != undefined && client.oEmit != client.emit) {
client.emit = client.oEmit;
}
if(client.$oEmit != undefined && client.$oEmit != client.$emit)
if(client.$oEmit != undefined && client.$oEmit != client.$emit) {
client.$emit = client.$oEmit;
}
}
}
Logger.io = function(socket) {
/*

@ -66,7 +66,7 @@ var path = require('path'),
data.motd_class = (parseInt(meta.config.show_motd, 10) === 1 || meta.config.show_motd === undefined) ? '' : ' none';
data.motd_class += (meta.config.motd && meta.config.motd.length > 0 ? '' : ' default');
data.motd = require('marked')(meta.config.motd || "<div class=\"pull-right btn-group\"><a target=\"_blank\" href=\"http://www.nodebb.org\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-comment\"></i><span class='hidden-mobile'>&nbsp;Get NodeBB</span></a> <a target=\"_blank\" href=\"https://github.com/designcreateplay/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-github\"></i><span class='hidden-mobile'>&nbsp;Fork us on Github</span></a> <a target=\"_blank\" href=\"https://twitter.com/dcplabs\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-twitter\"></i><span class='hidden-mobile'>&nbsp;@NodeBB</span></a></div>\n\n# NodeBB <span>v" + pkg.version + "</span>\nWelcome to NodeBB, the discussion platform of the future.");
data.motd = require('marked')(meta.config.motd || "<div class=\"pull-right btn-group\"><a target=\"_blank\" href=\"http://www.nodebb.org\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-comment\"></i><span class='hidden-mobile'>&nbsp;Get NodeBB</span></a> <a target=\"_blank\" href=\"https://github.com/designcreateplay/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-github\"></i><span class='hidden-mobile'>&nbsp;Fork us on Github</span></a> <a target=\"_blank\" href=\"https://twitter.com/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-twitter\"></i><span class='hidden-mobile'>&nbsp;@NodeBB</span></a></div>\n\n# NodeBB <span>v" + pkg.version + "</span>\nWelcome to NodeBB, the discussion platform of the future.");
res.json(data);
});
});

Loading…
Cancel
Save