Skip to content

Where are widgets stored?

Solved Configure
Posts 3 Posters 2 Views 338 Watching 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

  • undefined Panda has marked this topic as solved on 16 Jun 2023, 12:16


3/3

16 Jun 2023, 12:15


Threaded Replies

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

Related Topics
  • 4 Votes
    6 Posts
    797 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.
  • 2 Votes
    8 Posts
    702 Views
    @Panda you’d be surprised. If you consider that you’d need to use the API to be able to populate a WordPress widget for example (which in turn would of course be PHP), taking this route is still immensely popular.
  • Nodebb design

    Solved General nodebb 11 Jul 2023, 10:13
    1 Votes
    2 Posts
    399 Views
    @Panda said in Nodebb design: One negative is not being so good for SEO as more Server side rendered forums, if web crawlers dont run the JS to read the forum. From recollection, Google and Bing have the capability to read and process JS, although it’s not in the same manner as a physical person will consume content on a page. It will be seen as plain text, but will be indexed. However, it’s important to note that Yandex and Baidu will not render JS, although seeing as Google has a 90% share of the content available on the web in terms of indexing, this isn’t something you’ll likely lose sleep over. @Panda said in Nodebb design: The “write api” is preferred for server-to-server interactions. This is mostly based around overall security - you won’t typically want a client machine changing database elements or altering data. This is why you have “client-side” which could be DOM manipulation etc, and “server-side” which performs more complex operations as it can communicate directly with the database whereas the client cannot (and if it can, then you have a serious security flaw). Reading from the API is perfectly acceptable on the client-side, but not being able to write. A paradigm here would be something like SNMP. This protocol exists as a UDP (UDP is very efficient, as it is “fire and forget” and does not wait for a response like TCP does) based service which reads performance data from a remote source, thus enabling an application to parse that data for use in a monitoring application. In all cases, SNMP access should be “RO” (Read Only) and not RW (Read Write). It is completely feasible to assume complete control over a firewall for example by having RW access to SNMP and then exposing it to the entire internet with a weak passphrase. You wouldn’t do it (at least, I hope you wouldn’t) and the same ethic applies to server-side rendering and the execution of commands.
  • 3 Votes
    8 Posts
    558 Views
    @Panda You should be able to expose the CSS for these using F12 to get into console [image: 1686833368846-3591518c-e3a3-4ada-a43c-6b32a5e0359c-image.png] [image: 1686833399483-a2b8ed46-4157-4ff2-85f0-576543380107-image.png] That should then expose the element once selected [image: 1686833431032-89d9c545-a47a-40d1-98f4-80cf3b958e8f-image.png] Here’s the below CSS you need based on the screenshot provided. .composer .formatting-bar .formatting-group li[data-format="picture-o"], .composer .formatting-bar .formatting-group li[data-format="spoiler"] { display: none; }
  • Smart Widgets

    Solved Configure nodebb 30 May 2023, 21:02
    3 Votes
    9 Posts
    602 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
  • 1 Votes
    4 Posts
    355 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.
  • 3 Votes
    12 Posts
    1k Views
    @phenomlab YAY! It works Thanks so much
  • 6 Votes
    7 Posts
    677 Views
    @DownPW great! thanks a lot… this code solves my problem.