[nodebb-plugin-ns-embed] NS Embed
-
For Spotify album
(?:<a.*?)?(?:https?:\/\/)?(?:www\.)?open\.spotify\.com\/album\/([a-zA-Z0-9_-]{4,36})(?:.*?\/a>)?
<div class='embed-wrapper'><div class='embed-container'> <iframe src='https://open.spotify.com/embed/album/$1' frameborder='0' allowtransparency='true' allow='encrypted-media'></iframe> </div></div>
-
For .MP4 direct upload (for those who allow video hosting)
<a href="/assets/uploads/files/(.*).mp4">[^<]*</a>
<video id="$1" src="/uploads/files/$1.mp4" controls style="width:800px"> </video> <div><small><a href="/uploads/files/$1.mp4" target="_blank">Download video</a></small></div>
Credit to @I0co
-
@nicolas - I have tried setting up a custom embed for Twitter per GitHub resource ref: community rules.
nodebb-plugin-ns-embed/docs/community-rules.md at master · NicolasSiver/nodebb-plugin-ns-embed
Embed media and rich content in posts: YouTube, Vimeo, Twitch and more. - nodebb-plugin-ns-embed/docs/community-rules.md at master · NicolasSiver/nodebb-plugin-ns-embed
GitHub (github.com)
Yet it does not seem to work.
The Plugin itself works, for example YouTube embeds work perfectly and even the custom instagram rule also!
Any ideas or suggestions appreciated in advance. Thanks.
- running nBB 1.11.2
- npm 6.4.1
-
For twitter :
watch :
(?:<a.*?)?(?:https?:\/\/)?(?:twitter\.com)\/([^\/\"\s]*)\/status\/([^\/\"\s]*)(\/photo\/\d|)(?:.*?\/a>)?
replace :
<div class='embed-wrapper'> <blockquote class="twitter-tweet"><a href="https://twitter.com/$1/status/$2?ref_src=twsrc%5Etfw"></a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> </div>
-
@The-Worms said in [nodebb-plugin-ns-embed] NS Embed:
For twitter :
watch :
(?:<a.*?)?(?:https?:\/\/)?(?:twitter\.com)\/([^\/\"\s]*)\/status\/([^\/\"\s]*)(\/photo\/\d|)(?:.*?\/a>)?
replace :
<div class='embed-wrapper'> <blockquote class="twitter-tweet"><a href="https://twitter.com/$1/status/$2?ref_src=twsrc%5Etfw"></a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> </div>
@The-Worms Ok thanks for that but strangely I went to try this with the plugin and now its not working anymore. I had fresh nodeBB install and now it's hanging when selected in admin. I tried another nodeBB installation and same problem. Hmmm...
-
@The-Worms said in [nodebb-plugin-ns-embed] NS Embed:
Your log ?
./nodebb log
node_redis: Warning: Redis server does not require a password, but a password was supplied. 2019-02-19T12:34:50.446Z [4567/11596] - info: Routes added 2019-02-19T12:34:50.448Z [4567/11596] - info: NodeBB Ready 2019-02-19T12:34:50.451Z [4567/11596] - info: Enabling 'trust proxy' 2019-02-19T12:34:50.454Z [4567/11596] - info: NodeBB is now listening on: 0.0.0.0:4567 Missing key in translation token "text"
-
@The-Worms said in [nodebb-plugin-ns-embed] NS Embed:
your log in mod development ?
./nodebb dev
I've since reinstalled and the log error -
Missing key in translation token "text
is gone.The dev log spit a large recurring error out, but in summary:
error: uncaughtException: listen EADDRINUSE: address already in use 0.0.0.0:4567
-
Might this be a permission issue with npm or plugin folder?
While poking around in sftp - I noted that all plugins and themes are located in the /node_modules directory but also the public/build/plugins - this contains only three of the primary plugins.
-
@The-Worms said in [nodebb-plugin-ns-embed] NS Embed:
chown -R omega:omega ~/nodebb_path
Setup was done under root user afaik.
-
Hmmm after running chown I saw this internal error.
/templates?
-
@The-Worms said in [nodebb-plugin-ns-embed] NS Embed:
commands like git and ./nodebb should not be used with root access (sudo or elevated privileges). It will cause problems with different ownership of files NodeBB needs access to
Ok thank you - I'll create a sudo user and then re-run the installation from scratch.
-
@omega said in [nodebb-plugin-ns-embed] NS Embed:
@The-Worms said in [nodebb-plugin-ns-embed] NS Embed:
commands like git and ./nodebb should not be used with root access (sudo or elevated privileges). It will cause problems with different ownership of files NodeBB needs access to
Ok thank you - I'll create a sudo user and then re-run the installation from scratch.
I've forked and replied to this here - https://community.nodebb.org/topic/13685/trouble-shooting-new-plugins-installed-not-working-what-gives
I didn't want to derail this topic further with my issues.