Node.js based forum software built for the modern web
completely removing all motd code in favour of using the widget system
psychobunny0963e62acbbc
diff --git a/public/templates/admin/header.tpl b/public/templates/admin/header.tplindex 6c718c8709..b5a4848b7a 100644--- a/public/templates/admin/header.tpl+++ b/public/templates/admin/header.tpl@@ -106,7 +106,6 @@<li><a href="{relative_path}/admin/languages"><i class="fa fa-fw fa-comments-o"></i> Languages</a></li><li><a href="{relative_path}/admin/settings"><i class="fa fa-fw fa-cogs"></i> Settings</a></li><li><a href="{relative_path}/admin/database"><i class="fa fa-fw fa-hdd-o"></i> Database</a></li>- <li><a href="{relative_path}/admin/motd"><i class="fa fa-fw fa-comment"></i> MOTD</a></li><li><a href="{relative_path}/admin/events"><i class="fa fa-fw fa-calendar-o"></i> Events</a></li></ul></div>diff --git a/public/templates/admin/motd.tpl b/public/templates/admin/motd.tpldeleted file mode 100644index a79ac0f5fd..0000000000--- a/public/templates/admin/motd.tpl+++ /dev/null@@ -1,33 +0,0 @@-<h1><i class="fa fa-comment"></i> MOTD</h1>-<hr />-<div class="alert alert-warning motd">- <p>- The <strong>Message of the Day</strong> (MOTD) is typically a message shown to users when they first log into a forum or chat room.- In NodeBB, the MOTD is present at the top of the forum homepage, and can be customized much like a header.- </p>- <p>- You can enter full HTML/Javascript.- </p>- <br />- <textarea class="form-control" placeholder="Welcome to NodeBB!" data-field="motd" rows="10"></textarea>- <br />- <form class="form-inline">- <label>MOTD Class</label>- <input class="form-control" type="text" placeholder="CSS class to add to MOTD" data-field="motd_class" />- </form>- <form class="form-inline">- <div class="checkbox">- <label for="show_motd">- <input type="checkbox" id="show_motd" data-field="show_motd" /> Show the Message of the Day- </label>- </div>- </form>-</div>--<button class="btn btn-primary" id="save" checked>Save</button>--<script>- require(['forum/admin/settings'], function(Settings) {- Settings.prepare();- });-</script>\ No newline at end of filediff --git a/public/templates/home.tpl b/public/templates/home.tplindex 0d64db4a35..6551c55339 100644--- a/public/templates/home.tpl+++ b/public/templates/home.tpl@@ -1,7 +1,3 @@-<div class="motd {motd_class}">- {motd}-</div>-<div widget-area="motd" class="hidden"><!-- BEGIN widgets --><div class="well">diff --git a/src/routes/api.js b/src/routes/api.jsindex 301c2ea671..d82108e2ed 100644--- a/src/routes/api.js+++ b/src/routes/api.js@@ -108,45 +108,7 @@ var path = require('path'),data.categories = visibleCategories;async.each(data.categories, getRecentReplies, function (err) {-- var motdString,- assemble = function() {- 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_class += meta.config.motd_class ? ' ' + meta.config.motd_class : '';-- data.motd = motdString;- res.json(data);- };-- if (!meta.config.motd) {- translator.translate('\n\n<h1>NodeBB</h1> <small><span>v' + pkg.version + '</span></small>\n\n<h5>[[global:motd.welcome]]</h5>\- <div class="btn-group">\- <a target="_blank" href="https://www.nodebb.org" class="btn btn-link btn-md">\- <i class="fa fa-comment"></i>\- <span> [[global:motd.get]]</span>\- </a>\- <a target="_blank" href="https://github.com/designcreateplay/NodeBB" class="btn btn-link btn-md">\- <i class="fa fa-github"></i>\- <span> [[global:motd.fork]]</span>\- </a>\- <a target="_blank" href="https://facebook.com/NodeBB" class="btn btn-link btn-md">\- <i class="fa fa-facebook"></i>\- <span> [[global:motd.like]]</span>\- </a>\- <a target="_blank" href="https://twitter.com/NodeBB" class="btn btn-link btn-md">\- <i class="fa fa-twitter"></i>\- <span> [[global:motd.follow]]</span>\- </a>\- </div>\- ', function(motd) {- motdString = motd;- assemble();- });- } else {- motdString = meta.config.motd;- assemble();- }+ res.json(data);});});});