Skip to content

Where are widgets stored?

Solved Configure
3 2 850 1
  • Im away from home and only have access to mobile devices, and none of those allow me to create a widget. Can’t drag the html element into the (say) header section. Thats not working in mobile or ‘Desktop mode’ mobile, as the touch screen wont grab the item like a mouse click does.
    I was curious if I can create this widget directly as can SSH into my nodebb file system. So question:
    Is Widget code stored in the MongoDB database, or is it just a file in the NodeBB file system?
    In principle can I create a file that would then be picked up as a Widget. I guess if it is stored as a file, somewhere it must say what category and position on screen it applies to.

  • Im away from home and only have access to mobile devices, and none of those allow me to create a widget. Can’t drag the html element into the (say) header section. Thats not working in mobile or ‘Desktop mode’ mobile, as the touch screen wont grab the item like a mouse click does.
    I was curious if I can create this widget directly as can SSH into my nodebb file system. So question:
    Is Widget code stored in the MongoDB database, or is it just a file in the NodeBB file system?
    In principle can I create a file that would then be picked up as a Widget. I guess if it is stored as a file, somewhere it must say what category and position on screen it applies to.

    @Panda widgets are stored in the Mongo database. I can set the widget up for you if you PM me site details etc.

  • @Panda widgets are stored in the Mongo database. I can set the widget up for you if you PM me site details etc.

    @phenomlab Thanks, have DMed you

  • Pandaundefined Panda has marked this topic as solved on

Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • Opening links in nodebb widget

    Solved Configure nodebb
    6
    4 Votes
    6 Posts
    2k Views
    A more efficient way of including this would be to not over complicate it and leverage a standard iframe (providing the CSP headers of the remote site permit this) like below <iframe src="https://www.classmarker.com/online-test/start/?quiz=gag66aea7922f0a5" width="700" height="800"></iframe> This works first time every time on your site as intended.
  • Interesting Widget code, but can't fetch API

    Solved Customisation nodebb
    26
    2 Votes
    26 Posts
    6k Views
    @Panda said in Interesting Widget code, but can’t fetch API: How did you drop that widget into the post there? I hadnt seen this BSgenerator anywhere on sudonix site, do you use it somewhere already? Yes, here https://sudonix.org/topic/414/corporate-bullshit-generator?_=1687774393044 It’s not a “post” or “topic” in the common sense. It is actually a page in it’s own right and leverages nodebb-plugin-custom-pages. This in turn creates a new “route” which behaves like a page, meaning it is then exposed for widgets. @Panda said in Interesting Widget code, but can’t fetch API: Also can you explain more what you mean by calling the code externally. In my API call example, how would I go about doing that? By this, I mean create all the required code in an external JS file that is reachable by the NodeBB instance - so, in “public” for example - or in my case /public/js. The widget then “calls” that file and because it runs outside of the scope of NodeBB, you just need to return the values to the widget. Hope this makes sense?
  • Smart Widgets

    Solved Configure nodebb
    9
    3 Votes
    9 Posts
    1k Views
    @Panda said in Smart Widgets: So why is that, or conversely why would the function to expose username ever be required, as it seems app.user is already an available global object? It is, yes, but not if you are using it outside of a widget. The function I wrote is also historical and comes from the 2.x train
  • NodeBB upgrade now cant post

    Solved Bugs nodebb
    5
    2 Votes
    5 Posts
    1k Views
    @Panda yes, for some reason, that is the case. If you need an urgent response, it’s probably better to post here because of the time difference.
  • Further Widgets question

    Solved Configure nodebb
    4
    1
    1 Votes
    4 Posts
    833 Views
    @Panda category is for a category in its own, so for example, “fruit” whereas categories is the page that contains all categories as a list.
  • Email validation NodeBB

    Bugs nodebb
    21
    3 Votes
    21 Posts
    5k Views
    @Panda said in Email validation NodeBB: Did you configure that as a custom change to the usual quote icon. How do you do that? I notice on NodeBB site its a solid blue quotes Yes, I changed it. NodeBB by default users the free font awesome library whereas I use the pro (paid) version SDK have access to a wider set of icons, and at different thicknesses etc. The change of colour is just simple CSS.
  • Changing Background on NodeBB

    Solved Customisation background image nodebb
    4
    0 Votes
    4 Posts
    1k Views
    @cagatay You’d target the body tag and use the below line of CSS background: url(/assets/customcss/backgrounds/default/default.png) no-repeat center center fixed; Obviously, you need to change the path to suit where your image is being stored. More info around the background property can be found here https://www.w3schools.com/cssref/css3_pr_background.php
  • NodeBB slow after DB recovery

    Solved Performance performance nodebb
    1
    5 Votes
    1 Posts
    628 Views
    No one has replied