@Neor
The files you are editing must cache file that re-generated when you restart NodeBB (they are stored in the '/public/' folder). to edit TPL files, find them in the specific theme/plugin folder in node_modules folder
riteshsanap
Posts
-
Problem editing files -
Custom Routes are not ajaxifiedI solved it, so for those get stuck here , we have to add Custom routes for ajaxifying and also mention which template to use.
to solve that add custom mapping to the file
/src/views/config.json
like this
"^route/.*": "Template to use without .tpl at the end", "^route/.*/add": "template"
-
New themes not display correctlyTry checking the errors logs, to see if Stylesheet was minified or not, or you also check this by starting NodeBB in dev mode by the follow command
./nodebb dev
and check if the files are minified or not, the console will display something like this
16/2 10:05 [1853] - info: [plugins/spam-be-gone] Settings loaded 16/2 10:05 [1853] - verbose: [hotswap] Router with id `plugins` replaced successfully 16/2 10:05 [1853] - verbose: [plugins] All plugins reloaded and rerouted 16/2 10:05 [1853] - info: [plugins] Plugins OK 16/2 10:05 [1853] - verbose: [meta/css] Minifying LESS/CSS 16/2 10:05 [1853] - verbose: [hotswap] Router with id `auth` replaced successfully 16/2 10:05 [1853] - verbose: [sounds] Sounds OK 16/2 10:05 [1853] - verbose: [meta/css] admin.css committed to disk. 16/2 10:05 [1853] - verbose: [meta/templates] Compiling templates 16/2 10:05 [1853] - verbose: [meta/css] stylesheet.css committed to disk. 16/2 10:05 [1853] - verbose: [meta/templates] Successfully compiled templates. 16/2 10:05 [1853] - info: NodeBB is now listening on: 0.0.0.0:4567 16/2 10:05 [1853] - verbose: [cluster] Stylesheets propagated to worker 1853 16/2 10:05 [1853] - verbose: [meta/js] Minification complete 16/2 10:05 [1853] - verbose: [meta/js] Client-side minfile committed to disk. 16/2 10:05 [1853] - info: NodeBB Ready
-
New themes not display correctlyCan you check if the CSS and Javascripts files are being loaded by viewing the page source code
-
Custom Routes are not ajaxifiedi also tried by manually typing in the browsers console
ajaxify.go(RELATIVE_URL);
but it returns false
-
Custom Routes are not ajaxified@pitaj yes, hook is already added and there are no errors also
{ "hook": "static:app.load", "method": "init" },
-
Custom Routes are not ajaxifiedI have pasted the related code on this gist
-
Role managemnetNodeBB should try to replicate vBulletins role management, there is lots amount of controls and options. NodeBB is lacking in that aspect.
-
Custom Routes are not ajaxifiedHello,
I tried going to a custom route using Ajaxify, but it does not work.
but the route works properly on full page reloadthe error it shows is 404 not found
--Edit--
One page seems to be ajaxifying after i added the api route to it, but it still getting routed to wrong pagelink is to
link/ID/add
but the page that is being loaded is
link/ID
and url in the location bar is still the old '/add' one.
when full page refresh is done the proper page is loaded.
and also Another route is not at all getting ajaxified.
-
Google Summer of Code Ideas List@pitaj
Nice idea automatic update of core, but i think that still to early for nodebb as core is still not completely stable and changes are still being made, so i think after few more versions it is possiblewhereas Automatic Backup is a system that nowadays every site require. so plus +1 to Automatic Backup & restore
-
The spam is real.even i used to make same mistake when spelling Akismet, but once I made a plugin using Akismet for WP, i started using correct spell
-
Possible to catch custom socket messages in a plugin?@Schamper
hello, i m also trying to use Sockets in my plugin, but i'm unable to find resources where it is written how to use it with NodeBB. if you have successfully written or made use of Socket can you please share it. by pasting here. -
Lavender Question - Alignment (Bug?)@Justin how about checking the Page source and confirm which classes are being added to the theme (for google chrome right click on the page and select view page source or inspect element)
-
Lavender Question - Alignment (Bug?)no @Justin it will allow you align 4 categories on one row,
BTW also check in other browsers sometimes browser sends specific headers that mess with responsive designs, so it might be good to check.
if nothing else is working, just redownload the theme from github and install it.
-
Lavender Question - Alignment (Bug?)@Justin
your problem is with Bootstrap actually, you are using wrong classes, take a look here for proper classes to use with Twitter Bootstrap
http://getbootstrap.com/css/#grid-optionsHere is the picture when i made col-md-6, and they work fine
-
Invalid CSRF tokenOk , I solved it, after checking that there is no csrf header i tried manually add it, but it didn't succeed I went add the token in template as (for those who might get stuck on same problem as me)
<input type="hidden" value="{token}" name="_csrf" />
and passing the value like this
function renderThemepage(req, res, next) { var csrf = require('csurf'); res.render('add_comic', {token: req.csrfToken()}); };
-
Invalid CSRF tokenI checked using HTTP header plugin but no x-csrf-token is being passed, can you give an example or do you know any link where it is shown, I have duplicated vanilla theme as the base.
-
Invalid CSRF tokenHello,
I m new to NodeBB, I just saw NodeBB and was instantly in love with it, I wanted to use it as a Backened forum. So I downloaded and started developing.I duplicated a theme and renamed it , to start developing on it.
then I added this code in the library.jsfunction renderThemepage(req, res, next) { res.render('add_comic', {}); }; Theme.init = function(params, callback) { var app = params.router, middleware = params.middleware, controllers = params.controllers; app.get('/comic/add', middleware.applyCSRF, middleware.buildHeader, renderThemepage); app.post('/comic/add', middleware.applyCSRF, middleware.buildHeader, function(req, res, next) { res.send(req); }); callback(); };
add_comic.tpl has a basic form, that sends the post request to /comic/add but I get invalid csrf token in the logs whenever I submit the form.