[nodebb-plugin-ns-embed] NS Embed
-
@nicolas links (www etc) don't seem to be embedding as they used to.
It just shows a link such as google.com instead of showing google.com in a box.
-
Is this plugin compatible with NodeBB 2.0.0?
I can't display the website to display the plugin's configuration options anymore. Only an empty page shows up. The log shows the warning
warn: [deprecation] The `/plugins` shorthand prefix is deprecated, prefix with `/assets/plugins` instead (path: /nodebb-plugin-embed/css/acp.css)
-
Can anyone please help with the new facebook video links, both short and long.
Thanks.
Here is for example what appears with Share link is copied:
short: https://fb.watch/eGzcJa862c/
Long: https://www.facebook.com/ExperienceAlUla/videos/378916647675296/ -
can anyone get tweeter link worked with this plugin ?
I know we have a twitter plugin which works but I would like to do without it if possible.
-
@julian said in [nodebb-plugin-ns-embed] NS Embed:
does Twitter come predefined in ns-embed, and is the embed code incorrect?
No, it doesn't. Essentially, this plugin is a fork of
nodebb-plugin embed
with enhancements I think -
@julian in theory, this should work
Watch
(?:<a.*?)?(?:https?:\/\/)?(?:(?:(?:mobile|www)\.)?twitter\.com)\/([^\/"\s]*)\/statuse?s?\/([^\/"\s]*)(\/photo\/\d|)".*?>.+?<\/a>)?
Replace
<div class="embed-wrapper" lang="en"><div class='embed-container'><iframe src='https://twitter.com/$1/status/$2' frameborder='0' allowfullscreen></iframe></div></div>
But sadly, it doesn't.
-
Yep correct...
The twitter rule doesn't work... -
As history tests, I am no reg-ex expert, but I've figured out a few monkey see monkey do style, but I'm a bit flummoxed with Odysee embeds.
This is the regex I'm using and that seems to work
Odysee Embeds
Watch:
(?:<a.*?)?(?:https?:\/\/)?(?:www\.)?odysee\.com\/@([a-zA-Z0-9_-]{1,64})([a-zA-Z0-9_-]{1,64}):([a-zA-Z0-9_-]{1,64})(?:.*?\/a>)?\/([a-zA-Z0-9_-]{1,64})([a-zA-Z0-9_-]{1,64}):([a-zA-Z0-9_-]{1,64})(?:.*?\/a>)?
Therefore I believe it's the embed that's floundering. The below is not doing the do - anyone?
Replace:
<div class='embed-wrapper'><div class='embed-container'><iframe id="odysee-iframe" width="560" height="315" src="https://odysee.com/@$1$2:$3/$4$5:$6" allowfullscreen></iframe></div></div>
... help!
-
for streamable link
<div class='embed-wrapper'><div class='embed-container'><iframe src="https://streamable.com/e/$1" frameborder="0" allowfullscreen></iframe></div></div>
(?:<a.?)?(?:https?://)?(?:www.)?(?:streamable.com/(?:(?:/e)?/))([a-zA-Z0-9_-]{2,12})(?:.*?/a>)?
-
for twitter, we can use 3rd to wrap the link in iframe then use that 3rd link, for example https://twitframe.com/:
watch:(?:<a.*?)?(?:https?:\/\/)?(?:twitter\.com)\/([^\/\"\s]*)\/status\/([^\/\"\s]*)(\/photo\/\d|)(?:.*?\/a>)?
replace:
<iframe border=0 frameborder=0 width="560" height="415"src="https://twitframe.com/show?url=https://twitter.com/$1/status/$2"></iframe>4
-
Is there a way to fix errors after plugin activation and make it work ?
My nodeBB V2.6.1, npm V8.19.2, OS Deb10 - plugin version 3.0.19Log:
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) -
-
@baris @julian whilst I know this is a third party plugin, is there any way we can make it work with v3?
9819.582fabab51cbadc1b17e.min.js:9 Uncaught (in promise) TypeError: window.app.alertSuccess is not a function at g.<anonymous> (9819.582fabab51cbadc1b17e.min.js:9:39786) at g.onack (admin.min.js?v=ittabjn5q0s:152:50547) at g.onpacket (admin.min.js?v=ittabjn5q0s:152:49660) at Q.emit (admin.min.js?v=ittabjn5q0s:152:60280) at admin.min.js?v=ittabjn5q0s:152:43160
I don't think @Nicolas is here much these days, but I could be wrong..