Skip to content
  • 5 Votes
    3 Posts
    632 Views
    gotwfG

    Awesome.

    Thanks bunches for this. ๐Ÿ‘

  • 9 Votes
    4 Posts
    1k Views
    S

    Three sites updated thus far, no issues.

  • 0 Votes
    8 Posts
    1k Views
    julianJ

    @scottalanmiller Fluentd hosts some nice configs (distilled from a presentation from a Netflix engineer about tuning their servers) https://docs.fluentd.org/v1.0/articles/before-install

    Perhaps this could help? Also check out ss -s, what is TIMEWAIT?

  • Upgrade from V0.6.0

    Technical Support
    3
    0 Votes
    3 Posts
    642 Views
    julianJ

    Wow, v0.6.0! That's going to be a fun one.

    What I'd recommend is deploying a copy of your forum to a new environment purely to run the upgrade on it, then you can handle any errors that come up, and we can guide you through the process.

    Now, of course, ideally, there won't be any errors, but v0.6.0 was a long time ago.... ๐Ÿ˜„

  • 0 Votes
    10 Posts
    2k Views
    Arief WijayaA

    @JaredBusch Thanks. Really appreciate it

  • 0 Votes
    3 Posts
    965 Views
    0

    Thank you @baris It's good to know that. Use this together with NodeBB seems awesome.

  • 0 Votes
    1 Posts
    941 Views
    Peter-Zoltan KeresztesP

    Hello,

    I am trying to setup nodebb with haproxy instead of nginx as frontend. Everything seam to be working however I am getting lots of 403 on /socket.io/ requests.

    frontend http-in mode http bind 0.0.0.0:80 redirect scheme https code 301 if !{ ssl_fc } frontend https-in bind 0.0.0.0:443 ssl crt /etc/letsencrypt/live/test/test.pem http-response set-header strict-transport-security "max-age=31536000; includeSubDomains" http-response set-header Content-Security-Policy "default-src 'self' wss: https: *.startech-rd.tk/*; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://code.jquery.com; style-src 'self' 'unsafe-inline' https:; img-src 'self' https://casper.ghost.org/ https://www.gravatar.com/ data:; font-src 'self' https:" http-response set-header X-XSS-Protection "1; mode=block" http-response set-header X-Content-Type-Options "nosniff" http-response set-header Referrer-Policy "no-referrer" reqadd X-Forwarded-Proto:\ https acl is_websocket hdr(Upgrade) -i WebSocket acl is_websocket path_sub -i /socket.io/ use_backend bk_ws if is_websocket acl acl_comments path_beg -i /comments use_backend comments if acl_comments backend comments mode http balance leastconn timeout connect 1s timeout server 600s timeout queue 600s option redispatch retries 3 acl is_woff capture.req.uri -m sub .woff acl is_ttf capture.req.uri -m sub .ttf acl is_eot capture.req.uri -m sub .eot http-response set-header Cache-Control public if is_eot or is_woff or is_ttf http-response set-header Expires -1 if is_eot or is_woff or is_ttf http-response set-header Pragma cache if is_eot or is_woff or is_ttf cookie nodebb insert indirect nocache secure server node1 10.160.125.81:4567 cookie nodebb_node1 check inter 1000 fastinter 500 rise 2 fall 1 server node2 10.160.125.82:4567 cookie nodebb_node2 check inter 1000 fastinter 500 rise 2 fall 1 backend bk_ws option redispatch balance roundrobin option forwardfor option httpclose server node1 10.160.125.81:4567 maxconn 30000 weight 10 cookie ws_node1 check server node2 10.160.125.82:4567 maxconn 30000 weight 10 cookie ws_node2 check```

    I have tried to connect directly without haproxy and the websockets are connecting correctly. However I've seen that using the haproxy the websocket protocol changed from wss to https.

    Any suggestions on how to fix this?

  • 0 Votes
    23 Posts
    6k Views
    ashish deo singhA

    @abhinov-singh

    @PitaJ
    have done same things as @abhinov-singh but my forum is working on when writing :4567?
    how to point it to main domain?

  • 0 Votes
    28 Posts
    8k Views
    KalbaskinK

    Had the same problem. Many thanks for the solution!

  • 0 Votes
    4 Posts
    3k Views
    julianJ

    The common causes for a session mismatch error are usually one of the following:

    1. Mis-configured URL parameter in your config.json file

    If you have a misconfigured url value in your config.json file, the cookie may be saved incorrectly (or not at all), causing a session mismatch error. Please ensure that the link you are accessing your site with and the url defined match.

    2. Improper/malformed cookieDomain set in ACP

    Sometimes admins set this value without realising that they probably don't need to set it at all. The default is perfectly fine. This is what the config looks like:

    Cookie Domain setting

    If this is set, you'll want to revert the setting by editing your database directly:

    Redis: hdel config cookieDomain
    MongoDB: db.objects.update({ _key: "config" }, { $set: "cookieDomain": "" });

    3. Missing X-Forwarded-Proto header from nginx/apache

    If you are using a reverse proxy, you will need to have nginx pass a header through to NodeBB so it correctly determines the correct cookie secure property.

    In nginx, you will need to add the directive like so:

    location / { ... proxy_set_header X-Forwarded-Proto $scheme; ... }
  • 1 Votes
    1 Posts
    1k Views
    barisB

    This is a simple widget tutorial to turn a topic into a twitter timeline. The end result will look like this.

    0_1510068225857_81b76a4a-720a-47d4-b7b0-b9e671e52dd8-image.png

    First create a topic that will be the home of the twitter widget and record its topic id.

    Now go to /admin/extend/widgets and place a html widget on topic.tpl/header. The standard twitter timeline widget code only works on cold loads so we have to modify it for NodeBB. You can generate the twitter widget at https://twitter.com/settings/widgets, after you copy that code you have to replace the <script> block with the one provided below.

    <script> !function(d,s,id){ var js,p=/^http:/.test(d.location)?'http':'https'; var el = d.getElementById(id); if (el) { el.parentNode.removeChild(el); } if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = p + "://platform.twitter.com/widgets.js"; var fjs = d.getElementsByTagName(s)[0]; fjs.parentNode.insertBefore(js,fjs); } }(document,"script","twitter-wjs"); </script>

    Here is the full widget code for NodeBB's twitter timeline. You can copy paste it into your HTML widget and replace every <topic_id> with your own topic id.

    <style> .page-topic-<topic_id> .topic { display: none; } .page-topic .twitter-timeline { display: none !important; width: 100% !important; height: 800px !important; } .page-topic-<topic_id> .twitter-timeline { display: block !important; } </style> <a class="twitter-timeline" href="https://twitter.com/NodeBB" data-widget-id="433016924318883841">Tweets by @NodeBB</a> <script> !function(d,s,id){ var js,p=/^http:/.test(d.location)?'http':'https'; var el = d.getElementById(id); if (el) { el.parentNode.removeChild(el); } if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = p + "://platform.twitter.com/widgets.js"; var fjs = d.getElementsByTagName(s)[0]; fjs.parentNode.insertBefore(js,fjs); } }(document,"script","twitter-wjs"); </script>

    Once you have the widget, you can customize it with data attributes, for more info you can read https://dev.twitter.com/web/embedded-timelines

  • 5 Votes
    13 Posts
    3k Views
    D

    But lemmie tell you writing Javascript inside an HTML widget is a Pain In The Neck.

  • 0 Votes
    3 Posts
    2k Views
    D

    @julian and If I want obtain the latest post's pid , for every "Lastest post" in every categories and sub categories, how can I do that? What is the hook that I have use?

  • 0 Votes
    2 Posts
    2k Views
    julianJ

    How did you "install" the plugin? npm install will install dependencies, a simple git clone will not. You will need to run npm install inside the plugin folder.

  • 17 Votes
    36 Posts
    9k Views
    barisB

    @dave1904 you should be able to get that data the same way this plugin does.
    https://github.com/barisusakli/nodebb-plugin-browsing-users/blob/master/index.js#L103-L112

    That code gets all the connected sockets that are in the topic. Each socket object has a data.uid field. If it is 0 then it is a guest other wise it is the user id of the logged in user. From that you can get the total number of sockets in the topic or just the guests etc.

  • 8 Votes
    15 Posts
    8k Views
    PitaJP

    @alff0x1f it's a bug that should be fixed soon.

  • 0 Votes
    8 Posts
    4k Views
    F

    @alff0x1f excellent! Thank you very much for those printouts. Swap it is, then ๐Ÿ˜ƒ

  • 0 Votes
    8 Posts
    4k Views
    J

    @pichalite I didn't know about this feature! Thank you for pointing that out to me, that is great! I totally agree with your point made above then ๐Ÿ™‚

  • 0 Votes
    7 Posts
    10k Views
    julianJ

    Thanks @rod and @tqwhite for helping @Cyb3r with this ๐Ÿ˜„

    Glad we have you on the community!

  • Group Title Change

    NodeBB Development
    1
    0 Votes
    1 Posts
    1k Views
    barisB

    On master the group title setting has moved from the settings page to the profile edit page. In the database the groupTitle property is in the user hash(user:1) now instead of the user settings hash(user:1:settings).

    Relevant commits

    Link Preview Image moved groupTitle from user settings to user profile/edit ยท NodeBB/NodeBB@e564260

    Node.js based forum software built for the modern web - moved groupTitle from user settings to user profile/edit ยท NodeBB/NodeBB@e564260

    favicon

    GitHub (github.com)

    If you have a custom theme that has a custom edit/settings page you can apply this change

    Link Preview Image setting/edit groupTitle change ยท NodeBB/nodebb-theme-vanilla@68f6975

    Vanilla theme for NodeBB based on Bootstrap. Perfect for starting your own NodeBB themes! - setting/edit groupTitle change ยท NodeBB/nodebb-theme-vanilla@68f6975

    favicon

    GitHub (github.com)