Skip to content

NodeBB Development

Stay tuned here to hear more about new releases and features of NodeBB!

2.8k Topics 18.5k Posts

Subcategories


  • Posts from the NodeBB Development Blog
    96 Topics
    780 Posts
    kainosK
    Very good Vlad. I am Vladislav.
  • Found a bug? Why not make a bug report here?
    1k Topics
    7k Posts
    barisB
    Because you ran the forum without indexes you have documents that violate the index constraints. You will have to remove these documents for the create index command to work.
  • Focused discussion related to ActivityPub integration in NodeBB

    108 Topics
    2k Posts
    jupiter_rowland@hub.netzgemeinde.euJ
    @Ben Pate This looks like it’s pulled from Streams, yes? Which means it’s not related to the Forums and Threaded Discussions Working Group, is that right?Conversation Containers were originally built on and for (streams), yes. They were pretty much done some nine months ago.#FediMeta #FediverseMeta #CWFediMeta #CWFediverseMeta #Streams #(streams) #ConversationContainers
  • Help Translate NodeBB
  • 0 Votes
    2 Posts
    486 Views
    DO MGBKD
    I am seeing similar behavior too for read API (for example get user by email api), master token and _uid are ignored when sending request. The document states that master token can be used, however it doesn't seem to be the case for all APIs.
  • Page loads blank until refresh

    5
    0 Votes
    5 Posts
    639 Views
    T
    Cracked it! I had all this nonsense in my nginx from googling around. here is what worked. location /forum { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-AUTHENTICATION, X-IP, Accept'; add_header 'Access-Control-Max-Age' 1728000; add_header 'Content-Type' 'text/plain charset=UTF-8'; add_header 'Content-Length' 0; return 204; } if ($request_method = 'POST') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-AUTHENTICATION, X-IP, Accept'; } if ($request_method = 'GET') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-AUTHENTICATION, X-IP, Accept'; } add_header 'Access-Control-Allow-Credentials' 'true'; add_header X-Frame-Options "SAMEORIGIN"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; # proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; proxy_pass http://127.0.0.1:4567; # no subfolder defined here proxy_set_header Host $host; # MAGIC proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }
  • How to pass array when calling PUT API?

    1
    0 Votes
    1 Posts
    298 Views
    DO MGBKD
    I am trying to call api/v3/categories/111/privileges/groups:posts:upvote to set privileges for a group. It's a PUT API, and it seems to accept array of privileges on server side. I tried multiple ways to pass array in the URL and all attempts failed. for example /api/v3/categories/111/privileges/privilege[]=groups:posts:upvote&privilege[]=groups:posts:delete Any idea how to pass array of privileges to PUT API? The API doc is here https://docs.nodebb.org/api/write/#tag/categories/paths/~1categories~1{cid}~1privileges~1{privilege}/put Thanks in advance!
  • Write API GET works but POST 404s?

    3
    0 Votes
    3 Posts
    577 Views
    T
    Hey all- I am a moron. I forgot the /api/v3 in the API url. fml
  • /api/login return loggedin:false

    3
    0 Votes
    3 Posts
    436 Views
    T
    Okay I bit the bullet and learned nginx and am off to the races.
  • Session-sharing id question

    2
    0 Votes
    2 Posts
    427 Views
    PitaJP
    The id you send should identify the user in your system. The plugin will store a map of NodeBB user id to your id for synchronization.
  • Adding Categories/Boards Dynamically

    1
    0 Votes
    1 Posts
    298 Views
    DO MGBKD
    Hi, I am new to NodeBB. I want to use NodeBB for the school, every class will have its own discussion boards, the discussion board can only be accessed by the students in the class and moderated by the classroom teachers. How do I create the board dynamically and restrict access for a certain group of people? I don't need NodeBB's user management system as our application has already authenticated users, so this is assuming students and teachers are already logged in with JWT token stored in the cookie. Your help is appreciated! John
  • can we run nodebb using firebase hosting

    3
    0 Votes
    3 Posts
    530 Views
    dunlixD
    @ak-tech I don't know about firebase hosting... As long as it runs on a compatible OS and has Shell access, I don't see why it can't.
  • Nodebb plugin install from github

    3
    0 Votes
    3 Posts
    662 Views
    Spin0usS
    @anirban-dutta I use command like this npm install git+https://github.com/me-cooper/nodebb-plugin-makesmart-gallery.git when repo is not recognized by npm install Just remember to add .git at the end of github repo url.
  • Content Security Policy and unsafe-inline

    1
    0 Votes
    1 Posts
    213 Views
    Jeff ReiffersJ
    Re: content security policy Is CSP supported in 1.17.1?
  • Has anyone added a third party cookie consent form?

    3
    0 Votes
    3 Posts
    513 Views
    phenomlabP
    @miguel-guzman I just noticed that the Fiddle you included appears to have an API key embedded - hope that's not yours - otherwise, millions of random internet users will be getting this product for free whilst you pay for it
  • When i run "nodebb setup" this error gives me, plz help

    8
    0 Votes
    8 Posts
    1k Views
    Anirban DuttaA
    Thanks @dunlix and @PitaJ for help me. Problem solved only for yours help. Thanks a lot
  • How to make a plugin?

    2
    0 Votes
    2 Posts
    489 Views
    Anirban DuttaA
    https://docs.nodebb.org/development/plugins/ Read this link----->
  • Users to whom the category is available

    7
    0 Votes
    7 Posts
    858 Views
    M
    As a result, I got such a script, maybe it will be useful to someone. const Theme = {} const user = require.main.require('./src/user') const privileges = require.main.require('./src/privileges') Theme.getUsersByCategory = async function(data) { const { templateData: { cid } } = data const allUserIds = await user.getUidsFromSet('users:joindate', 0, -1) const asyncFilter = async (arr, predicate) => { const results = await Promise.all(arr.map(predicate)) return arr.filter((element, index) => results[index]) } const availableUserIds = await asyncFilter(allUserIds, async (id) => { return await privileges.categories.can('read', cid, id) }) data.templateData.availableUsers = await user.getUsersData(availableUserIds) return data } module.exports = Theme
  • Cannot find any string to translate.

    7
    0 Votes
    7 Posts
    831 Views
    AlekseiA
    @antosik great, thank you!
  • Custom homepage template

    23
    0 Votes
    23 Posts
    3k Views
    PitaJP
    @phenomlab it probably isn't provided with the breadcrumb data, so it doesn't render anything. You can check ajaxify.data in your browsers js console to see what's there.
  • the custom theme will be removed

    4
    0 Votes
    4 Posts
    586 Views
    PitaJP
    Yeah it's a known issue you'll have to relink sometimes. It depends on what npm version and OS you're using.
  • Issue while upgrading !!

    3
    0 Votes
    3 Posts
    404 Views
    gotwfG
    @rajeev2189 ... but since: You already tried the big jump and failed You are also using some customized stuff I'd suggest going version by version until you hit something that breaks. Then examine breaking changes logs and such for that version. Edit: Hmmm... Rereading your OP: ...challenges while upgrading. Maybe I misinterpreted this and you have not actually already tried to update? In which case, if not, follow pitaj's recipe above.
  • Improve API Docs

    1
    0 Votes
    1 Posts
    264 Views
    Martijn MichelM
    A question to the developers of nodebb, please improve the api docs. The api is great but is lacking explanation in many cases.
  • Making the font bigger

    12
    0 Votes
    12 Posts
    1k Views
    phenomlabP
    @eveh sorry 🤭 Try this body { font-size: 2rem !important; }