[ABD] phpBB [video]: universal video bbcode (no code changes)

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
VEG
Registered User
Posts: 84
Joined: Sat Jun 25, 2005 9:31 am
Location: Belarus, Minsk
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by VEG » Mon Sep 16, 2013 2:08 pm

VEG wrote:I can detect that BB [media] is used on a page with HTTPS protocol and in this case I can use embedding code with HTTPS if possible. But unfortunately not all services support HTTPS. I'll add this feature for major services in a week.
I've decided to do it now :) You can try it already.

Also BB [media] now supports ted.com, vine.co and coub.com.
Best regards, Evgeny

aleha
Code Contributor
Posts: 61
Joined: Wed Dec 19, 2012 10:42 pm

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by aleha » Tue Sep 17, 2013 11:57 am

VEG wrote:
VEG wrote:I can detect that BB [media] is used on a page with HTTPS protocol and in this case I can use embedding code with HTTPS if possible. But unfortunately not all services support HTTPS. I'll add this feature for major services in a week.
I've decided to do it now :) You can try it already.

Also BB [media] now supports ted.com, vine.co and coub.com.
Yes, I've tested it for https and it works nice now. Thanks!
VEG wrote:
aleha wrote:Do you have any current/future plans on making this awesome mod also responsive which is much needed? Maybe styling the iframe and putting it in a stylish div block will do the work.
I'm sorry, I didn't understand what you mean. Do you mean flexible width of the video player according to the width of the page? Yes, I have this point in my TODO list.
Yes that is what I meant but I think it is a tricky situation.
Ideally you should use a responsive iframe/object with a mobile theme if you don't have a responsive style (prosilver in 3.0.x is not responsive).

But if you have a responsive style (prosilver might be responsive in 3.1) and no mobile theme, then the scaling of the iframe/object maybe should depend to the service.
For example, if I use Firefox from my desktop PC then google maps is responsive, whereas youtube is not.
I haven't looked in the details of this subject so you can ignore me I don't make sense.

jskoh
Registered User
Posts: 60
Joined: Wed Mar 18, 2009 12:21 pm

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by jskoh » Tue Sep 17, 2013 1:49 pm

hi, i have a video site, can i added my site into it? but its not a big site, more for using it myself.

User avatar
potku
Registered User
Posts: 705
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by potku » Thu Sep 19, 2013 1:40 pm

VEG wrote:Please provide a problematic URL for example.
Here's one: http://www.potku.net/forum/viewtopic.ph ... 05#p744905

So, Facebook videos can be embedded now? Sorry, I haven't been here for a while...
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx

User avatar
VEG
Registered User
Posts: 84
Joined: Sat Jun 25, 2005 9:31 am
Location: Belarus, Minsk
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by VEG » Fri Sep 20, 2013 11:35 am

potku wrote:
VEG wrote:Please provide a problematic URL for example.
Here's one: http://www.potku.net/forum/viewtopic.ph ... 05#p744905

So, Facebook videos can be embedded now? Sorry, I haven't been here for a while...
Hello. I can't find bbmedia on your page. Facebook videos can be embedded for a long time ago.
Best regards, Evgeny

User avatar
potku
Registered User
Posts: 705
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by potku » Mon Sep 23, 2013 1:33 pm

Hmm, I am not aware of any bbmedia. So, this isn't just another BBCode anymore? Facebook videos did work about 6 months ago, but not since then using the BBCode in the first post.
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx

User avatar
potku
Registered User
Posts: 705
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by potku » Mon Sep 23, 2013 2:41 pm

OK, got it. Progress, nice BBCode. :)

Since I have forgotten too much, how would I add an icon to this BBcode, and how could I move that icon to a disered location on the posting page?

Thanks :)
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx

User avatar
VEG
Registered User
Posts: 84
Joined: Sat Jun 25, 2005 9:31 am
Location: Belarus, Minsk
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by VEG » Tue Sep 24, 2013 8:14 am

potku wrote:Facebook videos did work about 6 months ago, but not since then using the BBCode in the first post.
Please provide URL of facebook video that BB [media] can't embed. Example of working URL:

Code: Select all

