vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - DJ's AMEs :: Media Definitions for AME 2.5 :: More Video, Twitter, Pinterest... (https://vborg.vbsupport.ru/showthread.php?t=195884)

The Geek 07-14-2009 02:37 PM

1 Attachment(s)
Quote:

Originally Posted by Deyth (Post 1848578)

Ok, I worked up a solution that I have tested for the above 3 links.

1. Remove your existing youtube definitions.
2. Import the AME definition attached to this post. I have modified the default version to do what we need it to do (I will also update the default for next AME release to this version).
3. Change the plugin above code to this:

PHP Code:

if ($ameinfo['key'] == "youtube" && $ameinfo['zone'] == "post")
{
    if (
strpos($ameinfo['url'], "fmt=22"))
    {
        
$ameinfo['width'] = "640";
        
$ameinfo['height'] = "480";
        
$p1 .= "&hd=1";
    }
    elseif (
strpos($ameinfo['url'], "fmt=18"))
    {
        
$ameinfo['width'] = "560";
        
$ameinfo['height'] = "380";
    }


Now, the only embed code I could get a different formatting code on was IF it had fmt=22 in the URL. I am not sure what fmt=18 does.

This will basically deal with youtube links as normal, however if the URL contains fmt=18, it will make the video appear a little bigger. If the URL contains fmt=22 then it appears even bigger than that in HD.

Anyhoo, tested with your 3 links above and seems to work.

HTHs

The Geek 07-14-2009 02:39 PM

Quote:

Originally Posted by Deyth (Post 1848613)
Thanks. I saw someone else do it here but I don't know how.

Dont think that is AME. I suspect they have the ability to post HTML direct.

Makc666 07-14-2009 02:45 PM

Quote:

Originally Posted by The Geek (Post 1848521)
Try escaping the quotes as in :

I tried:

PHP Code:

<link rel=\"canonical\" href=\"/video/([a-z_0-9-]+)\" 

PHP Code:

<link rel=\"canonical\" href=\"/video/\([a-z_0-9-]+\)\" 

PHP Code:

<link rel=\"canonical\" href=\"/video/(\[a-z_0-9-\]+)\" 

Do not work...

P.S. Found a bug in PHP BB Code...
Really the lines above look like:

Code:

<link rel=\"canonical\" href=\"/video/([a-z_0-9-]+)\"
Code:

<link rel=\"canonical\" href=\"/video/\([a-z_0-9-]+\)\"
Code:

<link rel=\"canonical\" href=\"/video/(\[a-z_0-9-\]+)\"
It looks like some sort of bug here :(

Deyth 07-14-2009 02:45 PM

I think 18 is hq and 22 is hd. I'll test this now and get back to you. Great response to all this, thanks. Your addon is quite impressive.

The Geek 07-14-2009 02:49 PM

Quote:

Originally Posted by Makc666 (Post 1848621)
I tried:

PHP Code:

<link rel=\"canonical\" href=\"/video/([a-z_0-9-]+)\" 

PHP Code:

<link rel=\"canonical\" href=\"/video/\([a-z_0-9-]+\)\" 

PHP Code:

<link rel=\"canonical\" href=\"/video/(\[a-z_0-9-\]+)\" 

Do not work...

P.S. Found a bug in PHP BB Code...
Really the lines above look like:

Code:

<link rel=\"canonical\" href=\"/video/([a-z_0-9-]+)\"
Code:

<link rel=\"canonical\" href=\"/video/\([a-z_0-9-]+\)\"
Code:

<link rel=\"canonical\" href=\"/video/(\[a-z_0-9-\]+)\"
It looks like some sort of bug here :(


Worked for me. Export the definition and ill check it out as you have it.

Deyth 07-14-2009 02:50 PM

It works in terms of changing container size although the HD doesn't actually match an HD video in size. Also, for some reason when you click on the embed to go to Youtube it doesn't bring you to the HD video. I don't know if that's a Youtube or addon issue. Compare:

http://unmoderated.info/forums/showt...1683#post11683
http://www.youtube.com/watch?v=Kw2gy01gkzs&fmt=22

Deyth 07-14-2009 02:54 PM

The HD size should be 853x505.

The Geek 07-14-2009 03:02 PM

The sizes were just estimates I threw in. Change as it suits your forum (853 in width will break a lot of forum layouts).

When I clicked on the 3rd one, it took me to the HD version of the video, though in honesty I suspect they should have hd=1 in the URLs. THis is something Ill look into better ways to support in the future.

Also, the 3rd one does play in HD, so appart from the sizes (which you can change to suit you) it works as you want doesnt it?

Makc666 07-14-2009 03:09 PM

Quote:

Originally Posted by The Geek (Post 1848625)
Worked for me. Export the definition and ill check it out as you have it.

The Geek, yep.

Looks like it works for me also. :eek:

Better don't know why it was not working. :erm:

AME Settings -> Extract destination data -> No

And the notice message which has to be displayed while you were editing some definition was "Dismiss"ed a long time ago. :o

The Geek, I promise, I will punish myself.

Really sorry.
Excuse me!
It will be another lesson for me.

Thanks for you time!

Deyth 07-14-2009 03:14 PM

Quote:

Originally Posted by The Geek (Post 1848639)
The sizes were just estimates I threw in. Change as it suits your forum (853 in width will break a lot of forum layouts).

When I clicked on the 3rd one, it took me to the HD version of the video, though in honesty I suspect they should have hd=1 in the URLs. THis is something Ill look into better ways to support in the future.

Also, the 3rd one does play in HD, so appart from the sizes (which you can change to suit you) it works as you want doesnt it?

Yes it is, thanks again.


All times are GMT. The time now is 08:14 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02031 seconds
  • Memory Usage 1,764KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (7)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete