Youtube Lite
-
@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.
-
@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.
-
@Hưng-Thành-Nguyễn said:
Btw, shoutbox is not working with not logged in users, either.
I think that's intentional...
-
@Hưng-Thành-Nguyễn said:
@a_5mith I can't find the option for that.
I have to hide its widget manual.My mistake, there isn't one, I just have hide from anonymous users ticked from the widgets menu.
-
@a_5mith yeah, even in new version he has made it can hide from the anonymous and not break the forum. But it's funny that this plugin will not work if I place shoutbox's widget in global header. Still have to disable it for anonymous.
Anw, that's the solution for now -
-
This is my two cents. This is a fix for users when paste yt videos with
&something
library.js:
(function(module) { "use strict"; var YoutubeLite = {}, embed = '<div class="js-lazyYT" data-youtube-id="$1" data-width="640" data-height="360"><iframe class="lazytube" src="//www.youtube.com/embed/$1"></iframe></div>'; var regularUrl = /<a href="(?:https?:\/\/)?(?:www\.)?(?:youtube\.com)\/(?:watch\?v=)(.+)">.+<\/a>/g; var shortUrl = /<a href="(?:https?:\/\/)?(?:www\.)?(?:youtu\.be)\/(.+)">.+<\/a>/g; var embedUrl = /<a href="(?:https?:\/\/)?(?:www\.)youtube.com\/embed\/([\w\-_]+)">.+<\/a>/; var longUrl = /<a href="(?:https?:\/\/)?(?:www\.)?(?:youtube\.com)\/(?:watch\?v=)(.+)&.+">.+<\/a>/g; YoutubeLite.parse = function(data, callback) { if (!data || !data.postData || !data.postData.content) { return callback(null, data); } if (data.postData.content.match(embedUrl)) { data.postData.content = data.postData.content.replace(embedUrl, embed); } if (data.postData.content.match(longUrl)) { data.postData.content = data.postData.content.replace(longUrl, embed); } if (data.postData.content.match(regularUrl)) { data.postData.content = data.postData.content.replace(regularUrl, embed); } if (data.postData.content.match(shortUrl)) { data.postData.content = data.postData.content.replace(shortUrl, embed); } callback(null, data); }; module.exports = YoutubeLite; }(module));