live tiles on home page, ninjaed from andrew might need to randomize starting times, can be disabled by removing the slider class from the div, maybe this should be a setting in admin/categories

This commit is contained in:
Baris Soner Usakli
2013-07-06 22:02:24 -04:00
parent 8f4848cc69
commit ac04bef26e
6 changed files with 137 additions and 13 deletions

View File

@@ -200,6 +200,8 @@ var RDB = require('./redis.js'),
});
}
Categories.getModerators = function(cid, callback) {
RDB.smembers('cid:' + cid + ':moderators', function(err, mods) {
if (mods.length === 0)
@@ -274,11 +276,11 @@ var RDB = require('./redis.js'),
});
}
Categories.getRecentReplies = function(cid, callback) {
RDB.zrevrange('categories:recent_posts:cid:' + cid, 0, 4, function(err, pids) {
Categories.getRecentReplies = function(cid, count, callback) {
RDB.zrevrange('categories:recent_posts:cid:' + cid, 0, count, function(err, pids) {
if (pids.length == 0) {
callback(false);
callback([]);
return;
}
posts.getPostSummaryByPids(pids, function(posts) {
@@ -330,5 +332,7 @@ var RDB = require('./redis.js'),
});
}
};
}(exports));