I'm sure he's still there. Nothing wrong with forking though, you could always merge later.
Youtube Lite
-
So, with @psychobunny wanting to pass on his youtube plugin, I've decided to release mine for anyone to use.
You can install it by typing
npm install nodebb-plugin-youtube-lite
###Why Lite?###
This plugin lazyloads youtube videos on an as needed basis. It connects to youtubes API and pulls the thumbnail, and only loads the video when you click to view it, this plugin would be great for "youtube topics" where people post multiple videos.
###Screenshots###
###Issues###
Currently the video doesn't load when you first post, I'm working on it now though.iPad users will need to click play twice on videos, as iOS blanket ignores the autoplay command. (Autoplay is enabled so that once the video is loaded, it plays)
Questions?
-
Did you end up figuring out the correct hook btw?
-
@psychobunny Not yet, but my laptops overheating slightly, so didn't want to lose the post.
If you spot anything wrong with it while I'm cleaning the fan, mind submitting a PR. I'll look when my laptops cleaned.
-
https://github.com/a5mith/nodebb-plugin-youtube-lite/blob/master/plugin.json#L8
callbacked
is deprecated, I imagine it's still on my own plugin as well (having it in won't make a difference any time soon, it'll just spit out a warning, I think)And yeah, the composer hook itself looks good to me
-
Yeah, I've actually got some console logging on the composer bit, but nothing happens.
I'll have to look at Julian's github plugin, as it's similar to that.
-
Ok, looking at this now,
action:composer.posts.reply
is the only one that fires when a new post is made. However i'm not sure if it's happening too early. As the video doesn't load.Latest version is currently 0.0.3.
npm install nodebb-plugin-youtube-lite@latest
###Changes###
Adjusted z-index bug that caused title and play button to appear over the composer
Changed how the video loads in preperation for me working out how hooks work.(Videos won't stop and refresh when a new video is posted)
-
Was it z-index @a_5mith, or was it wmode?
-
@julian z-index I hope.
Setting it to 2 dropped it behind the composer.
-
@a_5mith this only works with logged in users? I have try withouth logged in and they just show nothing?
-
@Hưng-Thành-Nguyễn said:
@a_5mith this only works with logged in users? I have try withouth logged in and they just show nothing?
Works for me as a guest on my site. There's certainly no code that would stop guests from viewing. Tried refreshing the page?
-
@a_5mith oh, sorry. I don't know why but my forum not showing any widgets with not logged in users.
Some plugins not showing, either.
Really weird -
@Hưng-Thành-Nguyễn said:
@a_5mith oh, sorry. I don't know why but my forum not showing any widgets with not logged in users.
Some plugins not showing, either.
Really weirdIf you still have an issue after you've resolved that issue, I'll take a look.
But I promise it works.
-
@a_5mith yup, trying to figure out what's going wrong. I've done nothing, just upgrade the nodebb and boom widgets have been gone T__T
-
@a_5mith yeah, it's working now, bro. It's because of shoutbox plugin, which disabled all function. Thanks man
-
@Hưng-Thành-Nguyễn said:
@a_5mith yeah, it's working now, bro. It's because of shoutbox plugin, which disabled all function. Thanks man
Ah yeah, make sure it's up to date. I believe that issue was fixed.
-
@a_5mith with newest version I have to disable it with not logged in users. Btw, shoutbox is not working with not logged in users, either.
Reported to the dev, hope he will fix this issue soon. -
@Hưng-Thành-Nguyễn said:
Btw, shoutbox is not working with not logged in users, either.
I think that's intentional...
-
@julian said:
@Hưng-Thành-Nguyễn said:
Btw, shoutbox is not working with not logged in users, either.
I think that's intentional...
There's an option to display for guests in the plugin. But you need to log in to post to it.
-
@julian but we still have to disable it by hide its widget with not logged in users.
If not, it will break the whole forum with its non-logged in checking function.
So it will be useless -
@a_5mith I can't find the option for that.
I have to hide its widget manual.