Using HTML / IFRAME

General Discussion
  • Hello everyone.
    I'm trying to migrate my website/forum from e107 to nodebb but i can't handle two things.

    First is the ability to use HTML only for administration.
    I am familiar with the topic "Allow admins to add custom HTML to composer" and also found issue #1149 on Github. According to the Github issue were "closed this as completed in NodeBB/nodebb-theme-vanilla@4eb96c1" but I don't see anywhere an option to use HTML for admins. Was trying with Vanilla theme and there isn't also. There is only "Allow HTML" in Markdown menu but it applies to all users.

    Second milestone for is using IFRAME inside forum posts (goal is to embed time-series from Grafana). Was trying to add different plugins but no success.

    • nodebb-plugin-iframely - after activate, nodeBB won't start
    • nodebb-plugin-iframe-resizable - no any additional options in menus and composer after plugin activation
    • nodebb-plugin-iframe - same as above, no any changes after plugin installation/activation and rebuild/restart

    Can someone help with above ?

    My nodeBB V2.6.1, npm V8.19.2, OS Deb10

  • Hi, i dont know if that will work but what you can try is the suggestion from @schajuli :

  • @Topper Thanks for answer. I saw that thread and tried again.
    I've installed nodebb-plugin-ns-embed (with dependencies: async, winstonc) via NPM, activated the plugin then did rebuild and restart.
    Looks like plugin is active but where is rules menu described by plugin's author ???
    I mean about menu from photo below ?
    rules.jpg
    I'm hundred percent sure there is no in admin settings or composer page for create new topics/posts etc. Does this menu need to be activated somewhere?

  • @omen thats where i am at now also :D. I think that you have to fill in the create rule fields.
    Otherwise there is a rules.js file. For me it is saved here:
    C:\nodebb\node_modules\nodebb-plugin-ns-embed\plugin
    let me know how you solved this if you are faster than me :d

  • @Topper first have found normal user privileges on plugin folder. Have fix by chown -R root:root /nodebb/...... (actually i'm temporary running nodebb as root). Unfortunately that didn't solve the problem.

    I found some "malfunctions" in log:

    2022-12-09T21:02:24.914Z [5217/6503] - warn: [plugins/nodebb-plugin-embed] The plugin.json field "library" is deprecated. Please use the package.json field "main" instead.
    2022-12-09T21:02:24.917Z [5217/6503] - warn: [plugins] Unable to load library for: nodebb-plugin-embed
    2022-12-09T21:02:24.918Z [5217/6503] - error: TypeError: winston.Logger is not a constructor
    at /root/nodebb/node_modules/nodebb-plugin-embed/plugin/logger.js:9:22
    at Object.<anonymous> (/root/nodebb/node_modules/nodebb-plugin-embed/plugin/logger.js:23:3)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/root/nodebb/node_modules/nodebb-plugin-embed/plugin/controller.js:4:18)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)

    I created a new topic in the appropriate place related to the plugin. community.nodebb.org

  • @omen what i found out is that the Watch field is what this plugin searches for in a post. This gets replaced with what is in the Replace field. You can just copy the Replace field from the youtube rule and replace the url if you want to show an url. Not sure if that is what you need.

  • @Topper It is exactly what i need but as You can see - plugin doesn't work due to errors. I can't test it until it is properly installed.

  • @omen i also installed it via npm and it works fine for me embedding a website, for embedding an uploaded pdf (that was my goal) it doesnt work yet.
    Since this works for me, the question is what we did different. you said you installed the dependencies if you installed them seperatly maybe thats the problem or maybe it is the root acess.

  • @Topper My problem is I'm familiar with PHP, SQL and E107 which I have been using for the last 13 years. NPM , MongoDB and modern forum scripts like nodeBB these are things like "black box". I've uninstalled plugin and dependencies then installed only plugin. Looks like dependencies installed manually was my bad idea 🙂
    Now the log says:
    warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run ./nodebb reset -p PLUGINNAME to disable it.

    • nodebb-rewards-essentials
    • nodebb-plugin-dbsearch
    • nodebb-plugin-custom-pages
    • nodebb-plugin-ns-embed

    ....but now i can see ACP menu.
    rules1.jpg

    I'll try tonight to see if it works as expected. By the way, I will also see the problem with the PDF embeding you write about.

    thanks for Your help and suggestions !!!

  • @omen did you manage to fix it? I also have the first two plugins:

    @omen said in Using HTML / IFRAME:

    nodebb-rewards-essentials
    nodebb-plugin-dbsearch

    installed, but it doesnt throw an error. Maybe you need to deinstall the dependencies you installed with your first installation try, since it says you have to disable ns-embed.

  • Hi @Topper
    I've reinstalled dependencies. Have also reinstalled nodebb from the beginning byt no any positive results 😞
    NodeBB is very nice but there is too much wasted time to configure everything correctly to my expectations. I understand that many options are related to the security of the script but I think I will go back to what I already know well, i.e. E107
    NBB is not for me because if any troubles I'm completely noob with Mongo and Node.

  • ok well im noob with everything 😄 its so far very well siuted for my needs


Suggested Topics


  • 0 Votes
    6 Posts
    1k Views

    @jaspernl hi there,

    We do use vultr for hosting. However, speeds are 10GBPS and you can test the connection speed yourself within the control panel.

    Resources are dedicated to each user and not oversold. This hosting is apart of our main brand, Milkk Media Group. We can insure no lag will be found. If you have any loading issues, please let us know, and we will get to work on deploying your own custom server in your location region.

  • Adding fields to topics/posts

    Unsolved General Discussion
    1 Votes
    3 Posts
    2k Views

    You mean add tags after the fact? Only a mod or the OP can edit a topic and add them.

    Tags are not available for posts but I really, really, wish they were.

  • 0 Votes
    1 Posts
    892 Views

    Is there a way to set the default daily digest settings for all current users and any future registered users for the site? The default seems to be off but, I would like to change that to weekly if it is possible.

    Thanks!

  • 0 Votes
    11 Posts
    5k Views

    killed my #ghost 😡

  • 0 Votes
    11 Posts
    4k Views

    @kimmanuel what I meant that it's too fast for the user to see it.

    just use the Custom JS and try it out. It'll work, i already edit the menu items here: http://forums.afraidtoask.com/

    Right click and view-source (or if you're in chrome click here) and you'll see the Custom JS script tag that reverses the menu items, hides the icons, shows the text instead and it adds a new item called "Home"

    <script> $(function() { var ul = $("ul#main-nav"); var items = ul.find("li"); items.each(function(i, li){ li = $(li); li.find("a>i").addClass("hide"); li.find("a span").removeClass("visible-xs-inline"); }); ul .append(items.get().reverse()) .prepend('<li><a href="http://www.afraidtoask.com" title="" target="_top" data-original-title="Home"><i class="fa fa-fw fa-home hide"></i><span class=""> Home</span></a></li>'); }); </script>