I don't know of any plugin that is already built to do what you want. Like most of the rest of us, you will likely have to write some Node JavaScript to create the plugin to suit your needs. I don't have the time to write custom code for free, although if it is worth money to you, the NodeBB development team may be interested in consulting for you.
Now that I re-read what you originally asked, I'm curious if you actually need "Sockets" (as in SocketIO, which is server-initiated TCP/IP connection to a browser) or if APIs on both the hosted NodeBB server and the localhost server would do this better.
Either way, if you choose to go the NodeBB plugin route, you will need to know which Hooks are available. A "hook" is an event that your plugin subscribes to. When that event happens in the core NodeBB server, it will call the function in your plugin which subscribes to the event.
The masonry.js not loaded if page refreshes directly
-
Issue Description:
I use theme Lavender to have masonry effect for my Categories page. When I clicked on the navigation button to this page, the masonry effect shows correctly. However, if I refreshed the page by F5 or access directly http://localhost:4567/categories , the masonry effect wasn't applied as below.
Questions:
I want to figure out if this is problem on the plugin nodebb-theme-lavender or nodebb won't load the plugin scripts (directly load or F5) by design.Could some one give me some idea about this?
-
I think the theme wasn't updated to handle the changes to the script load order, so it is not calling
doMasonry
when the page is cold loaded. Will work on a fix, thanks for reporting. -
@baris said in The masonry.js not loaded if page refreshes directly:
doMasonry
Thanks for your update. Is it in nodebb core or in plugin nodebb-theme-lavender? I may have to fix it a.s.a.p. to solve our production problem as categary become our home page.
-
It is in nodebb-theme-lavender but I am not 100% sure if thats the problem, you can find it here https://github.com/NodeBB/nodebb-theme-lavender/blob/master/static/lib/lavender.js#L69
-
@baris Thanks. I applied a dirty fix below:
//page load or reload to doMasonry if($('.masonry').length) { doMasonry(); }
The github fork is here:
https://github.com/georgezhang/nodebb-theme-lavender/blob/master/static/lib/lavender.js -
I’ve had this problem for quite some time so happy to see a fix may occur. Thanks!