[nodebb-plugin-shoutbox] Shoutbox plugin
-
@psychobunny Yeah it took me a while to find a nice way without adding anything to the core code, but I think my method is pretty nice Would be even better if there was a
plugin
socket.io module, where all the plugins would hook into -
the way you did it is interesting. I was asking julian earlier to implement a hook in websockets so we could add new socket calls (similar to the one in webserver for routes). maybe we don't need it then... @julian thoughts?
-
I just wrote this and used the same method as @mr_waffle. This seems fine to me and it also makes me think if we could use the same system in our other plugins. For example getting the express
app
object and adding routes to it inside the plugin instead of putting a hook forcreate_routes
. -
we need to ditch the
$(document).bind('DOMNodeInserted', function(event) {
and replace that with an
ajaxify.onchange
event for 0.3.1Just a heads up, for the three people who are using that technique atm
p.s. I have no idea how badly that performs but I would imagine it sucks.
-
@psychobunny Yup, requested that in the hook request thread as well
-
@StuartH said:
Only when my wife is near
no on nodebb 2.1Only edge is supported right now. I suppose you can do `npm install [email protected] to still get basic shoutbox functionality on your version.
-
let me know what I got to do to fix that @Mr_Waffle
-
Working fine for me. -
@psychobunny said:
we need to ditch the
$(document).bind('DOMNodeInserted', function(event) {
p.s. I have no idea how badly that performs but I would imagine it sucks.
it does suck - but you should see this, i've used it before, works like a charm (minus IE8)
http://jsfiddle.net/PkYb9/2/EDIT: time for a jsfiddle/jsbin embed plugin
-
haha well since you just said my codez suck your opinion is irrelevant
kidding
anyways ajaxify.onchange is the best solution to detect what page we're on, needs to be implemented, I'll make an issue
-
0.0.4 has been published.
Global changelog:- Fixed user box, now actually shows the online users
- Make usernames bold
- Added setting in AdminCP for the placement of the shoutbox
- Added action in AdminCP to prune shouts marked as deleted
- Added action in AdminCP to delete all the shouts from the database
- Archive button is now implemented (So you can look back at your highly intellectual shouts, like mine!)
- Overall refactoring to make everything better
- Admins can now delete everyone's shouts
- Probably some other stuff I forgot
-
@Mr_Waffle +1