Skip to content

General Discussion

A place to talk about whatever you want

3.9k Topics 23.8k Posts
  • Login account using C++

    4
    0 Votes
    4 Posts
    1k Views
    PitaJP
    @jiangcaiyang ajax is just an HTTP request with JavaScript. If you just mimic the request (you can log a request with the chrome dev tools), it doesn't matter where the request is from, it should respond the same.
  • Where can I edit my robots.txt file?

    3
    0 Votes
    3 Posts
    2k Views
    Pramvir RatheeP
    it disappear after restart.
  • Meta tag - Noindex, Follow for Tags and Categories.

    1
    0 Votes
    1 Posts
    1k Views
    Pramvir RatheeP
    For some kind of communities this can help greate in SEO. With this meta tag Big duplicate content can be removed from domain. How it can be achieved ?
  • Happy Canada Day!

    2
    4 Votes
    2 Posts
    1k Views
    E
    Just waiting for 1.1.0 lol
  • Mongodb authentication

    1
    0 Votes
    1 Posts
    620 Views
    F
    Hello!! I want to authenticate my local mongodb server by using springmongoconfig i.e authenticating spring data of mongodb server
  • 1 Votes
    23 Posts
    11k Views
    T
    @julian Any clue when this will be? And where can we see the changes?
  • What are the system requirements for running an offsite installation?

    7
    0 Votes
    7 Posts
    3k Views
    T
    @Bri said in What are the system requirements for running an offsite installation?: I really don't know about that 512MB of ram, It might run fine on that small amount, but I was running out of memory on the npm install alone. I was running my forum pretty well on the 512MB Digital Ocean box. It actually ran well beyond about 25 503 errors a day from nodeBB: https://community.nodebb.org/topic/9109/503-temporarily-unavailable-due-to-excessive-load
  • can not open the navigation bar in mobile's mode

    4
    0 Votes
    4 Posts
    2k Views
    ZelaktoZ
    The same occurs for myself as well. I'm running the latest version on the GitHub. I've disabled all the plugins and it still occurs. However, on this forum, it seems to work fine.. interesting. My console reads this: WebSocket connection to 'wss://community.*.net/socket.io/?EIO=3&transport=websocket&sid=NQaX7qjgJhYbzRiiAAAT' failed: Error during WebSocket handshake: Unexpected response code: 400 Thanks for the support guys.
  • Idea: private discussions is groups.

    10
    0 Votes
    10 Posts
    4k Views
    julianJ
    @felipeolcav said in Idea: private discussions is groups.: @julian any progress on this feature? We are customizing nodebb for a project with a team of 3 DEVs and we´ll problably develop this feature. Thanks and regards Yes, you can currently create a category and limit participation to specific group(s) or users.
  • Can not get CSS and JS when load page

    2
    0 Votes
    2 Posts
    1k Views
    vukidrockV
    Problem solved just edit etc/nginx/sites-available/default
  • social network links

    4
    0 Votes
    4 Posts
    1k Views
    J
    Adding AIM and MySpace is crucial!
  • 1 Votes
    7 Posts
    3k Views
    T
    Hi @Dilip You can using this plugin https://github.com/julianlam/nodebb-plugin-session-sharing
  • Backup

    8
    0 Votes
    8 Posts
    4k Views
    JenklerJ
    Best to follow guides from Mongodb Copy all the files in the webroot Use mongodump to backup your DB: https://docs.mongodb.com/manual/reference/program/mongodump/ Almost all data is saved in the DB except uploaded files
  • 0 Votes
    1 Posts
    1k Views
    PitaJP
    I propose to either add a new ability for the const keyword or use the reserved word final to make non-writable object and class members. Note: The TypeErrors are thrown following the behavior of Object.freeze or a { configurable: false, writable: false } property descriptor. They will be thrown in a "use strict"; environment, but usually not otherwise. Constant Class or Object members / properties / fields / methods Use final, since it is an unused reserved word, or possibly const to define constant Class or Object members: class X { // const / final now makes static class properties // non-writable, and non-configurable static const abc = 123; static final abc = 123; // also works to make constant private properties const #def = 456; final #def = 456; // as well as constant normal class fields, if you're into that const ghi = 789; final ghi = 789; // and constant private / static / normal methods static const doSomething() { } static final doSomething() { } const #somethingPrivate() { } final #somethingPrivate() { } const cantChangeMe() { } final cantChangeMe() { } constructor(a = 3) { const somethingPrivate = this.#somethingPrivate; // throws new TypeError('Assignment to constant property.') this.#somethingPrivate = function () { return a; } this.#somethingPrivate === somethingPrivate // true const def = this.#def; // throws new TypeError('Assignment to constant property.') this.#def = 1000; this.#def === def // true } } const x = new X(); const ghi = x.ghi; // throws new TypeError('Assignment to constant property.') x.ghi = 2000; x.ghi === ghi // true const doSomething = X.doSomething; // throws new TypeError('Assignment to constant property.') X.doSomething = function doSomethingElse() { }; X.doSomething === doSomething // true const cantChangeMe = X.prototype.cantChangeMe; // throws new TypeError('Assignment to constant property.') X.prototype.cantChangeMe = function yesICan() { }; X.prototype.cantChangeMe === cantChangeMe // true const o = { // const / final can be used in normal object literals, too const things() { }, final things() { }, const prop: 5, final prop: 5, }; const things = o.things; // throws new TypeError('Assignment to constant property.') o.things = function stuff() { }; o.things === things // true const prop = o.prop; // throws new TypeError('Assignment to constant property.') o.prop = 11; o.prop === prop // true This could be transpiled by simply using Object.defineProperty like so, at least on public members: class X { static abc = 123; static doSomething() { } cantChangeMe() { } constructor() { } } ['abc', 'doSomething', 'cantChangeMe'].forEach(key => Object.defineProperty(X, key, { configurable: false, writable: false }) ); const o = { things() { }, prop: 5, }; ['things', 'prop'].forEach(key => Object.defineProperty(o, key, { configurable: false, writable: false }) ); Shorthand for Immutable Classes and Objects Defining everything as final or const in a Class or Object doesn't quiet do the job. What if we want true immutability? I've also looked into some kind of special syntax for creating immutable objects and making classes return immutable objects. Maybe we could use final for that, as well? // The static members and prototype of this class are shallow immutable. // Any object it returns is also shallow immutable, // similar to `return Object.freeze(this)` as the last line in the constructor, // though since it uses a keyword, it could throw an error on an attempt to override final class ConstantObject { static abc = 123; static doSomething() { } cantChangeMe() { } constructor() { this.d = 8; } } const constantObject = new ConstantObject(); const c = constantObject.c; // throws new TypeError('Assignment to constant property.') constantObject.c = 321; constantObject.c = c // true const doSomething = ConstantObject.doSomething; // throws new TypeError('Assignment to constant property.') ConstantObject.doSomething = function doSomethingElse() { }; ConstantObject.doSomething === doSomething // true const cantChangeMe = ConstantObject.prototype.cantChangeMe; // throws new TypeError('Assignment to constant property.') ConstantObject.prototype.cantChangeMe = function yesICan() { }; ConstantObject.prototype.cantChangeMe === cantChangeMe // true // No members can be added / modified / deleted from this shallow immutable object. const finalObject = final { prop: 5, things() { }, }; const things = finalObject.things; // throws new TypeError('Assignment to constant property.') finalObject.things = function stuff() { }; finalObject.things === things // true const prop = finalObject.prop; // throws new TypeError('Assignment to constant property.') finalObject.prop = 11; finalObject.prop === prop // true This could be transpiled essentially by just using Object.freeze and Object.defineProperty: const ConstantObject = (() => { class ConstantObject { static abc = 123; static doSomething() { } cantChangeMe() { } constructor() { this.d = 8; return Object.freeze(this); } } Object.defineProperty(ConstantObject, 'prototype', { value: Object.freeze(ConstantObject.prototype), }); return Object.freeze(ConstantObject); })(); const finalObject = Object.freeze({ prop: 5, things() { }, }); What do you think? I'm currently leaning towards using the final keyword for everything. Both sides have pros and cons. const final Pros • Meaningful word • Unused • Fits existing syntax; AKA const x = 5 -> const x: 5 • Meaning could be closer if devs want to initialize after definition • Familiar to Java devs Cons • Could be overloaded in usage • Less meaningful to C / JS devs, could be confusing
  • Global Moderators group was deleted 😞

    1
    0 Votes
    1 Posts
    651 Views
    W
    I know there are two default groups, the name is administrator and global moderators (group system) but I do not accidentally delete a group global moderators (it should not be removed) how to I get it back ? *Sorry if my grammar is bad [image: 3OlHGl1.png]
  • How to add some extra info for the TAGs?

    5
    0 Votes
    5 Posts
    3k Views
    JamJ
    @yariplus said in How to add some extra info for the TAGs?: Well, it's definitely possible, though a little involved, the tag page is just a normal page. You would need a plugin to add/fetch additional data, add middleware to the page, and add a custom template, and push the additional data to it. cool, are there any plugin like this for reference ?
  • Can I use nodebb as a full CMS replacement?

    3
    0 Votes
    3 Posts
    1k Views
    JamJ
    @jiangcaiyang said in Can I use nodebb as a full CMS replacement?: I've tried integrate NodeBB with basic CMS myself. See Qt Dream Site. Anyone who is willing to participate our project are welcome to @jiangcaiyang in Qt Dream. cool, can you share your audio player's widget to the community? thank you very much~
  • About instant chat integration with Qt

    3
    1 Votes
    3 Posts
    2k Views
    jiangcaiyangJ
    Thanks, recently I've debugged and eliminated bugs on socket.io Qt binding. I'll look into src/socket.io/modules.js and SocketModules.chats. By the way, which is best IDE to debug front-end code on NodeBB? If possible, give me more reputations.
  • Also switching from discourse ...

    3
    0 Votes
    3 Posts
    1k Views
    julianJ
    Hello there @jeff! We do support a migration plugin from Discourse to NodeBB. The friendly folks at TDWTF have migrated successfully, and they were instrumental in getting the migration plugin completed. It looks like @Ben-Lubar's fork is the most up-to-date, so you can find it here: https://github.com/BenLubar/nodebb-plugin-import-discourse We can also handle the migration for you for a nominal fee, please contact us at [email protected] if you're interested. Thanks!
  • HTML-manipulation in Node.js?

    11
    0 Votes
    11 Posts
    8k Views
    yariplusY
    @Metalmind Excellent, glad you got it working. There is probably a way to get that raw script code running, but using an exteral js file as you did is definitely better.