Using HTML / IFRAME
-
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
-
@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 ?
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.
-
@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.
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-dbsearchinstalled, 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.