Last active
August 29, 2015 14:27
-
-
Save PAEz/886790c8ee15d78b1338 to your computer and use it in GitHub Desktop.
Plugin sockets with NodeBB 0.7.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function callBack(config) { | |
Katex.dollarInline = config.dollarInline; | |
deferred.resolve(config); | |
} | |
// do the async call to the socket. | |
socket.emit('plugins.Katex.getConfig', callBack); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The gists to plugin sockets with NodeBB 0.7.x | |
Getting settings/values from the server to the client. | |
https://community.nodebb.org/topic/5936/retrieve-setting-value-from-the-client-side |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PluginSocket = require.main.require('./src/socket.io/plugins'); | |
PluginSocket.Katex = {}; | |
PluginSocket.Katex.getConfig = function (socket, callback) { | |
var data = { | |
dollarInline: _self.config.dollarInline, | |
}; | |
callback(data); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment