From bf677522a93ec4c48f6b0fa27ab1388f9eedba4c Mon Sep 17 00:00:00 2001 From: psychobunny Date: Sun, 13 Oct 2013 19:16:48 -0400 Subject: [PATCH] added additional_profile_info footer in posts view; plugins - filter:posts.custom_profile_info hook lets you add info to post block footer also fixed app.alert - if title is not set then do not show title. --- app.js | 1 + public/src/app.js | 5 +++-- public/templates/topic.tpl | 6 ++++++ src/posts.js | 29 ++++++++++++++++++++--------- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/app.js b/app.js index 492faf9609..05ba01c22f 100644 --- a/app.js +++ b/app.js @@ -86,6 +86,7 @@ webserver = require('./src/webserver.js'), SocketIO = require('socket.io').listen(global.server, { log: false, transports: ['websocket', 'xhr-polling', 'jsonp-polling', 'flashsocket']}), websockets = require('./src/websockets.js'), + posts = require('./src/posts.js'), plugins = require('./src/plugins'); // Don't remove this - plugins initializes itself websockets.init(SocketIO); diff --git a/public/src/app.js b/public/src/app.js index 9681e293f3..9098cce749 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -136,6 +136,7 @@ var socket, var alert_id = 'alert_button_' + ((params.alert_id) ? params.alert_id : new Date().getTime()); var alert = $('#' + alert_id); + var title = params.title || ''; function startTimeout(div, timeout) { var timeoutId = setTimeout(function () { @@ -148,7 +149,7 @@ var socket, } if (alert.length > 0) { - alert.find('strong').html(params.title); + alert.find('strong').html(title); alert.find('p').html(params.message); alert.attr('class', "alert toaster-alert " + "alert-" + params.type); @@ -161,7 +162,7 @@ var socket, p = document.createElement('p'); p.innerHTML = params.message; - strong.innerHTML = params.title; + strong.innerHTML = title; div.className = "alert toaster-alert " + "alert-" + params.type; diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index 1488af1e3a..5db4ea3fd2 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -66,6 +66,9 @@
{main_posts.content}
{main_posts.signature}
+ + {main_posts.additional_profile_info} + posted | last edited by {main_posts.editorname} @@ -127,6 +130,9 @@
{posts.content}
{posts.signature}