|
|
|
@ -22,7 +22,6 @@ global.modules = modules;
|
|
|
|
|
modules.templates.init();
|
|
|
|
|
modules.websockets.init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//setup scripts to be moved outside of the app in future.
|
|
|
|
@ -32,34 +31,12 @@ global.modules = modules;
|
|
|
|
|
if (data.categories.length === 0) {
|
|
|
|
|
console.log('Setting up default categories...');
|
|
|
|
|
|
|
|
|
|
modules.categories.create({
|
|
|
|
|
'name': 'Announcements',
|
|
|
|
|
'description': 'A place to talk about whateeeever you want',
|
|
|
|
|
'blockclass': 'category-purple',
|
|
|
|
|
'icon' : 'icon-bullhorn'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modules.categories.create({
|
|
|
|
|
'name': 'General Discussion',
|
|
|
|
|
'description': 'A place to talk about whateeeever you want',
|
|
|
|
|
'blockclass': 'category-purple',
|
|
|
|
|
'icon' : 'icon-comment'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules.categories.create({
|
|
|
|
|
'name': 'NodeBB Development',
|
|
|
|
|
'description': 'Bugs? Dont worry, we dont read this thread, so post them here.',
|
|
|
|
|
'blockclass': 'category-purple',
|
|
|
|
|
'icon' : 'icon-github-alt'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules.categories.create({
|
|
|
|
|
'name': 'Blogs',
|
|
|
|
|
'description': 'In future an example of how a hidden category should look like.',
|
|
|
|
|
'blockclass': 'category-purple',
|
|
|
|
|
'icon' : 'icon-pencil'
|
|
|
|
|
modules.fs.readFile(config.ROOT_DIRECTORY + '/install/data/categories.json', function(err, categories) {
|
|
|
|
|
categories = JSON.parse(categories);
|
|
|
|
|
|
|
|
|
|
for (var category in categories) {
|
|
|
|
|
modules.categories.create(categories[category]);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
} else console.log('Good.');
|
|
|
|
|