admin stuff, removed deprecated install templates, blah blah
parent
c5d8a5a6b2
commit
ea8aa3fff2
@ -1,51 +0,0 @@
|
||||
|
||||
<h1>Step 2 – Basic Information</h1>
|
||||
|
||||
<form class="form-inline">
|
||||
<h3>Path Information</h3>
|
||||
<p>
|
||||
Please enter the web-accessible url that will be used to point to the NodeBB installation. If you are using a port number in the address,
|
||||
<strong>include it in the field below, not here</strong>. Do not include a trailing slash.<br />
|
||||
<input type="text" class="input-large" data-field="base_url" placeholder="http://www.example.org" />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label class="checkbox"><input type="checkbox" data-field="use_port" checked /> Use port</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>Port</label> <input type="number" class="input-mini" data-field="port" value="4567" placeholder="4567" />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Path to uploads folder (relative to the root of the NodeBB install)<br />
|
||||
<input type="text" class="input-large" data-field="upload_url" value="/public/uploads" placeholder="/public/uploads" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<h3>NodeBB Secret</h3>
|
||||
<p>
|
||||
This "secret" is used to encode user sessions, so they are not stored in plaintext. Enter a bunch of random characters below:
|
||||
</p>
|
||||
<input type="text" class="input-xxlarge" data-field="secret" placeholder="n239he#dh9j9$jc4h%y4yuhnx9y(&#y9ryn9c3" />
|
||||
|
||||
<hr />
|
||||
<div class="pull-right">
|
||||
<button data-path="mail" class="btn btn-primary btn-lg">Next – <i class="fa fa-envelope"></i> Mail</button>
|
||||
</div>
|
||||
<div>
|
||||
<button data-path="redis" class="btn btn-primary btn-lg">Previous – <i class="fa fa-hdd-o"></i> Redis</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
nodebb_setup.prepare();
|
||||
|
||||
var portToggle = document.querySelector('input[data-field="use_port"]'),
|
||||
portEl = document.querySelector('input[data-field="port"]');
|
||||
|
||||
portToggle.addEventListener('change', function(e) {
|
||||
if (e.target.checked) portEl.disabled = false;
|
||||
else portEl.disabled = true;
|
||||
});
|
||||
})();
|
||||
</script>
|
@ -1,143 +0,0 @@
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var nodebb_setup = {
|
||||
config: undefined,
|
||||
prepare: function() {
|
||||
// Bounce if config is not ready
|
||||
// if (nodebb_setup.config === undefined) {
|
||||
// ajaxify.go('install/redis');
|
||||
// app.alert({
|
||||
// alert_id: 'config-ready',
|
||||
// type: 'danger',
|
||||
// timeout: 10000,
|
||||
// title: 'NodeBB Configuration Not Ready!',
|
||||
// message: 'NodeBB cannot proceed with setup at this time as Redis database information ' +
|
||||
// 'was not found. Please enter the information below.'
|
||||
// });
|
||||
|
||||
// return;
|
||||
// }
|
||||
|
||||
// Come back in 500ms if the config isn't ready yet
|
||||
if (nodebb_setup.config === undefined) {
|
||||
console.log('Config not ready...');
|
||||
setTimeout(function() {
|
||||
nodebb_setup.prepare();
|
||||
}, 500);
|
||||
return;
|
||||
}
|
||||
|
||||
// Populate the fields on the page from the config
|
||||
var fields = document.querySelectorAll('#content [data-field]'),
|
||||
numFields = fields.length,
|
||||
x, key, inputType;
|
||||
for(x=0;x<numFields;x++) {
|
||||
key = fields[x].getAttribute('data-field');
|
||||
inputType = fields[x].getAttribute('type');
|
||||
if (nodebb_setup.config[key]) {
|
||||
switch(inputType) {
|
||||
case 'text':
|
||||
case 'textarea':
|
||||
case 'number':
|
||||
fields[x].value = nodebb_setup.config[key];
|
||||
break;
|
||||
|
||||
case 'checkbox':
|
||||
fields[x].checked = nodebb_setup.config[key] ? true : false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// Save defaults, if they're not found in the config
|
||||
var defaultFields = [
|
||||
'use_port', 'port', 'upload_url', 'mailer:host',
|
||||
'mailer:port', 'privileges:manage_content',
|
||||
'privileges:manage_topic'
|
||||
],
|
||||
defaultVal;
|
||||
if (defaultFields.indexOf(key) !== -1) {
|
||||
console.log('saving default value: ', key);
|
||||
switch(inputType) {
|
||||
case 'text':
|
||||
case 'textarea':
|
||||
case 'number':
|
||||
defaultVal = fields[x].value;
|
||||
break;
|
||||
|
||||
case 'checkbox':
|
||||
defaultVal = fields[x].checked ? '1' : '0';
|
||||
break;
|
||||
}
|
||||
socket.emit('api:config.set', {
|
||||
key: key,
|
||||
value: defaultVal
|
||||
});
|
||||
nodebb_setup.config[key] = defaultVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
(function() {
|
||||
// Listen for field changes and auto-save on change
|
||||
var contentEl = document.getElementById('content');
|
||||
|
||||
contentEl.addEventListener('change', function(e) {
|
||||
if (e.target.hasAttribute('data-field')) {
|
||||
var key = e.target.getAttribute('data-field'),
|
||||
value;
|
||||
|
||||
switch(e.target.getAttribute('type')) {
|
||||
case 'text':
|
||||
case 'textarea':
|
||||
case 'number':
|
||||
value = e.target.value;
|
||||
break;
|
||||
case 'checkbox':
|
||||
value = e.target.checked ? 1 : 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
socket.emit('api:config.set', { key: key, value: value });
|
||||
nodebb_setup.config[key] = value;
|
||||
}
|
||||
}, false);
|
||||
contentEl.addEventListener('click', function(e) {
|
||||
if (e.target.hasAttribute('data-path')) {
|
||||
var href = 'install/' + e.target.getAttribute('data-path');
|
||||
if (!e.target.disabled) ajaxify.go(href);
|
||||
}
|
||||
}, false);
|
||||
|
||||
socket.emit('api:config.get');
|
||||
socket.on('api:config.get', function(data) {
|
||||
nodebb_setup.config = data;
|
||||
});
|
||||
|
||||
socket.on('api:config.set', function(data) {
|
||||
if (data.status === 'ok') {
|
||||
app.alert({
|
||||
alert_id: 'config_status',
|
||||
timeout: 2500,
|
||||
title: 'Configuration Saved',
|
||||
message: 'Your changes to the NodeBB configuration have been saved',
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
app.alert({
|
||||
alert_id: 'config_status',
|
||||
timeout: 2500,
|
||||
title: 'Configuration Not Saved',
|
||||
message: 'NodeBB encountered a problem saving your changes',
|
||||
type: 'danger'
|
||||
});
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
@ -1,52 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>NodeBB</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" CONTENT="NodeBB">
|
||||
<meta name="description" content="Node.js/Redis/Socket.io powered forums for a new generation">
|
||||
<link href="/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
|
||||
<link href="/vendor/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
|
||||
<link rel="stylesheet" href="/vendor/fontawesome/css/font-awesome.min.css">
|
||||
<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
|
||||
<script type="text/javascript" src="/vendor/jquery/js/jquery-ui-1.10.3.custom.min.js"></script>
|
||||
<script type="text/javascript" src="/vendor/jquery/js/jquery.form.js"></script>
|
||||
<script type="text/javascript" src="/vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
|
||||
<script type="text/javascript" src="/src/app.js"></script>
|
||||
<script type="text/javascript" src="/src/templates.js"></script>
|
||||
<script type="text/javascript" src="/src/ajaxify.js"></script>
|
||||
<script type="text/javascript" src="/src/utils.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/style.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<a class="brand" href="/install">NodeBB Installation</a>
|
||||
<button type="button" class="btn navbar-btn" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav nodebb-inline-block">
|
||||
<li>
|
||||
<a data-tab="email" href="/install/email"><i class="fa fa-envelope"></i> Mail</a>
|
||||
</li>
|
||||
<li>
|
||||
<a data-tab="social" href="/install/social"><i class="fa fa-facebook"></i> Social</a>
|
||||
</li>
|
||||
<li>
|
||||
<a data-tab="privileges" href="/install/privileges"><i class="fa fa-gavel"></i> Privileges</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="alert_window"></div>
|
||||
|
||||
<div class="container" id="content">
|
@ -1,33 +0,0 @@
|
||||
|
||||
<h1>Mailer Information</h1>
|
||||
|
||||
<form class="form-inline">
|
||||
<p>
|
||||
The mailer information is used when sending out registration confirmation emails to new users.
|
||||
It is also used to send password reset emails to users who have forgotten their password.
|
||||
</p>
|
||||
<p>
|
||||
The defaults here correspond to a local <code>sendmail</code> server, although any third-party
|
||||
mail server can be used.
|
||||
</p>
|
||||
<p>
|
||||
<label>Hostname</label> <input type="text" class="input-medium" data-field="mailer:host" value="127.0.0.1" placeholder="127.0.0.1" />
|
||||
</p>
|
||||
<p>
|
||||
<label>Port</label> <input type="number" class="input-mini" data-field="mailer:port" value="25" placeholder="25" />
|
||||
</p>
|
||||
<p>
|
||||
<label>From</label> <input type="text" class="input-large" data-field="mailer:from" placeholder="John Smith <jsmith@example.org>" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
<div class="pull-right">
|
||||
<button data-path="social" class="btn btn-primary btn-lg">Next – <i class="fa fa-facebook"></i> Social</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
nodebb_setup.prepare();
|
||||
})();
|
||||
</script>
|
@ -1,45 +0,0 @@
|
||||
<h1>User Privilege Thresholds</h1>
|
||||
|
||||
<form class="form-inline">
|
||||
<p>
|
||||
Privilege thresholds grants a community membership the ability to moderate itself.
|
||||
These numbers denote the minimum amount of user reputation required before the
|
||||
corresponding privilege is unlocked.
|
||||
</p>
|
||||
<p>
|
||||
Reputation is gained when other users favourite posts that you have made.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label>Manage Content</label> <input type="number" class="input-mini" value="1000" placeholder="1000" data-field="privileges:manage_content" />
|
||||
</p>
|
||||
<p>
|
||||
Users who reach the "Manage Content" threshold are able to edit/delete other users' posts.
|
||||
</p>
|
||||
<p>
|
||||
<label>Manage Topics</label> <input type="number" class="input-mini" value="2000" placeholder="2000" data-field="privileges:manage_topic" />
|
||||
</p>
|
||||
<p>
|
||||
Users who reach the "Manage Topics" threshold are able to edit, lock, pin, close, and delete topics.
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
<div class="pull-right">
|
||||
<button id="start-nodebb" class="btn btn-success btn-lg"><i class="fa fa-thumbs-up"></i> Start using NodeBB!</button>
|
||||
</div>
|
||||
<div>
|
||||
<button data-path="social" class="btn btn-primary btn-lg">Previous – <i class="fa fa-facebook"></i> Social</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
nodebb_setup.prepare();
|
||||
|
||||
var startEl = document.getElementById('start-nodebb');
|
||||
startEl.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
document.location.href = '/';
|
||||
});
|
||||
})();
|
||||
</script>
|
@ -1,81 +0,0 @@
|
||||
|
||||
<h1>Step 1 – Establish Redis Connection</h1>
|
||||
|
||||
<p class="lead">
|
||||
Thanks for choosing to install NodeBB! We'll need some information to set up your installation
|
||||
configuration...
|
||||
</p>
|
||||
<p>
|
||||
Please enter the details of your Redis server here. If redis is hosted on the same
|
||||
server as NodeBB, you can leave the default values as-is.
|
||||
</p>
|
||||
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="redis-hostname">Hostname</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="redis-hostname" class="input-medium" placeholder="127.0.0.1" value="127.0.0.1" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="redis-port">Port</label>
|
||||
<div class="controls">
|
||||
<input type="number" id="redis-port" class="input-mini" placeholder="6379" value="6379" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button class="btn" id="test-redis">Test</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
<div class="pull-right">
|
||||
<button data-path="basic" class="btn btn-primary btn-lg" disabled>Next – <i class="fa fa-cog"></i> Basic</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
var testRedisEl = document.getElementById('test-redis');
|
||||
testRedisEl.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (e.target.className.indexOf('testing') === -1) {
|
||||
e.target.className += ' testing';
|
||||
e.target.innerHTML = '<i class="fa fa-spinner fa-spin"></i> Testing';
|
||||
socket.once('api:config.redisTest', function(data) {
|
||||
if (data && data.status === 'ok') {
|
||||
e.target.className = 'btn btn-success testing';
|
||||
e.target.innerHTML = 'Redis Connection Successful!';
|
||||
|
||||
app.alert({
|
||||
type: 'success',
|
||||
timeout: 10000,
|
||||
alert_id: 'config-ready',
|
||||
title: 'Setup Ready!',
|
||||
message: 'NodeBB is ready to continue with the setup process. ' +
|
||||
'Any changes you make now will be saved automatically'
|
||||
});
|
||||
|
||||
// Grab configs from the db and enable the 'next' button
|
||||
socket.emit('api:config.setup', {
|
||||
'redis/host': document.getElementById('redis-hostname').value,
|
||||
'redis/port': document.getElementById('redis-port').value
|
||||
});
|
||||
} else {
|
||||
e.target.className = 'btn btn-danger';
|
||||
e.target.innerHTML = 'Could not connect to Redis, click here to test again';
|
||||
}
|
||||
});
|
||||
socket.emit('api:config.redisTest');
|
||||
}
|
||||
});
|
||||
|
||||
var nextBtn = document.querySelector('button[data-path="basic"]');
|
||||
socket.once('api:config.setup', function(data) {
|
||||
nodebb_setup.config = data;
|
||||
nextBtn.disabled = false;
|
||||
});
|
||||
})();
|
||||
</script>
|
@ -1,47 +0,0 @@
|
||||
|
||||
<h1>Social Media Logins</h1>
|
||||
|
||||
<form class="form-inline">
|
||||
<p>
|
||||
You may opt to allow users to register and login in via a social media account, if that
|
||||
social network supports doing so.
|
||||
</p>
|
||||
|
||||
<h3>Facebook</h3>
|
||||
<p>
|
||||
<label>Application ID</label> <input type="text" class="input-medium" data-field="social:facebook:app_id" />
|
||||
</p>
|
||||
<p>
|
||||
<label>Application Secret</label> <input type="text" class="input-large" data-field="social:facebook:secret" />
|
||||
</p>
|
||||
|
||||
<h3>Twitter</h3>
|
||||
<p>
|
||||
<label>Application Key</label> <input type="text" class="input-medium" data-field="social:twitter:key" />
|
||||
</p>
|
||||
<p>
|
||||
<label>Application Secret</label> <input type="text" class="input-large" data-field="social:twitter:secret" />
|
||||
</p>
|
||||
|
||||
<h3>Google</h3>
|
||||
<p>
|
||||
<label>Application ID</label> <input type="text" class="input-xxlarge" data-field="social:google:id" />
|
||||
</p>
|
||||
<p>
|
||||
<label>Application Secret</label> <input type="text" class="input-large" data-field="social:google:secret" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
<div class="pull-right">
|
||||
<button data-path="privileges" class="btn btn-primary btn-lg">Next – <i class="fa fa-gavel"></i> Privileges</button>
|
||||
</div>
|
||||
<div>
|
||||
<button data-path="mail" class="btn btn-primary btn-lg">Previous – <i class="fa fa-envelope"></i> Mail</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
nodebb_setup.prepare();
|
||||
})();
|
||||
</script>
|
Loading…
Reference in New Issue