[video]http://www.facebook.com/video/video.php?v=396498528455[/video]
potku wrote:Since I have forgotten too much, how would I add an icon to this BBcode, and how could I move that icon to a disered location on the posting page?
Try this mod.
Best regards, Evgeny

User avatar
potku
Registered User
Posts: 705
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by potku » Wed Sep 25, 2013 1:34 pm

Thank you for your kind help. :)

That´s exactly the MOD we have had installed for ages, but it has disappeared from where we downloaded it years ago. Not anymore. :)

We have noticed some of the Facebook videos feature the word "photo" in the url, while some sport "video". It seems video does work, but does photo?

Code: Select all

https://www.facebook.com/photo.php?v=378933748709

Code: Select all

http://www.facebook.com/photo.php?v=4441731634125
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx

User avatar
VEG
Registered User
Posts: 84
Joined: Sat Jun 25, 2005 9:31 am
Location: Belarus, Minsk
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by VEG » Wed Sep 25, 2013 2:14 pm

Now BB [media] supports this type of URL on the facebook.com. You should clear browser cache to try it.
Best regards, Evgeny

User avatar
potku
Registered User
Posts: 705
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by potku » Wed Sep 25, 2013 2:27 pm

They sure do! GG! Image
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx

User avatar
draky
Registered User
Posts: 245
Joined: Tue Dec 10, 2002 2:04 pm
Location: France
Name: Gilles W.
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by draky » Tue Oct 08, 2013 6:11 am

Seems cool :)
Can we host the .js file on our website instead on relying on your website ?

Can you provide the source code of .js file ?

Thanks :)

User avatar
VEG
Registered User
Posts: 84
Joined: Sat Jun 25, 2005 9:31 am
Location: Belarus, Minsk
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by VEG » Tue Oct 08, 2013 7:34 am

draky wrote:Can we host the .js file on our website instead on relying on your website ?
Yes, you can do it. Also you can use bbmedia.php for automatic updates of your local copy of the bbmedia.js.
draky wrote:Can you provide the source code of .js file ?
No, you can use it as is only.
Best regards, Evgeny

User avatar
draky
Registered User
Posts: 245
Joined: Tue Dec 10, 2002 2:04 pm
Location: France
Name: Gilles W.
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by draky » Tue Oct 08, 2013 10:44 am

Ok, thanks for your answers :)

Nice work !

