If you use Atom, and miss resizable panes...

NodeBB Development

Suggested Topics

  • 0 Votes
    1 Posts

    I've borked something in the custom CSS - lists of topics, popular, recent etc. etc. are NOT using the full width available - say 75-80% of the width available is being used - I have unused space to the right size of the recent post preview. - it's lie there is a blank column.

    The primary nav menu fixed at the top is fine, this is what I am comparing it to.

    Any idea what is the controlling element here in the CSS?

    Could a conflict somewhere too but I'll look at this later... when I turn off the custom CSS to see if it reverts.

  • 1 Votes
    6 Posts

    Thank you for putting me on track once again. Where shall I write this polyfill code ... in my map.js?

  • 0 Votes
    2 Posts

    I am able to solve the first issue. I needed to add checks in map.tpl instead of relying upon pure client-side JS solution.

  • 0 Votes
    8 Posts

    Reporting back. Using existing libraries, this is much simpler than I was making it. Here's some sample Python code which posts "Hello, World!" to topic ID 2. Thanks, @julian, for telling me about socket.io.

    from socketIO_client import SocketIO, LoggingNamespace import requests import json session = requests.Session() csrf_token = json.loads(session.get('http://yourdomain:port/api/config').text)['csrf_token'] headers = { 'x-csrf-token': csrf_token } data = { "username": "yourUsername", "password": "yourPassword" } response = session.post("http://yourdomain:port/login", headers=headers, data=data) def on_response(*args): print('on_response', json.dumps(args)) with SocketIO('yourdomain', port, LoggingNamespace, cookies=session.cookies.get_dict()) as s: s.emit('posts.reply', {'tid': 2, 'content': "Hello, World!"}, on_response) s.wait_for_callbacks(seconds=1)
  • 0 Votes
    2 Posts

    I'm not sure if I understand your question exactly, but you can write a plugin to listen to a new route (URL endpoint) or interprocess communication and load and call NodeBB libraries.
    You may consider using this plugin Git repo as a bootstrap to get you started quickly. Remember that the plugin.json, package.json, and library.js are the first files to work with. The plugin repo name / directory name will need to match the glob nodebb-plugin-* and it needs to be directly under the node_modules/ directory which is at the root of your NodeBB directory.