Clicking the new header.navigation button for /forum does a hard load of the /forum page so transitions are not smooth. After going to /forum going to any other link on top bar smoothly transitions fine. Anyway to correct this?
cani
Posts
-
[nodebb-plugin-custom-homepage] Basic CMS plugin - custom homepage -
Plugin ideasExpanded widgets plugin that allows widgets to also be used for new category tiles. Instead of being on the side bar it would be cool to just add new category boxes with the widget html.
-
[nodebb-plugin-desktop-notifications] Desktop Notifications (like GMail)@xCausxn I initially had that issue, forgot what I did to get it working. Try restarting server, clearing cache?
-
How to make my site my own?Blue part on the top is the MOTD, editable via admin panel settings.
-
I have no idea what I am doingBasic linux method would be to put & at the end of the command you use to start it, like;
./nodebb start &
More information on that method can be found here http://www.cyberciti.biz/faq/linux-command-line-run-in-background/
I currently use upstart to run it in background and have it auto startup on box restarting. My nodebb.conf script located in /etc/init looks like this;
#!upstart # # An example upstart script for running a Node.js process as a service # using Forever as the process monitor. For more configuration options # associated with Forever, see: https://github.com/nodejitsu/forever # # You will need to set the environment variables noted below to conform to # your use case, and should change the description. # description "Example upstart script for a Node.js process" start on startup stop on shutdown # This line is needed so that Upstart reports the pid of the Node.js process # started by Forever rather than Forever's pid. expect fork # The following environment variables must be set so as to define # where Node.js and Forever binaries and the Node.js source code # can be found. # # The example environment variables below assume that Node.js is # installed into /home/node/local/node by building from source as outlined # here: # https://www.exratione.com/2011/07/running-a-nodejs-server-as-a-service-using-$ # # It should be easy enough to adapt to the paths to be appropriate to a # package installation, but note that the packages available for Ubuntu in # the default repositories are far behind the times. Most users will be # building from source to get a more recent Node.js version. # # The full path to the directory containing the node and forever binaries. # env NODE_BIN_DIR="/home/node/local/node/bin" # Set the NODE_PATH to the Node.js main node_modules directory. # env NODE_PATH="/home/node/local/node/lib/node_modules" # The directory containing the application Javascript file. # env APPLICATION_DIRECTORY="/home/node/my-application" # The application start Javascript filename. # env APPLICATION_START="start-my-application.js" # Log file path. # env LOG="/var/log/my-application.log" env NODE_ENV="development" env NODE_BIN_DIR="" env NODE_PATH="" env APPLICATION_DIRECTORY="/home/user/nodebb" env APPLICATION_START="app.js" env LOG="/home/user/nodebb/logs/nodebb.log" script # Add the node executables to the path, which includes Forever if it is # installed globally, which it should be. PATH=$NODE_BIN_DIR:$PATH # The minUptime and spinSleepTime settings stop Forever from thrashing if # the application fails immediately on launch. This is generally necessary $ # avoid loading development servers to the point of failure every time # someone makes an error in application initialization code, or bringing do$ # production servers the same way if a database or other critical service # suddenly becomes inaccessible. exec forever --sourceDir $APPLICATION_DIRECTORY -a -l $LOG \ --minUptime 5000 --spinSleepTime 2000 start $APPLICATION_START end script pre-stop script # Add the node executables to the path. PATH=$NODE_BIN_DIR:$PATH # Here we're using the pre-stop script to stop the Node.js application # process so that Forever is given a chance to do its thing and tidy up # its data. Note that doing it this way means that each application that # runs under Forever must have a different start file name, regardless of # which directory it is in. exec forever stop $APPLICATION_START >> $LOG end script
Blatantly stolen from here https://www.exratione.com/2013/02/nodejs-and-forever-as-a-service-simple-upstart-and-init-scripts-for-ubuntu/ .
This method allows me to type
start nodebb
andstop nodebb
for quick restarting.There are other ways to do this, but I found this to be my favorite method.
-
Category DescriptionsAs far as the home/index page;
They are there, just not visible by default because the height of the category cuts it off, as well as # of posts to display. Changing the height of the category will allow it to be shown.
You can also move it to somewhere else by editing the home.tpl and moving {categories.description}.
-
iMac DiedI love building my own rig but I always cheap out on some stuff. Case being one. The one I got now is as basic as it gets but it was only $10. I put money into things that matter for performance like video card, mobo/cpu, ram, and psu. Now that I think about it, everything but the case. One of the biggest bottle necks I have is sound as it is on board. Any recommendations?
-
Best practices for modifying tpl files then updating?I've modified both tpl's and core files and my process is different (probably due to not knowing proper way). Not that any of this might be of help to you, but maybe others and myself due to replies.
- Download the latest git build via website (Download Zip).
- Use WinMergeU to merge changes.
- Shutdown nodebb
- Upload the new files to nodebb directory.
- run npm update
- try running, get error about bcrypt, delete bcrypt directory
- run npm update again
- profit..
I mainly develop on windows, using sublime text 2 and WinMergeU to merge. There might be a much easier way, if anyone can point it out to me much love.
-
Themes: Debugging with chrome-inspector difficultiesI just cloned vanilla theme, renamed it in theme.json. applied it in admin panel. Edited theme.less to include a new less file at the bottom, made new less file, and I just override all the css I want to modify in that file. That way you don't have to hunt down specific sections in the other less files.
Depending on operating system you could use something to find in files. Notepad++, Sublime Text 2, or for linux terminal I just use grep.
-
Happy New YearNew Happy Year Bros
-
[nodebb-plugin-desktop-notifications] Desktop Notifications (like GMail)That did the trick, Thank you!
-
[nodebb-plugin-desktop-notifications] Desktop Notifications (like GMail)I must be doing something wrong, same error just like 24 now
if (data.text) {
-
[nodebb-plugin-desktop-notifications] Desktop Notifications (like GMail)@baris it's line 14 of nodebb-plugin-desktop-notifications/lib/main.js
@psychobunny just a reply to a thread with the text
@cani asdf
-
[nodebb-plugin-desktop-notifications] Desktop Notifications (like GMail)That fixed most of the issues. Chrome asked me to confirm adding the ability to have desktop notifications for my site. Now when I should be getting a notification popup i get an error in console
Uncaught TypeError: Cannot read property 'text' of undefined
-
[nodebb-plugin-desktop-notifications] Desktop Notifications (like GMail)This is so many kinds of win! Awesome work!
Edit: Same issue as above.
-
Soft launching the new NodeBB websiteI don't personally see any difference in scrolling, what is this artificial limitation that you speak of?
-
The unlimited threadI just noticed when you scroll down on mobile and there are posts loading there is no indicator (loading sign). Slow connections common on mobile might make people think that it is infact the end of the thread, without seeing the rest of the posts.
-
How to hook websocketsjswebsocketsinitiosocketsonI understand that and have accomplished it via doing it server side in websockets.js . My problem occurs when trying to do it from a plugin. My plugin looks as such and errors on the socket.on line;
var fs = require('fs'), path = require('path'), canIrestart = init: function() { /*socket.on("api:testrestart", function testrestart() { winston.info('[testrestart] Testing socket.on'); });*/ }, admin: { menu: function(custom_header, callback) { custom_header.plugins.push({ "route": '/plugins/canIrestart', "icon": 'icon-edit', "name": 'canIrestart' }); return custom_header; }, route: function(custom_routes, callback) { fs.readFile(path.join(__dirname, 'public/templates/admin.tpl'), function(err, tpl) { custom_routes.routes.push({ route: '/plugins/canIrestart', method: "get", options: function(req, res, callback) { callback({ req: req, res: res, route: '/plugins/canIrestart', name: canIrestart, content: tpl }); } }); callback(null, custom_routes); }); }, activate: function(id) { } } socket.on('yourEventName', function(data, callback) { console.log('client said', data); callback(); } }; canIrestart.init(); module.exports = canIrestart;
-
How to hook websocketsjswebsocketsinitiosocketsonI still don't get how to call that specific command from client script. As I expected adding it to the client side script gives the following error;
Uncaught ReferenceError: process is not defined
This is obviously because process is not client side, it is server side.
I am asking how to execute a specific server function from client javascript. How would I go about getting the server to recognize I clicked the button and act accordingly.
I really am not sure how to explain this any more direct. Not understanding how to properly communicate with server functions from client without modifying internal non plugin related files will prevent me from making my modifications plugins accessible to other people.
I am past working on a restart plugin, I have coded it directly into nodebb to fit my needs. I am now asking in general how to accomplish these tasks from within the plugin system.
Thank you, please don't take my frustration negatively. I love NodeBB!
-
How to hook websocketsjswebsocketsinitiosocketsonWithout being able to figure out how to properly run server side code via clicking a client side button from plugin system I am just going to code it directly in nodebb and skip plugin system. I was just thinking it would be nice to share it but without help I am unable to figure this out.