settings acp refactor for dedicated routes

v1.18.x
psychobunny 11 years ago
parent 9b17ec9f26
commit 117b8dece4

@ -17,6 +17,8 @@ define('forum/admin/settings', ['uploader', 'sounds'], function(uploader, sounds
return;
}
setupPills();
// Populate the fields on the page from the config
var fields = $('#content [data-field]'),
numFields = fields.length,
@ -91,12 +93,6 @@ define('forum/admin/settings', ['uploader', 'sounds'], function(uploader, sounds
handleUploads();
$('#settings-tab a').off('click').on('click', function (e) {
e.preventDefault();
$(this).tab('show');
return false;
});
$('button[data-action="email.test"]').off('click').on('click', function() {
socket.emit('admin.email.test', function(err) {
app.alert({
@ -131,6 +127,14 @@ define('forum/admin/settings', ['uploader', 'sounds'], function(uploader, sounds
socket.emit('admin.config.remove', key);
};
function setupPills() {
$('.settings.nav-pills li').removeClass('active');
var slug = window.location.href.split('/');
slug = slug[slug.length-1];
$('.settings.nav-pills [data-pill="' + slug + '"]').addClass('active');
}
function saveField(field, callback) {
field = $(field);
var key = field.attr('data-field'),

@ -203,7 +203,7 @@ adminController.languages.get = function(req, res, next) {
};
adminController.settings.get = function(req, res, next) {
res.render('admin/settings', {
res.render('admin/settings/' + req.params.term, {
'csrf': req.csrfToken()
});
};

@ -39,12 +39,14 @@ function addRoutes(router, middleware, controllers) {
//main
router.get('/index', controllers.admin.home);
router.get('/plugins', controllers.admin.plugins.get);
router.get('/settings', middleware.applyCSRF, controllers.admin.settings.get);
router.get('/themes', controllers.admin.themes.get);
router.get('/languages', controllers.admin.languages.get);
router.get('/groups', controllers.admin.groups.get);
router.get('/sounds', controllers.admin.sounds.get);
//settings
router.get('/settings/:term', middleware.applyCSRF, controllers.admin.settings.get);
//user
router.get('/users', controllers.admin.users.search);
router.get('/users/search', controllers.admin.users.search);

@ -60,7 +60,7 @@
<a href="{relative_path}/admin/index"><i class="fa fa-home" title="Home"></i><span class="visible-xs-inline"> Home</span></a>
</li>
<li>
<a href="{relative_path}/admin/settings"><i class="fa fa-cogs" title="Settings"></i><span class="visible-xs-inline"> Settings</span></a>
<a href="{relative_path}/admin/settings/general"><i class="fa fa-cogs" title="Settings"></i><span class="visible-xs-inline"> Settings</span></a>
</li>
<li>
<a href="{relative_path}/" target="_top"><i class="fa fa-book" title="Forum"></i><span class="visible-xs-inline"> Forum</span></a>
@ -101,7 +101,7 @@
<li><a href="{relative_path}/admin/tags"><i class="fa fa-fw fa-tags"></i> Tags</a></li>
<li><a href="{relative_path}/admin/users/latest"><i class="fa fa-fw fa-user"></i> Users</a></li>
<li><a href="{relative_path}/admin/groups"><i class="fa fa-fw fa-group"></i> Groups</a></li>
<li><a href="{relative_path}/admin/settings"><i class="fa fa-fw fa-cogs"></i> General Settings</a></li>
<li><a href="{relative_path}/admin/settings/general"><i class="fa fa-fw fa-cogs"></i> Settings</a></li>
<li><a href="{relative_path}/admin/themes"><i class="fa fa-fw fa-th"></i> Themes</a></li>
<li><a href="{relative_path}/admin/plugins"><i class="fa fa-fw fa-code-fork"></i> Plugins</a></li>
<li><a href="{relative_path}/admin/languages"><i class="fa fa-fw fa-language"></i> Languages</a></li>

@ -1,73 +0,0 @@
<h1><i class="fa fa-cogs"></i> Settings</h1>
<hr />
<ul id="settings-tab" class="nav nav-tabs">
<li class="active"><a href="#general" data-toggle="tab">General</a></li>
<li><a href="#reputation" data-toggle="tab">Reputation</a></li>
<li><a href="#email" data-toggle="tab">Email</a></li>
<li><a href="#user" data-toggle="tab">User</a></li>
<li><a href="#post" data-toggle="tab">Post</a></li>
<li><a href="#pagination" data-toggle="tab">Pagination</a></li>
<li><a href="#tags" data-toggle="tab">Tags</a></li>
<li><a href="#web-crawler" data-toggle="tab">Web Crawler</a></li>
<li><a href="#sockets" data-toggle="tab">Sockets</a></li>
<li><a href="#advanced" data-toggle="tab">Advanced</a></li>
</ul>
<div class="tab-content">
<!-- IMPORT admin/settings/general.tpl -->
<!-- IMPORT admin/settings/email.tpl -->
<!-- IMPORT admin/settings/user.tpl -->
<!-- IMPORT admin/settings/post.tpl -->
<!-- IMPORT admin/settings/pagination.tpl -->
<!-- IMPORT admin/settings/tags.tpl -->
<!-- IMPORT admin/settings/web-crawler.tpl -->
<!-- IMPORT admin/settings/sockets.tpl -->
<!-- IMPORT admin/settings/advanced.tpl -->
<!-- This was not moved into a partial because I am removing it soon (@julianlam) -->
<!-- ^ Heh, when did I add this... this section is still here apparently. (@julianlam July 2014) -->
<div class="tab-pane" id="reputation">
<form>
<div class="alert alert-warning">
<div class="checkbox">
<label>
<input type="checkbox" data-field="reputation:disabled"> <strong>Disable Reputation System</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="downvote:disabled"> <strong>Disable Down Voting</trong>
</label>
</div>
</div>
<div class="alert alert-warning">
<h3>Privilege Thresholds</h3>
<p>Use <strong>privilege thresholds</strong> to manage how much reputation a user must gain to receive moderator access.</p><br />
<strong>Manage Thread</strong><br /> <input type="text" class="form-control" value="1000" data-field="privileges:manage_topic"><br />
<strong>Manage Content</strong><br /> <input type="text" class="form-control" value="1000" data-field="privileges:manage_content"><br />
<div class="checkbox">
<label>
<input type="checkbox" data-field="privileges:disabled"> <strong>Disable Privilege Threshold System</strong>
</label>
</div>
</div>
<div class="alert alert-warning">
<h3>Activity Thresholds</h3>
<strong>Minimum reputation to downvote posts</strong><br /> <input type="text" class="form-control" data-field="privileges:downvote"><br />
<strong>Minimum reputation to flag posts</strong><br /> <input type="text" class="form-control" data-field="privileges:flag"><br />
</div>
</form>
</div>
</div>
<span class="hidden" id="csrf" data-csrf="{csrf}"></span>
<button class="btn btn-primary" id="save">Save</button>
<script>
require(['forum/admin/settings'], function(Settings) {
Settings.prepare();
});
</script>

@ -1,30 +1,32 @@
<div class="tab-pane active" id="advanced">
<div class="alert alert-warning">
<form>
<div class="checkbox">
<label>
<input type="checkbox" data-field="maintenanceMode"> <strong>Maintenance Mode</strong>
</label>
</div>
<p class="help-block">
When the forum is in maintenance mode, all requests will be redirected to a static holding page.
Administrators are exempt from this redirection, and are able to access the site normally.
</p>
</form>
<!-- IMPORT admin/settings/header.tpl -->
<div class="alert alert-warning">
<form>
<div class="checkbox">
<label>
<input type="checkbox" data-field="maintenanceMode"> <strong>Maintenance Mode</strong>
</label>
</div>
<div class="alert alert-warning">
<form>
<div class="form-group">
<label for="allow-from-uri">Set ALLOW-FROM to Place NodeBB in an iFrame:</label>
<input class="form-control" id="allow-from-uri" type="text" placeholder="external-domain.com" data-field="allow-from-uri" /><br />
</div>
<div class="form-group">
<label for="cookieDomain">Set domain for session cookie</label>
<input class="form-control" id="cookieDomain" type="text" placeholder=".domain.tld" data-field="cookieDomain" /><br />
<p class="help-block">
Leave blank for default
</p>
</div>
</form>
<p class="help-block">
When the forum is in maintenance mode, all requests will be redirected to a static holding page.
Administrators are exempt from this redirection, and are able to access the site normally.
</p>
</form>
</div>
<div class="alert alert-warning">
<form>
<div class="form-group">
<label for="allow-from-uri">Set ALLOW-FROM to Place NodeBB in an iFrame:</label>
<input class="form-control" id="allow-from-uri" type="text" placeholder="external-domain.com" data-field="allow-from-uri" /><br />
</div>
</div>
<div class="form-group">
<label for="cookieDomain">Set domain for session cookie</label>
<input class="form-control" id="cookieDomain" type="text" placeholder=".domain.tld" data-field="cookieDomain" /><br />
<p class="help-block">
Leave blank for default
</p>
</div>
</form>
</div>
<!-- IMPORT admin/settings/footer.tpl -->

@ -1,29 +1,31 @@
<div class="tab-pane" id="email">
<form>
<div class="alert alert-warning">
<div>
<p>
Please ensure that you have installed a third-party emailer (e.g. PostageApp, Mailgun, Mandrill, SendGrid, etc), otherwise emails will not be sent by NodeBB
</p>
<div class="form-group">
<label for="email:from"><strong>Email Address</strong></label>
<p class="help-block">
The following email address refers to the email that the recipient will see in the "From" and "Reply To" fields.
</p>
<input type="text" class="form-control input-lg" id="email:from" data-field="email:from" placeholder="info@example.org" /><br />
</div>
<button class="btn btn-block btn-default" type="button" data-action="email.test">Send Test Email</button>
<p class="help-block">
The test email will be sent to the currently logged in user's email address.
</p>
</div>
<!-- IMPORT admin/settings/header.tpl -->
<form>
<div class="alert alert-warning">
<div>
<p>
Please ensure that you have installed a third-party emailer (e.g. PostageApp, Mailgun, Mandrill, SendGrid, etc), otherwise emails will not be sent by NodeBB
</p>
<div class="form-group">
<label for="email:from"><strong>Email Address</strong></label>
<p class="help-block">
The following email address refers to the email that the recipient will see in the "From" and "Reply To" fields.
</p>
<input type="text" class="form-control input-lg" id="email:from" data-field="email:from" placeholder="info@example.org" /><br />
</div>
<div class="alert alert-warning">
<div class="checkbox">
<label for="disableEmailSubscriptions">
<input type="checkbox" id="disableEmailSubscriptions" data-field="disableEmailSubscriptions" name="disableEmailSubscriptions" /> Disable subscriber notification emails
</label>
</div>
</div>
</form>
</div>
<button class="btn btn-block btn-default" type="button" data-action="email.test">Send Test Email</button>
<p class="help-block">
The test email will be sent to the currently logged in user's email address.
</p>
</div>
</div>
<div class="alert alert-warning">
<div class="checkbox">
<label for="disableEmailSubscriptions">
<input type="checkbox" id="disableEmailSubscriptions" data-field="disableEmailSubscriptions" name="disableEmailSubscriptions" /> Disable subscriber notification emails
</label>
</div>
</div>
</form>
<!-- IMPORT admin/settings/footer.tpl -->

@ -0,0 +1,9 @@
<span class="hidden" id="csrf" data-csrf="{csrf}"></span>
<button class="btn btn-primary" id="save">Save</button>
<script>
require(['forum/admin/settings'], function(Settings) {
Settings.prepare();
});
</script>

@ -1,51 +1,53 @@
<div class="tab-pane active" id="general">
<div class="alert alert-warning">
<form>
<label>Site Title</label>
<input class="form-control" type="text" placeholder="Your Community Name" data-field="title" />
<div class="checkbox">
<label for="showSiteTitle">
<input type="checkbox" id="showSiteTitle" data-field="showSiteTitle" name="showSiteTitle" /> Show Site Title in Header
</label>
</div>
<label>Browser Title</label>
<input class="form-control" type="text" placeholder="Browser Title" data-field="browserTitle" />
<p class="help-block">
If no browser title is specified, the site title will be used
</p>
<label>Site Description</label>
<input type="text" class="form-control" placeholder="A short description about your community" data-field="description" /><br />
<label>Site Keywords</label>
<input type="text" class="form-control" placeholder="Keywords describing your community, comma-seperated" data-field="keywords" /><br />
<label>Site Logo</label>
<input id="logoUrl" type="text" class="form-control" placeholder="Path to a logo to display on forum header" data-field="brand:logo" /><br />
<input data-action="upload" data-target="logoUrl" data-route="{relative_path}/admin/uploadlogo" type="button" class="btn btn-default" value="Upload Logo"></input> <br /> <br/>
<label>Favicon</label><br />
<input id="faviconUrl" type="text" class="form-control" placeholder="favicon.ico" data-field="brand:favicon" /><br />
<input data-action="upload" data-target="faviconUrl" data-route="{relative_path}/admin/uploadfavicon" type="button" class="btn btn-default" value="Upload"></input> <br /> <br/>
<hr/>
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowGuestSearching"> <strong>Allow guests to search without logging in</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="useOutgoingLinksPage"> <strong>Use Outgoing Links Warning Page</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="disableSocialButtons"> <strong>Disable social buttons</strong>
</label>
</div>
</form>
<!-- IMPORT admin/settings/header.tpl -->
<div class="alert alert-warning">
<form>
<label>Site Title</label>
<input class="form-control" type="text" placeholder="Your Community Name" data-field="title" />
<div class="checkbox">
<label for="showSiteTitle">
<input type="checkbox" id="showSiteTitle" data-field="showSiteTitle" name="showSiteTitle" /> Show Site Title in Header
</label>
</div>
<label>Browser Title</label>
<input class="form-control" type="text" placeholder="Browser Title" data-field="browserTitle" />
<p class="help-block">
If no browser title is specified, the site title will be used
</p>
<label>Site Description</label>
<input type="text" class="form-control" placeholder="A short description about your community" data-field="description" /><br />
<label>Site Keywords</label>
<input type="text" class="form-control" placeholder="Keywords describing your community, comma-seperated" data-field="keywords" /><br />
<label>Site Logo</label>
<input id="logoUrl" type="text" class="form-control" placeholder="Path to a logo to display on forum header" data-field="brand:logo" /><br />
<input data-action="upload" data-target="logoUrl" data-route="{relative_path}/admin/uploadlogo" type="button" class="btn btn-default" value="Upload Logo"></input> <br /> <br/>
<label>Favicon</label><br />
<input id="faviconUrl" type="text" class="form-control" placeholder="favicon.ico" data-field="brand:favicon" /><br />
<input data-action="upload" data-target="faviconUrl" data-route="{relative_path}/admin/uploadfavicon" type="button" class="btn btn-default" value="Upload"></input> <br /> <br/>
<hr/>
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowGuestSearching"> <strong>Allow guests to search without logging in</strong>
</label>
</div>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="useOutgoingLinksPage"> <strong>Use Outgoing Links Warning Page</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="disableSocialButtons"> <strong>Disable social buttons</strong>
</label>
</div>
</form>
</div>
<!-- IMPORT admin/settings/footer.tpl -->

@ -0,0 +1,17 @@
<h1><i class="fa fa-cogs"></i> Settings</h1>
<hr />
<ul class="nav nav-pills settings">
<li data-pill="general"><a href="{relative_path}/admin/settings/general">General</a></li>
<li data-pill="reputation"><a href="{relative_path}/admin/settings/reputation">Reputation</a></li>
<li data-pill="email"><a href="{relative_path}/admin/settings/email">Email</a></li>
<li data-pill="user"><a href="{relative_path}/admin/settings/user">User</a></li>
<li data-pill="post"><a href="{relative_path}/admin/settings/post">Post</a></li>
<li data-pill="pagination"><a href="{relative_path}/admin/settings/pagination">Pagination</a></li>
<li data-pill="tags"><a href="{relative_path}/admin/settings/tags">Tags</a></li>
<li data-pill="web-crawler"><a href="{relative_path}/admin/settings/web-crawler">Web Crawler</a></li>
<li data-pill="sockets"><a href="{relative_path}/admin/settings/sockets">Sockets</a></li>
<li data-pill="advanced"><a href="{relative_path}/admin/settings/advanced">Advanced</a></li>
</ul>
<br />

@ -1,16 +1,18 @@
<div class="tab-pane" id="pagination">
<form>
<div class="alert alert-warning">
<div class="checkbox">
<label>
<input type="checkbox" data-field="usePagination"> <strong>Paginate topics and posts instead of using infinite scroll.</strong>
</label>
</div>
<!-- IMPORT admin/settings/header.tpl -->
<strong>Topics per Page</strong><br /> <input type="text" class="form-control" value="20" data-field="topicsPerPage"><br />
<strong>Posts per Page</strong><br /> <input type="text" class="form-control" value="20" data-field="postsPerPage"><br />
<hr/>
<strong>Initial Number of Topics to Load (Unread, Recent, Popular etc.)</strong><br /> <input type="text" class="form-control" value="20" data-field="topicsPerList"><br />
</div>
</form>
</div>
<form>
<div class="alert alert-warning">
<div class="checkbox">
<label>
<input type="checkbox" data-field="usePagination"> <strong>Paginate topics and posts instead of using infinite scroll.</strong>
</label>
</div>
<strong>Topics per Page</strong><br /> <input type="text" class="form-control" value="20" data-field="topicsPerPage"><br />
<strong>Posts per Page</strong><br /> <input type="text" class="form-control" value="20" data-field="postsPerPage"><br />
<hr/>
<strong>Initial Number of Topics to Load (Unread, Recent, Popular etc.)</strong><br /> <input type="text" class="form-control" value="20" data-field="topicsPerList"><br />
</div>
</form>
<!-- IMPORT admin/settings/footer.tpl -->

@ -1,61 +1,63 @@
<div class="tab-pane" id="post">
<form>
<div class="alert alert-warning">
<div class="form-group">
<label>Default Post Sorting</label>
<select class="form-control" data-field="topicPostSort">
<option value="oldest_to_newest">Oldest to Newest</option>
<option value="newest_to_oldest">Newest to Oldest</option>
<option value="most_votes">Most Votes</option>
</select>
</div>
<!-- IMPORT admin/settings/header.tpl -->
<strong>Seconds between Posts</strong><br /> <input type="text" class="form-control" value="10" data-field="postDelay"><br />
<strong>Seconds before new user can post</strong><br /> <input type="text" class="form-control" value="10" data-field="initialPostDelay"><br />
<strong>Minimum Title Length</strong><br /> <input type="text" class="form-control" value="3" data-field="minimumTitleLength"><br />
<strong>Maximum Title Length</strong><br /> <input type="text" class="form-control" value="255" data-field="maximumTitleLength"><br />
<strong>Minimum Post Length</strong><br /> <input type="text" class="form-control" value="8" data-field="minimumPostLength"><br />
<div class="checkbox">
<label>
<input type="checkbox" data-field="disableSignatures"> <strong>Disable signatures</strong>
</label>
</div>
<strong>Chat Message Inbox Size</strong><br /> <input type="text" class="form-control" value="250" data-field="chatMessageInboxSize"><br />
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowFileUploads"> <strong>Allow users to upload regular files</strong>
</label>
</div>
<strong>Maximum File Size</strong><br /> <input type="text" class="form-control" value="2048" data-field="maximumFileSize"><br />
<form>
<div class="alert alert-warning">
<div class="form-group">
<label>Default Post Sorting</label>
<select class="form-control" data-field="topicPostSort">
<option value="oldest_to_newest">Oldest to Newest</option>
<option value="newest_to_oldest">Newest to Oldest</option>
<option value="most_votes">Most Votes</option>
</select>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowTopicsThumbnail"> <strong>Allow users to upload topic thumbnails</strong>
</label>
</div>
<strong>Topic Thumb Size</strong><br /> <input type="text" class="form-control" value="120" data-field="topicThumbSize"><br />
<strong>Seconds between Posts</strong><br /> <input type="text" class="form-control" value="10" data-field="postDelay"><br />
<strong>Seconds before new user can post</strong><br /> <input type="text" class="form-control" value="10" data-field="initialPostDelay"><br />
<strong>Minimum Title Length</strong><br /> <input type="text" class="form-control" value="3" data-field="minimumTitleLength"><br />
<strong>Maximum Title Length</strong><br /> <input type="text" class="form-control" value="255" data-field="maximumTitleLength"><br />
<strong>Minimum Post Length</strong><br /> <input type="text" class="form-control" value="8" data-field="minimumPostLength"><br />
<div class="checkbox">
<label>
<input type="checkbox" data-field="disableSignatures"> <strong>Disable signatures</strong>
</label>
</div>
<strong>Chat Message Inbox Size</strong><br /> <input type="text" class="form-control" value="250" data-field="chatMessageInboxSize"><br />
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowFileUploads"> <strong>Allow users to upload regular files</strong>
</label>
</div>
<strong>Maximum File Size</strong><br /> <input type="text" class="form-control" value="2048" data-field="maximumFileSize"><br />
<h3>Composer Settings</h3>
<p>
The following settings govern the functionality and/or appearance of the post composer shown
to users when they create new topics, or reply to existing topics.
</p>
<div class="checkbox">
<label for="composer:showHelpTab">
<input type="checkbox" id="composer:showHelpTab" data-field="composer:showHelpTab" checked />
Show "Help" tab
</label>
</div>
<div class="checkbox">
<label for="composer:allowPluginHelp">
<input type="checkbox" id="composer:allowPluginHelp" data-field="composer:allowPluginHelp" checked />
Allow plugins to add content to the help tab
</label>
</div>
<div class="form-group">
<label for="composer:customHelpText">Custom Help Text</label>
<textarea class="form-control" id="composer:customHelpText" data-field="composer:customHelpText" rows="5"></textarea>
</div>
</div>
</form>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowTopicsThumbnail"> <strong>Allow users to upload topic thumbnails</strong>
</label>
</div>
<strong>Topic Thumb Size</strong><br /> <input type="text" class="form-control" value="120" data-field="topicThumbSize"><br />
<h3>Composer Settings</h3>
<p>
The following settings govern the functionality and/or appearance of the post composer shown
to users when they create new topics, or reply to existing topics.
</p>
<div class="checkbox">
<label for="composer:showHelpTab">
<input type="checkbox" id="composer:showHelpTab" data-field="composer:showHelpTab" checked />
Show "Help" tab
</label>
</div>
<div class="checkbox">
<label for="composer:allowPluginHelp">
<input type="checkbox" id="composer:allowPluginHelp" data-field="composer:allowPluginHelp" checked />
Allow plugins to add content to the help tab
</label>
</div>
<div class="form-group">
<label for="composer:customHelpText">Custom Help Text</label>
<textarea class="form-control" id="composer:customHelpText" data-field="composer:customHelpText" rows="5"></textarea>
</div>
</div>
</form>
<!-- IMPORT admin/settings/footer.tpl -->

@ -0,0 +1,36 @@
<!-- IMPORT admin/settings/header.tpl -->
<form>
<div class="alert alert-warning">
<div class="checkbox">
<label>
<input type="checkbox" data-field="reputation:disabled"> <strong>Disable Reputation System</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="downvote:disabled"> <strong>Disable Down Voting</trong>
</label>
</div>
</div>
<div class="alert alert-warning">
<h3>Privilege Thresholds</h3>
<p>Use <strong>privilege thresholds</strong> to manage how much reputation a user must gain to receive moderator access.</p><br />
<strong>Manage Thread</strong><br /> <input type="text" class="form-control" value="1000" data-field="privileges:manage_topic"><br />
<strong>Manage Content</strong><br /> <input type="text" class="form-control" value="1000" data-field="privileges:manage_content"><br />
<div class="checkbox">
<label>
<input type="checkbox" data-field="privileges:disabled"> <strong>Disable Privilege Threshold System</strong>
</label>
</div>
</div>
<div class="alert alert-warning">
<h3>Activity Thresholds</h3>
<strong>Minimum reputation to downvote posts</strong><br /> <input type="text" class="form-control" data-field="privileges:downvote"><br />
<strong>Minimum reputation to flag posts</strong><br /> <input type="text" class="form-control" data-field="privileges:flag"><br />
</div>
</form>
<!-- IMPORT admin/settings/footer.tpl -->

@ -1,21 +1,23 @@
<div class="tab-pane" id="sockets">
<form>
<div class="alert alert-warning">
<div class="form-group">
<label for="maxReconnectionAttempts">Max Reconnection Attempts</label>
<input class="form-control" id="maxReconnectionAttempts" type="text" value="5" data-field="maxReconnectionAttempts" /><br />
</div>
<div class="form-group">
<label for="reconnectionDelay">Reconnection Delay</label>
<input class="form-control" id="reconnectionDelay" type="text" value="200" data-field="reconnectionDelay" /><br />
</div>
<div class="form-group">
<label for="websocketAddress">Websocket Address</label>
<input class="form-control" id="websocketAddress" type="text" data-field="websocketAddress" /><br />
<p class="help-block">
Leave blank if unsure.
</p>
</div>
</div>
</form>
</div>
<!-- IMPORT admin/settings/header.tpl -->
<form>
<div class="alert alert-warning">
<div class="form-group">
<label for="maxReconnectionAttempts">Max Reconnection Attempts</label>
<input class="form-control" id="maxReconnectionAttempts" type="text" value="5" data-field="maxReconnectionAttempts" /><br />
</div>
<div class="form-group">
<label for="reconnectionDelay">Reconnection Delay</label>
<input class="form-control" id="reconnectionDelay" type="text" value="200" data-field="reconnectionDelay" /><br />
</div>
<div class="form-group">
<label for="websocketAddress">Websocket Address</label>
<input class="form-control" id="websocketAddress" type="text" data-field="websocketAddress" /><br />
<p class="help-block">
Leave blank if unsure.
</p>
</div>
</div>
</form>
<!-- IMPORT admin/settings/footer.tpl -->

@ -1,9 +1,11 @@
<div class="tab-pane" id="tags">
<form>
<div class="alert alert-warning">
<strong>Tags per Topic</strong><br /> <input type="text" class="form-control" value="5" data-field="tagsPerTopic"><br />
<strong>Minimum Tag Length</strong><br /> <input type="text" class="form-control" value="3" data-field="minimumTagLength"><br />
<strong>Maximum Tag Length</strong><br /> <input type="text" class="form-control" value="15" data-field="maximumTagLength"><br />
</div>
</form>
</div>
<!-- IMPORT admin/settings/header.tpl -->
<form>
<div class="alert alert-warning">
<strong>Tags per Topic</strong><br /> <input type="text" class="form-control" value="5" data-field="tagsPerTopic"><br />
<strong>Minimum Tag Length</strong><br /> <input type="text" class="form-control" value="3" data-field="minimumTagLength"><br />
<strong>Maximum Tag Length</strong><br /> <input type="text" class="form-control" value="15" data-field="maximumTagLength"><br />
</div>
</form>
<!-- IMPORT admin/settings/footer.tpl -->

@ -1,117 +1,119 @@
<div class="tab-pane" id="user">
<form role="form">
<div class="alert alert-warning">
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowRegistration" checked> <strong>Allow registration</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowLocalLogin" checked> <strong>Allow local login</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowAccountDelete" checked> <strong>Allow account deletion</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="privateUserInfo"> <strong>Make user info private</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="requireEmailConfirmation"> <strong>Require Email Confirmation</strong>
</label>
</div>
<h3>Avatars</h3>
<div class="checkbox">
<label>
<input type="checkbox" data-field="profile:convertProfileImageToPNG"> <strong>Convert profile image uploads to PNG</strong>
</label>
</div>
<!-- IMPORT admin/settings/header.tpl -->
<div class="form-group">
<label>Default Gravatar Image</label>
<select class="form-control" data-field="defaultGravatarImage">
<option value="">default</option>
<option value="identicon">identicon</option>
<option value="mm">mystery-man</option>
<option value="monsterid">monsterid</option>
<option value="wavatar">wavatar</option>
<option value="retro">retro</option>
</select>
</div>
<form role="form">
<div class="alert alert-warning">
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowRegistration" checked> <strong>Allow registration</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowLocalLogin" checked> <strong>Allow local login</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowAccountDelete" checked> <strong>Allow account deletion</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="privateUserInfo"> <strong>Make user info private</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="requireEmailConfirmation"> <strong>Require Email Confirmation</strong>
</label>
</div>
<h3>Avatars</h3>
<div class="checkbox">
<label>
<input type="checkbox" data-field="profile:convertProfileImageToPNG"> <strong>Convert profile image uploads to PNG</strong>
</label>
</div>
<div class="form-group">
<label>Custom Gravatar Default Image</label>
<input id="customGravatarDefaultImage" type="text" class="form-control" placeholder="A custom image to use instead of gravatar defaults" data-field="customGravatarDefaultImage" /><br />
<input data-action="upload" data-target="customGravatarDefaultImage" data-route="{relative_path}/admin/uploadgravatardefault" type="button" class="btn btn-default" value="Upload"></input>
</div>
<div class="form-group">
<label>Default Gravatar Image</label>
<select class="form-control" data-field="defaultGravatarImage">
<option value="">default</option>
<option value="identicon">identicon</option>
<option value="mm">mystery-man</option>
<option value="monsterid">monsterid</option>
<option value="wavatar">wavatar</option>
<option value="retro">retro</option>
</select>
</div>
<div class="form-group">
<label for="profileImageDimension">Profile Image Dimension</label>
<input id="profileImageDimension" type="text" class="form-control" data-field="profileImageDimension" placeholder="128" />
</div>
<div class="form-group">
<label>Custom Gravatar Default Image</label>
<input id="customGravatarDefaultImage" type="text" class="form-control" placeholder="A custom image to use instead of gravatar defaults" data-field="customGravatarDefaultImage" /><br />
<input data-action="upload" data-target="customGravatarDefaultImage" data-route="{relative_path}/admin/uploadgravatardefault" type="button" class="btn btn-default" value="Upload"></input>
</div>
<div class="form-group">
<label for="profileImageDimension">Profile Image Dimension</label>
<input id="profileImageDimension" type="text" class="form-control" data-field="profileImageDimension" placeholder="128" />
</div>
<h3>Account Protection</h3>
<div class="form-group">
<label for="loginAttempts">Login attempts per hour</label>
<input id="loginAttempts" type="text" class="form-control" data-field="loginAttempts" placeholder="5" />
<p class="help-block">
If login attempts to a user&apos;s account exceeds this threshold, that account will be locked for a pre-configured amount of time
</p>
</div>
<div class="form-group">
<label for="lockoutDuration">Account Lockout Duration (minutes)</label>
<input id="lockoutDuration" type="text" class="form-control" data-field="lockoutDuration" placeholder="60" />
</div>
<div class="form-group">
<label>Days to remember user login sessions</label>
<input type="text" class="form-control" data-field="loginDays" placeholder="14" />
</div>
<h3>Other</h3>
<div class="form-group">
<label>Number of flags to ban user</label>
<input type="text" class="form-control" value="3" placeholder="" data-field="flagsForBan" />
</div>
<hr />
<div class="checkbox">
<label>
<input type="checkbox" data-field="autoban:downvote"> <strong>Enable automatic banning for reaching below a reputation threshold</strong>
</label>
</div>
<label>Reputation threshold before receiving an automatic ban</label>
<input type="text" class="form-control" value="" placeholder="-50" data-field="autoban:downvote:threshold" />
<hr />
<div class="form-group">
<label>Maximum User Image File Size</label>
<input type="text" class="form-control" placeholder="Maximum size of uploaded user images in kilobytes" data-field="maximumProfileImageSize" />
</div>
<div class="form-group">
<label>Minimum Username Length</label>
<input type="text" class="form-control" value="2" data-field="minimumUsernameLength">
</div>
<div class="form-group">
<label>Maximum Username Length</label>
<input type="text" class="form-control" value="16" data-field="maximumUsernameLength">
</div>
<div class="form-group">
<label>Minimum Password Length</label>
<input type="text" class="form-control" value="6" data-field="minimumPasswordLength">
</div>
<div class="form-group">
<label>Maximum Signature Length</label>
<input type="text" class="form-control" value="255" data-field="maximumSignatureLength">
</div>
<div class="form-group">
<label>Forum Terms of Use <small>(Leave blank to disable)</small></label>
<textarea class="form-control" data-field="termsOfUse"></textarea>
</div>
</div>
</form>
</div>
<h3>Account Protection</h3>
<div class="form-group">
<label for="loginAttempts">Login attempts per hour</label>
<input id="loginAttempts" type="text" class="form-control" data-field="loginAttempts" placeholder="5" />
<p class="help-block">
If login attempts to a user&apos;s account exceeds this threshold, that account will be locked for a pre-configured amount of time
</p>
</div>
<div class="form-group">
<label for="lockoutDuration">Account Lockout Duration (minutes)</label>
<input id="lockoutDuration" type="text" class="form-control" data-field="lockoutDuration" placeholder="60" />
</div>
<div class="form-group">
<label>Days to remember user login sessions</label>
<input type="text" class="form-control" data-field="loginDays" placeholder="14" />
</div>
<h3>Other</h3>
<div class="form-group">
<label>Number of flags to ban user</label>
<input type="text" class="form-control" value="3" placeholder="" data-field="flagsForBan" />
</div>
<hr />
<div class="checkbox">
<label>
<input type="checkbox" data-field="autoban:downvote"> <strong>Enable automatic banning for reaching below a reputation threshold</strong>
</label>
</div>
<label>Reputation threshold before receiving an automatic ban</label>
<input type="text" class="form-control" value="" placeholder="-50" data-field="autoban:downvote:threshold" />
<hr />
<div class="form-group">
<label>Maximum User Image File Size</label>
<input type="text" class="form-control" placeholder="Maximum size of uploaded user images in kilobytes" data-field="maximumProfileImageSize" />
</div>
<div class="form-group">
<label>Minimum Username Length</label>
<input type="text" class="form-control" value="2" data-field="minimumUsernameLength">
</div>
<div class="form-group">
<label>Maximum Username Length</label>
<input type="text" class="form-control" value="16" data-field="maximumUsernameLength">
</div>
<div class="form-group">
<label>Minimum Password Length</label>
<input type="text" class="form-control" value="6" data-field="minimumPasswordLength">
</div>
<div class="form-group">
<label>Maximum Signature Length</label>
<input type="text" class="form-control" value="255" data-field="maximumSignatureLength">
</div>
<div class="form-group">
<label>Forum Terms of Use <small>(Leave blank to disable)</small></label>
<textarea class="form-control" data-field="termsOfUse"></textarea>
</div>
</div>
</form>
<!-- IMPORT admin/settings/footer.tpl -->

@ -1,23 +1,25 @@
<div class="tab-pane" id="web-crawler">
<form>
<div class="alert alert-warning">
<strong>Custom Robots.txt <small>Leave blank for default</small></strong><br />
<textarea class="form-control" data-field="robots.txt"></textarea>
</div>
<!-- IMPORT admin/settings/header.tpl -->
<div class="alert alert-warning">
<strong>Feeds</strong>
<div class="checkbox">
<label>
<input type="checkbox" data-field="feeds:disableRSS"> <strong>Disable RSS Feeds</strong>
</label>
</div>
<form>
<div class="alert alert-warning">
<strong>Custom Robots.txt <small>Leave blank for default</small></strong><br />
<textarea class="form-control" data-field="robots.txt"></textarea>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="feeds:disableSitemap"> <strong>Disable Sitemap.xml</strong>
</label>
</div>
</div>
</form>
</div>
<div class="alert alert-warning">
<strong>Feeds</strong>
<div class="checkbox">
<label>
<input type="checkbox" data-field="feeds:disableRSS"> <strong>Disable RSS Feeds</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="feeds:disableSitemap"> <strong>Disable Sitemap.xml</strong>
</label>
</div>
</div>
</form>
<!-- IMPORT admin/settings/footer.tpl -->
Loading…
Cancel
Save