User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [RC] phpBB [video]: universal video bbcode (no code chan

Post by muggins » Tue Oct 08, 2013 12:27 pm

JavaScript is source code. The code as provided is compacted.

Here it is prettified:

Code: Select all

// BB [media] v1.46 [30.09.2013] (C) 2013 Evgeny Vrublevsky, http://phpbbex.com/
// Licensed under CC BY-NC-ND, http://creativecommons.org/licenses/by-nc-nd/3.0/
(function () {
    var b = "audio";
    var m = "video";
    var a = "media";
    if (typeof bbmediajs != "undefined") {
        return
    }
    bbmediajs = true;
    var j = function (p, r, e, o) {
        o = jQuery.extend({
            frameborder: "0"
        }, o);
        var q = '<iframe style="vertical-align: bottom; width: ' + r + "px; height: " + e + 'px;" width="' + r + '" height="' + e + '" src="' + p + '" webkitallowfullscreen mozallowfullscreen allowfullscreen';
        jQuery.each(o, function (s, t) {
            q += " " + s + '="' + t + '"'
        });
        return q + "></iframe>"
    };
    var g = function (q, s, e, p) {
        p = jQuery.extend({
            allowscriptaccess: "never",
            allowfullscreen: "true",
            ignorewheel: false
        }, p);
        var r = ' width="' + s + '" height="' + e + '"' + (p.ignorewheel ? ' ignorewheel="1"' : "");
        var t = '<object style="vertical-align: bottom;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"' + r + '><param name="movie" value="' + q + '" />';
        var o = '<embed style="vertical-align: bottom;" type="application/x-shockwave-flash"' + r + ' src="' + q + '"';
        delete p.ignorewheel;
        jQuery.each(p, function (u, v) {
            t += '<param name="' + u + '" value="' + v + '" />';
            o += " " + u + '="' + v + '"'
        });
        return t + o + "></embed></object>"
    };
    var n = function (t, G, D, z, L) {
        var K = (z == a);
        var B = (z == b);
        var v = (z == m);
        var y = (B || K);
        var H = (v || K);
        var x = false;
        var u = false;
        if (!G && !D) {
            x = true;
            u = true;
            G = 640;
            D = 360
        } else {
            if (!G) {
                x = true;
                G = parseInt(D * (16 / 9))
            } else {
                if (!D) {
                    u = true;
                    D = parseInt(G * (9 / 16))
                }
            }
        }
        var E = L ? "https" : "http";
        var M;
        t = jQuery.trim(t);
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?youtube(?:-nocookie)?\.com\/(?:playlist\?(?:.*&)?list=|embed\/videoseries\?(?:.*&)?list=|p\/|view_play_list\?(?:.*&)?p=)([-_\w\d]+)/i))) {
            if (u) {
                D += 30
            } else {
                if (x) {
                    G += 53
                }
            }
            return j(E + "://www.youtube.com/embed/videoseries?list=" + M[1], G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?(?:youtu\.be\/|(?:m\.)?youtube(?:-nocookie)?\.com\/(?:watch\?(?:.*&)?v=|embed\/|v\/))([-_\w\d]+)(?:.*(?:[&?]start|[?&#]t)=(?:(\d+)h)?(?:(\d+)m)?(\d+)?)?/i))) {
            if (u) {
                D += 30
            } else {
                if (x) {
                    G += 53
                }
            }
            var s = parseInt(M[2] ? M[2] : 0) * 3600 + parseInt(M[3] ? M[3] : 0) * 60 + parseInt(M[4] ? M[4] : 0);
            return j(E + "://www.youtube.com/embed/" + M[1] + (s ? "?start=" + s : ""), G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?(?:vimeo\.com|player\.vimeo\.com\/video)\/(\d+)/i))) {
            return j(E + "://player.vimeo.com/video/" + M[1], G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/video_ext\.php\?oid=([-_\w\d]+)&id=([-_\w\d]+)&hash=([-_\w\d]+)(&sd|&hd=1|&hd=2|)/i))) {
            return j(E + "://vk.com/video_ext.php?oid=" + M[1] + "&id=" + M[2] + "&hash=" + M[3] + M[4], G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?(?:rutube\.ru\/(?:video\/)?embed\/|video\.rutube\.ru\/)(\d+)/i))) {
            return j(E + "://rutube.ru/video/embed/" + M[1], G, D, {
                scrolling: "no"
            })
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?(?:smotri\.com\/video\/view\/\?(?:.*&)?id=|pics\.smotri\.com\/player\.swf\?(?:.*&)?file=)([\w\d]+)/i))) {
            return g("http://pics.smotri.com/player.swf?file=" + M[1] + "&bufferTime=3&autoStart=false&str_lang=rus", G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:video\.qip\.ru\/video\/view\/\?(?:.*&)?id=|pics\.video\.qip\.ru\/player\.swf\?(?:.*&)?file=)([\w\d]+)/i))) {
            return g("http://pics.video.qip.ru/player.swf?file=" + M[1] + "&bufferTime=3&autoStart=false&str_lang=rus", G, D)
        }
        if (H && (M = t.match(/^https?:\/\/photo\.tvigle\.ru\/resource\/rf\/swf\/([\/\d\w]*)\.swf/i))) {
            return g("http://photo.tvigle.ru/resource/rf/swf/" + M[1] + ".swf", G, D)
        }
        if (H && (M = t.match(/^https?:\/\/video\.bigmir\.net\/(?:show|player)\/(\d+)/i))) {
            return j("http://video.bigmir.net/player/" + M[1] + "/", G, D)
        }
        if (H && (M = t.match(/^https?:\/\/video\.mail\.ru\/([^\/]+)\/([^\/]+)\/([-_\d\w]+)\/([-_\d\w]+)\.html/i))) {
            return g("http://img.mail.ru/r/video2/uvpv3.swf?2", G, D, {
                flashvars: "movieSrc=" + M[1] + "/" + M[2] + "/" + M[3] + "/" + M[4] + "&autoplay=0"
            })
        }
        if (H && (M = t.match(/^https?:\/\/video\.sibnet\.ru\/(?:(?:[\w\d\/]+)\/video|shell\.swf\?videoid=)(\d+)/i))) {
            return g("http://video.sibnet.ru/shell.swf?videoid=" + M[1], G, D)
        }
        if (H && (M = t.match(/^https?:\/\/video\.online\.ua\/(?:embed\/)?([\d\w]+)/i))) {
            return j("http://video.online.ua/embed/" + M[1] + "/", G, D, {
                scrolling: "no"
            })
        }
        if (H && (M = t.match(/^https?:\/\/(?:(?:www\.)intv\.ru\/v\/|flash\.intv\.ru\/uplay\/)([\d\w]+)/i))) {
            return g("http://flash.intv.ru/uplay/" + M[1], G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?metacafe\.com\/(?:watch|fplayer)\/(\d+)\/([^\/.]+)/i))) {
            return g("http://www.metacafe.com/fplayer/" + M[1] + "/" + M[2] + ".swf", G, D, {
                flashvars: "playerVars=autoPlay=no"
            })
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?lovi\.tv\/video\/(?:sharer\.php\?Code=)?([\d\w]+)/i))) {
            return j("http://lovi.tv/video/sharer.php?Code=" + M[1] + "&Width=" + G + "&Height=" + D, G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:[-.\w\d]+?\.)?facebook\.com\/(?:(?:video\/video|photo)\.php\?(?:.*&)?v=|video\/embed\?(?:.*&)?video_id=|v\/)([-_\w\d]+)/i))) {
            return j(E + "://www.facebook.com/video/embed?video_id=" + M[1], G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?clipfish\.de\/(?:(?:.*?\/)?video\/|embed_(?:image|video)\/\?(?:.*&)?vid=)(\d+)/i))) {
            return j("http://www.clipfish.de/embed_video/?vid=" + M[1] + "&as=0&butcolor=000000", G, D, {
                scrolling: "no",
                marginheight: "0",
                marginwidth: "0"
            })
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?myvideo\.de\/(?:movie|embed|watch)\/([-_\d\w]+)/i))) {
            return j(E + "://www.myvideo.de/embed/" + M[1], G, D, {
                scrolling: "no"
            })
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?veevr\.com\/(?:videos|embed)\/([-_\d\w]+)/i))) {
            return j("http://veevr.com/embed/" + M[1], G, D, {
                scrolling: "no"
            })
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?hulu\.com\/embed\/([-_\d\w]+(?:\/\d+){0,2})/i))) {
            return g("http://www.hulu.com/embed/" + M[1], G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?megogo\.net\/.*view\/(\d+)/i))) {
            return j(E + "://megogo.net/e/" + M[1], G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?dailymotion\.com\/(?:video|swf|embed\/video)\/([0-9a-z]+)/i))) {
            return j(E + "://www.dailymotion.com/embed/video/" + M[1], G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?own3d\.tv\/(?:.*\/)?(?:live|liveembed|l)\/([0-9]+)/i))) {
            return j("http://www.own3d.tv/liveembed/" + M[1], G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?own3d\.tv\/(?:.*\/)?(?:video|stream|v)\/([0-9]+)/i))) {
            return g("http://www.own3d.tv/stream/" + M[1], G, D, {
                wmode: "transparent"
            })
        }
        if (H && (M = t.match(/^https?:\/\/(?:[\w\d]+\.)?ign\.com(\/videos\/\d+\/\d+\/\d+\/[-_\w\d]+)/i))) {
            return j("http://widgets.ign.com/video/embed/content.html?url=" + M[1], G, D, {
                scrolling: "no"
            })
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?ustream\.tv\/(?:channel\/|embed\/)?((?:recorded\/)?[0-9]+)/i))) {
            return j(E + "://www.ustream.tv/embed/" + M[1] + "?v=3&wmode=direct", G, D, {
                scrolling: "no"
            })
        }
        if (H && (M = t.match(/^https?:\/\/((?:\w+\.)?twitch\.tv)\/([-_\w\d]+)(?:\/([bc])\/(\d+))?/i))) {
            if (M[3]) {
                return g("http://www.twitch.tv/widgets/archive_embed_player.swf", G, D, {
                    flashvars: (M[3].toLowerCase() == "b" ? "archive_id=" : "chapter_id=") + M[4] + "&channel=" + M[2] + "&auto_play=false"
                })
            } else {
                return g("http://www.twitch.tv/widgets/live_embed_player.swf", G, D, {
                    flashvars: "hostname=" + M[1] + "&channel=" + M[2] + "&auto_play=false",
                    allowscriptaccess: "always"
                })
            }
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.|embed\.)?ted\.com\/talks\/(?:lang\/([\w]{2})\/)?([-_\w\d]+)\.html/i))) {
            return j("http://embed.ted.com/talks/" + (M[1] ? ("lang/" + M[1] + "/") : "") + M[2] + ".html", G, D, {
                scrolling: "no"
            })
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?coub\.com\/(?:view|embed)\/([-_\w\d]+)/i))) {
            return j(E + "://coub.com/embed/" + M[1], G, D)
        }
        if (H && (M = t.match(/^https?:\/\/(?:www\.)?vine\.co\/v\/([-_\w\d]+)/i))) {
            var p = Math.min(G, D);
            return j("https://vine.co/v/" + M[1] + "/embed/simple", p, p)
        }
        if (y && (M = t.match(/(^https?:\/\/soundcloud\.com\/[-_\w\d]+\/(?:sets\/)?[-_\w\d]+\/?$|https?(?::\/\/|%3A%2F%2F)api\.soundcloud\.com(?:\/|%2F)(?:tracks|playlists)(?:\/|%2F)\d+)/i))) {
            var I = !! M[0].match(/(\/|%2F)(sets|playlists)(\/|%2F)/i);
            return g("https://player.soundcloud.com/player.swf?show_comments=true&auto_play=false&color=ff7700&url=" + encodeURIComponent(decodeURIComponent(M[0])), (x ? "100%" : G), I ? 225 : 81)
        }
        if (y && (M = t.match(/^https?:\/\/(?:www\.)?(?:z-mc\.ru|z-music\.org\/l|muzebra\.com\/l)\/([-_\w\d]+)/i))) {
            return g("http://embed.muzebra.com/player?id=" + M[1], (x ? 395 : G), 42, {
                wmode: "transparent",
                scale: "noscale"
            })
        }
        if (y && (M = t.match(/^https?:\/\/(?:(?:www\.)?(?:prosto)?pleer\.com\/tracks\/|embed\.(?:prosto)?pleer\.com\/track\?(?:.*&)?id=)([\w\d]+)/i))) {
            return g("http://embed.pleer.com/track?id=" + M[1], (x ? 550 : G), 42)
        }
        if (y && (M = t.match(/^https?:\/\/(?:www\.)?promodj\.(?:com|ru)\/(?:[-_\w\d]+\/\w+|embed|download)\/(\d+)/i))) {
            return j("http://promodj.com/embed/" + M[1] + "/big", (x ? "100%" : G), 70)
        }
        if (y && (M = t.match(/^https?:\/\/music\.yandex\.(?:ru|by|ua|kz)\/(?:.*#!\/)?(?:track|embed)\/(\d+)/i))) {
            return g("http://music.yandex.ru/embed/" + M[1] + "/track.swf", (x ? "100%" : G), 48, {
                scale: "noscale",
                flashvars: "bg-color=%23F2F2F2&text-color=%23777777&hover-text-color=%23000000"
            })
        }
        if (M = t.match(/^https?:\/\/(?:video\.yandex\.(?:ru|by|ua|kz)\/iframe|(?:static|streaming)\.video\.yandex\.(?:ru|by|ua|kz)\/lite)\/([^\/"'<>]+)\/([^\/"'<>]+)/i)) {
            if (K && t.indexOf("bbaudio") != -1) {
                B = true
            }
            return j(E + "://video.yandex.ru/iframe/" + M[1] + "/" + M[2] + "/", (B && x) ? 300 : G, B ? 72 : D)
        }
        if (M = t.match(/^https?:\/\/(?:www\.)?yapfiles\.ru\/static\/play\.swf\?(?:.*&)?st=([-_\w\d]+)/i)) {
            if (K && t.indexOf("bbvideo") == -1 && (t.indexOf("allowfullscreen") == -1 || t.indexOf("bbaudio") > -1)) {
                B = true
            }
            return g("http://www.yapfiles.ru/static/play.swf?st=" + M[1], (B && x) ? 320 : G, (B && u) ? 240 : D)
        }
        if (K && (M = t.match(/^https?:\/\/(?:www\.)?360cities\.net\/(?:image|embed_iframe)\/([-_\d\w]+)/i))) {
            return j(E + "://www.360cities.net/embed_iframe/" + M[1], G, D)
        }
        if (K && (M = t.match(/^https?:\/\/(?:www\.)?dermandar\.com\/p\/([-_\d\w]+)/i))) {
            return g("http://static.dermandar.com/swf/Viewer.swf?v=1.4", G, D, {
                flashvars: "pano=" + M[1],
                ignorewheel: true
            })
        }
        if (K && (M = t.match(/^https?:\/\/(?:maps\.google(?:\.com)?\.\w+\/(?:maps\/?)?|(?:www\.)?google(?:\.com)?\.\w+\/maps\/?)(?:ms\/?)?\?((?:.*&)?(?:ll|spn|sll|sspn|z|msid|q)=.*)$/i))) {
            var q = (t.indexOf("panoid=") == -1) ? (M[1].replace(/&output=embed/, "") + "&output=embed") : (M[1].replace(/&(source=|output=sv)embed/g, "") + "&source=embed&output=svembed");
            return j(E + "://maps.google.com/?" + q, x ? 640 : G, u ? 480 : D)
        }
        if (K && (M = t.match(/^https?:\/\/picasaweb\.google(?:\.com)?\.\w+\/([-_\d\w]+)\/([-_\d\w]+)/i))) {
            return g("https://picasaweb.google.com/s/c/bin/slideshow.swf", x ? 640 : G, u ? 480 : D, {
                flashvars: "host=picasaweb.google.com&captions=1&noautoplay=1&feat=flashalbum&RGB=0x000000&feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2F" + M[1] + "%2Falbum%2F" + M[2] + "%3Falt%3Drss%26kind%3Dphoto"
            })
        }
        if (K && (M = t.match(/^https?:\/\/connect\.garmin\.com(?:[:]\d+)?\/(?:activity(?:\/embed)?|player|splits)\/(\d+)/i))) {
            return j("http://connect.garmin.com/activity/embed/" + M[1], 465, 548)
        }
        if (K && (M = t.match(/^https?:\/\/(?:www\.)?endomondo\.com\/(?:embed\/)?routes(?:\/|\?.*id=)(\d+)/i))) {
            G = x ? 900 : G;
            D = u ? 600 : D;
            return j("http://www.endomondo.com/embed/routes?id=" + M[1] + "&width=" + G + "&height=" + D, G, D, {
                scrolling: "no"
            })
        }
        if (K && (M = t.match(/^https?:\/\/(?:www\.)?gpsies\.com\/map(?:Only)?\.do\?(?:.*&)?fileId=([-_\w\d]+)/i))) {
            return j(E + "://www.gpsies.com/mapOnly.do?fileId=" + M[1], x ? 640 : G, u ? 480 : D, {
                scrolling: "no"
            })
        }
        var C = t.match(/\.(ogg|oga|opus|webma|mp3|aac|m4a|wav)(?:\s*;|$)/i);
        var w = t.match(/\.(ogv|webm|webmv|mp4|m4v)(?:\s*;|$)/i);
        if (K && (C || w) && !(C && w) || B && C || v && w) {
            B = (B || K && C);
            v = !B;
            var r = B ? b : m;
            var J = jQuery.extend({
                ogg: "ogg",
                webm: "webm",
                mp4: "mp4"
            }, B ? {
                oga: "ogg",
                opus: "opus",
                webma: "webm",
                mp3: "mpeg",
                aac: "aac",
                m4a: "mp4",
                wav: "wav"
            } : {
                ogv: "ogg",
                webmv: "webm",
                m4v: "mp4"
            });
            var F = t.split(/\s*;\s*/);
            var o = "";
            var e = "";
            var A = "";
            jQuery.each(F, function (O, N) {
                if (M = N.match(/^(?:https?:\/\/)?[^:"']*\.(ogg|oga|ogv|opus|webm|webma|webmv|mp3|aac|mp4|m4a|m4v|wav)$/i)) {
                    var P = M[1];
                    if (typeof J[P] == "undefined") {
                        o = "";
                        return false
                    }
                    var Q = r + "/" + J[P];
                    o += '<source src="' + N + '" type="' + Q + '">';
                    e += (e ? ", " : "") + '<a href="' + N + '">' + M[1].toUpperCase() + "</a>"
                } else {
                    if (v && !A && N.match(/^(?:https?:\/\/)?[^:"']*\.(png|jpg|gif|webp)$/i)) {
                        A = N
                    } else {
                        o = "";
                        return false
                    }
                }
            });
            if (o) {
                return (B ? "<audio controls>" : '<video width="' + G + '" height="' + D + '" controls' + (A ? ' poster="' + A + '">' : ">")) + o + e + (B ? "</audio>" : "</video>")
            }
        }
        return false
    };
    var k = function (q) {
        var p = 0;
        for (var o = 0; o < q.length; o++) {
            p = ((p << 5) - p) + q.charCodeAt(o);
            p &= p
        }
        var e = "";
        for (var o = 0; o < 32; o += 4) {
            e = ((p >>> o) & 15).toString(16) + e
        }
        return e
    };
    var h = "8650b5bf d7d7e248 f7357b7e 8b514b46 9f3afa81 668eb752 3aeb0865 39d3d576 3f617b51 94dff6d8 755f26e8 6ef344da";
    var c = function (t) {
        var s = 0;
        var w = document.location.host.replace(/^www\./i, "");
        var p = h.indexOf(k(w)) > -1;
        var o = t("html").attr("lang");
        if (!o) {
            o = t("title").text().match(/[\u0400-\u04FF]+/) ? "ru" : "en"
        } else {
            if (o.length > 2) {
                o = o.substring(0, 2)
            }
        }
        var r = function (C) {
            if (p) {
                return true
            }
            var z = C.html();
            var B = t("\x61", C);
            var A = new RegExp("\x5eh\x74t\x70:\x2f/\x28p\x68p\x62b\x65x\x5c.\x63o\x6d|\x76r\x75b\x6ce\x76s\x6by\x5c.\x6fr\x67|\x76e\x67.\x62y|\x76e\x67a\x6co\x67i\x63.\x63o\x6d)\x2f");
            var y = /(phpBB|vBulletin|SMF|IPB|XenForo|media|audio|video)/i;
            return z.indexOf("\x6eo\x69n\x64e\x78") == -1 && z.indexOf("\x6eo\x66o\x6cl\x6fw") == -1 && (s = B.length) > 0 && A.test(B.attr("\x68r\x65f")) && y.test(B.text())
        };
        var v = function (E, z, C) {
            var y = "data:image/gif;base64,R0lGODlhDgAOALMAAP9dXf9sbP9SUv+lpf+8vP+0tP+srMwAAP/29v/Bwf9+fv90dP9kZP95ef/////g4CH5BAAAAAAALAAAAAAOAA4AQARL8MhJawE4ayPJ+ovjgAshDWiqop3ivrB5FEEdiHZQSIbgC4/HT8A5JI7I5LHTaDYQCGdDRrPhbLsZY8uAchlZgya4OQ3PgkFlTYkAADs=";
            var A = '<a style="color: #105289; text-decoration: none;" href="http://veg.by/bbmedia/help/' + z + '/" target="_blank">[' + z + "]</a>";
            var B;
            var D = t("a", E);
            if (D.length > 0 && (B = D.text().match(/(phpBB|vBulletin|SMF|IPB|XenForo)/i))) {
                A = B[0] + " " + A
            }
            if (D.length == 0 && p) {
                A = ""
            }
            E.html('<div style="height: 100%; background-color: #000;"><table style="width: 100%; height: 100%; border: 0; border-collapse: collapse; vertical-align: middle; text-align: center;"><tr><td><div style="width: 140px; min-height: 14px; font: 10px/10px Verdana; color: #fff; display: inline-block; padding-left: 18px; border: 12px solid #333; background: #333 url(' + y + ') no-repeat 0 center;">' + C + '</div></td></tr></table></div><div style="text-align: right; height: 14px; margin-top: -14px; padding-right: 2px; font: 10px/10px Verdana; color: #555;">' + A + "</div>");
            if (z != m) {
                E.css("width", "400px").css("height", "80px")
            }
        };
        var u = function (A, y) {
            var z;
            switch (o) {
            case "ru":
                z = "Неправильный BBCode";
                break;
            case "uk":
                z = "Неправильний BBCode";
                break;
            default:
                z = "Invalid BBCode";
                break
            }
            v(A, y, z)
        };
        var e = function (A, y) {
            var z;
            switch (o) {
            case "ru":
                z = "Извините, этот URL не поддерживается";
                break;
            case "uk":
                z = "Вибачте, цей URL не підтримується";
                break;
            default:
                z = "Sorry, this URL is not supported";
                break
            }
            v(A, y, z)
        };
        var q = false;
        var x = function (z) {
            if (!z) {
                z = window.event
            }
            var y = z.target || z.srcElement;
            if (y && y.getAttribute("ignorewheel")) {
                z.preventDefault()
            }
        };
        t(".bbaudio, .bbvideo, .bbmedia").each(function () {
            var E = t(this);
            var F = E.hasClass("bbaudio") ? b : (E.hasClass("bbvideo") ? m : a);
            var z = E.attr("data-url").replace(/&/ig, "&");
            var y = E.attr("style");
            var B = y.indexOf("width") > -1 ? E.width() : 0;
            var H = y.indexOf("height") > -1 ? E.height() : 0;
            if (E.attr("data-width")) {
                B = E.attr("data-width")
            }
            if (E.attr("data-height")) {
                H = E.attr("data-height")
            }
            var D = E.attr("data-args");
            if (D && (D = t.trim(D).replace(/[\s,]+/g, ",").match(/^(\d+)?(?:[,x](\d+))?(?:(?:^|,)(audio|video))?/i))) {
                if (D[1] !== undefined) {
                    B = D[1]
                }
                if (D[2] !== undefined) {
                    H = D[2]
                }
                if (D[3] !== undefined && F == a) {
                    F = D[3]
                }
            }
            var A = n(z, B, H, F, "https:" == document.location.protocol);
            if (!r(E)) {
                u(E, F)
            } else {
                if (!A) {
                    e(E, F)
                } else {
                    if (p || s) {
                        var I = t(A);
                        B = I.attr("width");
                        H = I.attr("height");
                        E.css("width", B).css("height", H).empty().append(I);
                        if (I.attr("ignorewheel") && !q && document.addEventListener) {
                            q = true;
                            var G;
                            try {
                                WheelEvent("wheel");
                                G = "wheel"
                            } catch (C) {
                                G = document.onmousewheel !== undefined ? "mousewheel" : false
                            }
                            if (G) {
                                document.addEventListener(G, x)
                            }
                        }
                    }
                }
            }
        })
    };
    var f = false;
    var d = function () {
        if (typeof jQuery == "undefined") {
            setTimeout(d, 200)
        } else {
            if (f) {
                jQuery.noConflict()
            }
            jQuery(c)
        }
    };
    if (typeof jQuery == "undefined") {
        f = true;
        var i = document.createElement("script");
        i.type = "text/javascript";
        i.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js";
        var l = document.getElementsByTagName("script")[0];
        l.parentNode.insertBefore(i, l)
    }
    d()
})();
Muggins

Locked

Return to “[3.0.x] Abandoned MODs”

Who is online

Users browsing this forum: No registered users and 10 guests