Ok , solved it , I looked in your tests, worked using this :
<!-- BEGIN results -->
@_value // without the _
<!-- END results -->
I see that if i put it without _ in post it renders as Object , you should have a look at this.
Claud
Posts
-
Render array inside template -
Render array inside template@psychobunny . Hi , I am trying to render an array inside a template , I have this code:
[code]
var data = {
results:[]
}
function renderTest( req, res, next) {
results = ['a','b','c','d'];
data.results = results;
res.render("mytemplate", data);
[/code]In the template.tpl I have:
{results.length}
<!-- BEGIN results -->
{results}
<!-- END results -->I get only 4 which is the length, I am unable to display the array content. Could you please help me how to do this ?
-
Fork of nodebb-plugin-shoutbox with room support@Scuzz. For the moment for it to work on 0.7 on my install I have removed the hooks for usersettings, but if I have any time soon I will try to make those work also. This at the moment was shown that maybe someone will make use of the code before I will make it stable.
-
Is there a possibility to create a dropdown menu from Navigation?Is there a possibility to create a dropdown menu from Navigation?
-
Possibility to hide category in category list but still be accessible via url.Thank you
-
What is the right way to load external JS and widget in template?I see the same issue happens when pasting the code they give in a html widget .
-
Possibility to hide category in category list but still be accessible via url.I would think the possibility to hide a category name from the category list would be useful as you could for example just add it as a Navigator link. Could this be done?
-
What is the right way to load external JS and widget in template?Is there a way to include external js for widgets like : https://www.tradingview.com/widget/ in template . Because when I try it, on first load it shows only the widget and nodebb page does not load, on refresh it loads the page also.
Thanks -
Fork of nodebb-plugin-shoutbox with room supportOk I think it was an issue on my side , don`t know witch , now it seems to work . I left everything like in my git, including router.get('/api/chat/:room', renderChatRoom); . I will extend my project and try to add an external widget in the rooms :).
-
Fork of nodebb-plugin-shoutbox with room supportI get :
{
"features": [],
"room": ":room",
"loggedIn": true,
"template": {
"name": "shoutbox",
"shoutbox": true
}
} -
Fork of nodebb-plugin-shoutbox with room supportRight now when testing on my dev system I was able to get an error in chrome:
Uncaught TypeError: Cannot read property 'name' of undefined , in nodebb.min.js, the part of code that gives error is :ajaxify.variables.flush();
ajaxify.loadData(url, function(err, data) {
if (err) {
return onAjaxError(err, url, callback, quiet);
}app.template = data.template.name; require(['translator'], function(translator) { translator.load(config.defaultLang, data.template.name); renderTemplate(url, data.template.name, data, callback); }); });
The line with error is : app.template = data.template.name;
On reload everything is ok as I have said, but doesn`t matter how many times I click on the shortcut or href inside nodebb the connection stalls . -
Fork of nodebb-plugin-shoutbox with room supportThe api should not get the buildHeader, or am I wrong?
This shouldn`t be?:router.get('/chat/:room', params.middleware.buildHeader, renderChatRoom);
router.get('/api/chat/:room', renderChatRoom);Also tried with :
router.get('/api/chat/:room',function (req,res){});
Same issue
-
Fork of nodebb-plugin-shoutbox with room supportHello guys,
I just must say that I love nodebb and starting to love nodejs. I primarely program in pyhton and use django , but this is good for me to learn.
I have created a fork of the original shoutbox plugin and added room support. Rooms are created on fly when you enter /chat/RoomName, RoomName could be anything .
My first test works as expected, but if I add in the custom route in navigation , like /chat/RoomName , when I click first time , the connection stalls, but if I refresh the page it loads ok , or if I enter the full url in browser it loads from first time as expected, this issue I haven`t managed to solve.
Sorry for the original name which I have not changed, I hope I will change the name in the future. I will try to solve this issue also.The repository url is : https://github.com/claudiutraistaru/nodebb-plugin-shoutbox