Use this in a text editor that supports regex search (like Sublime Text)
Find all
\{\{#if ([\S]*)\}\}([\s\S]*?)\{\{else\}\}([\s\S]*?)\{\{/if\}\}
Replace With
<!-- IF $1 -->$2<!-- ELSE -->$3<!-- ENDIF $1 -->
var topics = module.parent.require('./topics'), | |
async = module.parent.require('async'); | |
var plugin = {}; | |
plugin.addPostData = function(data, uid, callback) { | |
async.map(data.topics, function(topic, next) { | |
topics.getMainPost(topic.tid, uid, function(err, mainPost) { | |
topic.mainPost = mainPost; | |
next(err, topic); |
module.listLTrim = function(key, start, stop, callback) { | |
module.getListRange(key, start, stop, function(err, value) { | |
if(err) { | |
if(typeof callback === 'function') { | |
return callback(err); | |
} | |
return; | |
} | |
db.collection('objects').update({_key: key }, {$set: value}, function(err, result) { |
<?php | |
if ( post_password_required() ) | |
return; | |
?> | |
<a id="nodebb/comments"></a> | |
<script type="text/javascript"> | |
var nodeBBURL = 'http://forum.burnaftercompiling.com', | |
articleID = '<?php echo the_ID(); ?>'; |
{ | |
"id": "nodebb-plugin-blog-comments", | |
"name": "NodeBB Blog Comments", | |
"description": "Lets NodeBB act as a comments engine/widget for your blog.", | |
"url": "https://github.com/psychobunny/nodebb-plugin-blog-comments", | |
"library": "./library.js", | |
"hooks": [ | |
{ | |
"hook": "filter:admin.header.build", "method": "addAdminLink" | |
}, |
{ | |
"categories": [ | |
{ | |
"cid": "1", | |
"name": "Announcements", | |
"description": "Announcements regarding our community", | |
"icon": "fa-bullhorn", | |
"bgColor": "#0059B2", | |
"color": "#fff", | |
"slug": "1/announcements", |
var async = require('async'), | |
categories = module.parent.require('./categories'); | |
var Plugin = {}; | |
function renderHomepage(req, res, next) { | |
var uid = req.user ? req.user.uid : 0; | |
/* | |
* For reference, this is taken straight from controllers/index.js (controllers.home) |
Use this in a text editor that supports regex search (like Sublime Text)
Find all
\{\{#if ([\S]*)\}\}([\s\S]*?)\{\{else\}\}([\s\S]*?)\{\{/if\}\}
Replace With
<!-- IF $1 -->$2<!-- ELSE -->$3<!-- ENDIF $1 -->
<div id="category-selector" style="position: relative"> | |
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">Categories <span class="caret"></span></button> | |
<ul class="dropdown-menu" aria-labelledby="category-selector"> | |
</ul> | |
</div> | |
<br /> | |
<script> | |
// If you're using the custom homepage mod, switch the api call to /api/forum | |
$.get(RELATIVE_PATH + '/api/home', {}, function(data) { |
var templates = require('./../../public/src/templates'), | |
translator = require('./../../public/src/translator'), | |
middleware = require('./middleware'), | |
meta = require('./../meta'), | |
db = require('./../database'), | |
auth = require('./../routes/authentication'), | |
async = require('async'), | |
path = require('path'), | |
fs = require('fs'), | |
nconf = require('nconf'), |
async.series({ | |
currentThemeData: function(next) { | |
db.getObjectFields('config', ['theme:type', 'theme:id', 'theme:staticDir', 'theme:templates'], function(err, themeData) { | |
next(err, themeData); | |
}); | |
}, | |
themesData: function(next) { | |
meta.themes.get(function(err, themes) { | |
next(err, themes); | |
}); |