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)

Makc666 07-14-2009 08:39 AM

Quote:

Originally Posted by The Geek (Post 1848482)
The regexp will capture x9m63m_canarias-timelapse_creation into $p1

Did I understand right that it will capture x9m63m_canarias-timelapse_creation using Embedding Regexp?

The Geek 07-14-2009 09:32 AM

1 Attachment(s)
Here is a new definition for internal linking. Note that this will link ALL guest accessible area of your site so you don't need seperate ones for linking posts, threads, etc. If you have DJ's internal linking definitions installed, please delete those before importing this one.

Note that you will need to edit this definition during the import process or afterward to enter your domain name.

The setting you want to change is the Regular Expression in order to swap YOUR_DOMAIN to whatever your domain name is.

For example, lets say that your domain is www.google.com (can I be your friend if it is?). You would change:

PHP Code:

[http://]*[a-z]*?[\.]?YOUR_DOMAIN\.[a-z]*?/([A-Z0-9._%-\?\=]*) 

to

PHP Code:

[http://]*[a-z]*?[\.]?google\.[a-z]*?/([A-Z0-9._%-\?\=]*) 

Note that you do not add and special characters, prefixes or suffixes (i.e. do not use .com or .co.uk, or start with www., etc...)

The Geek 07-14-2009 09:33 AM

Quote:

Originally Posted by Makc666 (Post 1848484)
Did I understand right that it will capture x9m63m_canarias-timelapse_creation using Embedding Regexp?

Yes. It will appear in the output if you have $p1 in your replace code.

Makc666 07-14-2009 10:17 AM

Quote:

Originally Posted by The Geek (Post 1848492)
Yes. It will appear in the output if you have $p1 in your replace code.

After LONG time conversation we are on our final way :D

But the problem is - it doesn't work :eek:

May be you will try your-self? ;)
  • Post URL:
    http://www.dailymotion.com/video/x9m63m_canarias-timelapse_creatio
  • Regular expression
    PHP Code:

    [http://]*[a-z]*?[\.]?dailymotion\.[com|alice\.it]+/[\w/\-%]*video/([\w\-]+) 

  • Replacement
    PHP Code:

    <object width="$ameinfo[width]height="$ameinfo[height]"><param name="movie" value="http://www.dailymotion.com/swf/$p1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/$p1type="application/x-shockwave-flash" width="$ameinfo[width]height="$ameinfo[height]allowFullScreen="true" allowScriptAccess="always"></embed></object

  • Extract destination data
    Yes
  • Embedding Regexp
    PHP Code:

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


This one doesn't work :(

I made a test file and there it works...
PHP Code:

<?php

$test 
"       <link rel=\"canonical\" href=\"/video/x9m63m_canarias-timelapse_creation\" />";

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

if (
ereg ($what$test$regs)) {
    echo 
"$regs[1]";
} else {
    echo 
"Invalid date format!";
}

?>


The Geek 07-14-2009 11:07 AM

Try escaping the quotes as in :

PHP Code:

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


Deyth 07-14-2009 11:59 AM

I use AME 2.5.5. I imported your master XML list without a hitch and then tried to post a link to an HD Youtube video but it showed up as with an SD size. How do I get it to show as it would on Youtube?

The Geek 07-14-2009 12:43 PM

Quote:

Originally Posted by Deyth (Post 1848541)
I use AME 2.5.5. I imported your master XML list without a hitch and then tried to post a link to an HD Youtube video but it showed up as with an SD size. How do I get it to show as it would on Youtube?

It's DJ's add on, so I am not 100% sure about his youtube key, but you can do this:

create a plugin:

Hook Location: automediaembed_parse_bbcode_match_start
Title: Youtube HD Bigga Please

code
PHP Code:

if ($ameinfo['key'] == "youtube_hqhd" && $ameinfo['zone'] == "post"

        
$ameinfo['width'] = "640"
        
$ameinfo['height'] = "480"


IIRC, his youtube HD key is youtube_hqhd but you will need to double check. The code above will override the media settings if the key is youtube_hqhd its in a post.

FWIW, I am investigating the ability to override these settings on a per definition basis in a future version of AME.

Deyth 07-14-2009 01:02 PM

You got the key right but it doesn't work. These are the links I'm testing with:

http://www.youtube.com/watch?v=Kw2gy01gkzs
http://www.youtube.com/watch?v=Kw2gy01gkzs&fmt=18
http://www.youtube.com/watch?v=Kw2gy01gkzs&fmt=22

The Geek 07-14-2009 02:17 PM

The last one is the only one that looks like it should be the HD one. Ill look into DJ's definition and see if I can see if/why it may/may not be working.

Deyth 07-14-2009 02:31 PM

Thanks. I saw someone else do it here but I don't know how.

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.

msolano 07-14-2009 07:11 PM

I had some problems with double video embedding, even no double definitions exists.

I ran the rebuild option but nothing happended.

Just uninstalled, and re-installled and now it works.

Very weird. Thanks for this great mod.

barcena 07-15-2009 08:22 AM

1 Attachment(s)
I did installed the first file DJ's Master XML (Delta) trough the AME CP, I did had "The Geek" AME already installed. Before I did delete Amazon and Youtube from the first AME. I think I did everything fine because it told me "Imported as a charm" or some like that, I also set it to Extract destination data; I must confess I'm going like following the arrow bc Im not expert.

Question:
The 6 images, arrows etc, is there a file that I have to save into my forum files? Is so where it is and under what file should I save it to.
However, nevermind the images if you will.....my big problem so far is this:
When I copy a video link into my post (from three different sources so far) I will get a little linked dot and that's all.
Please see the attachment.
Any idea on why? I'm missing something?

The Geek 07-15-2009 10:35 AM

Can you provide a link that you were using?

newsoftw 07-15-2009 11:10 AM

HI....

meta cafe videos are not working means ust link is show.

please check link :
http://www.newsoftworld.com/forums/e...ttlefield.html

barcena 07-15-2009 06:44 PM

Quote:

Originally Posted by The Geek (Post 1849123)
Can you provide a link that you were using?

Sure, you can see it here: (surprisingly a Google video is the only one working) as for the others you will see a little linked dot, I just put the name so you will know the video source I intented to use.


Click Here please

The Geek 07-15-2009 08:04 PM

I need the URLs and need to know if they are the default definitions or ones that someone else made

barcena 07-15-2009 08:50 PM

I didn't touch the defaults, not sure If I underestand what you mean though...

I'm not using embeding urls or anything else but the actual url of the page where the video is in. Now you can see the url's, is fixed.

Videos and links, last post please

SMMensans 07-16-2009 05:23 AM

First. Thank you for all the hard work on this mod.

Is there a way to disable the resizing of the videos?

I tried removing the default height and width definitions but that did not resolve.

Read through the FAQ and did a search but didn't find any useful results.

Thanks

The Geek 07-16-2009 10:33 AM

Quote:

Originally Posted by SMMensans (Post 1849713)
First. Thank you for all the hard work on this mod.

Is there a way to disable the resizing of the videos?

I tried removing the default height and width definitions but that did not resolve.

Read through the FAQ and did a search but didn't find any useful results.

Thanks

If you remove the dimensions, the embeds will not appear as they are contained within the Embedding code. There really isn't a way to have the object appear at a 'default' size. If you look at the HTML of the site in question, all the embeds will have specified sizes.

Saying that, I am starting to look at a way to specify the media dimensions on a per definition basis, but have no idea when the next version will be out.

The Geek 07-16-2009 10:36 AM

Quote:

Originally Posted by barcena (Post 1849504)
I didn't touch the defaults, not sure If I underestand what you mean though...

I'm not using embeding urls or anything else but the actual url of the page where the video is in. Now you can see the url's, is fixed.

Videos and links, last post please

The dots are being caused by no height and width dimensions appearing in your replace code (kind of funny as the person after you was asking about this ;) ). This is caused by either your Height and Width settings in AME being removed OR from using definitions that are not default or up to date.

popular 07-16-2009 11:24 AM

hey geek i've come up with a new problem, i can play youtube/google video fine , but so far i've tred sites like break.com/veoh/cafepress/youku and a buncha others but no video plays, i only get a regular url as if i were pasting it, any idea? ive imported DJ's Master XML (Delta).xml removed it and tried it again but same problem.

The Geek 07-16-2009 11:42 AM

I don't think all of his definitions are up to date. IIRC, I did one for break a few pages back if that helps.

popular 07-16-2009 06:16 PM

thanks , i hope someone creates an updated import =))

applebeef 07-16-2009 07:44 PM

Quote:

Originally Posted by applebeef (Post 1844836)
I'm interested in using AME for two things:

-Youtube (works beautifully out of the box)

-local hosted .swf


The second one is what I'm having trouble with... I've imported the definition for it and configured my hostname for it (only 2 instances right?)


I can't get it to work though. It embeds the .swf, and shows the background or first frame of it, but otherwise is unresponsive. For an example see this: http://charles-song.com/testvb/showt...hp?p=17#post17

The .swf (a slideshow) works fine in other areas of my site, and by itself, if I put the direct url in my browser.

What am I doing wrong?

Still need help with this, anyone? :o

barcena 07-16-2009 08:13 PM

1 Attachment(s)
Quote:

Originally Posted by The Geek (Post 1849848)
The dots are being caused by no height and width dimensions appearing in your replace code (kind of funny as the person after you was asking about this ;) ). This is caused by either your Height and Width settings in AME being removed OR from using definitions that are not default or up to date.

Can you tell me please where I can change the Height and Width settings? I were looking into the AME CP but can't find a place where to change it. Remember I'm a total neophyte when it comes to this, I'm just trying to learn and do it right that's why I'm asking you or bothering you if you will :)

Thanks The Geek for been so patient w/ me.

If somebody else can answer the question and help The Geek to help me please be my guest. :)

This is what I have on the Admin CP--AME Settings. See attachment please.

Thanks.

The Geek 07-16-2009 09:30 PM

Quote:

Originally Posted by barcena (Post 1850130)
Can you tell me please where I can change the Height and Width settings? I were looking into the AME CP but can't find a place where to change it. Remember I'm a total neophyte when it comes to this, I'm just trying to learn and do it right that's why I'm asking you or bothering you if you will :)

Thanks The Geek for been so patient w/ me.

If somebody else can answer the question and help The Geek to help me please be my guest. :)

This is what I have on the Admin CP--AME Settings. See attachment please.

Thanks.

Your youtube definition is not correct. Try importing the one I posted a couple pages back.

barcena 07-16-2009 10:41 PM

Quote:

Originally Posted by The Geek (Post 1850179)
Your youtube definition is not correct. Try importing the one I posted a couple pages back.


Thanks. I imported this:

HTML Code:

AME-internal.xml (756 Bytes, 2 views)
Trough the AME CP. Didn't work, everything remains the same, I'm pretty sure is something minimal but I can't find what it is, see for yourself please the last two posts:

Video Test

The Geek 07-17-2009 09:41 AM

Have you edited and resaved or tried a new post? vB caches the HTML in recent posts to speed up processing which means that your recent posts will already have been processed and AME won't be run on them again for awhile unless they are edited and saved or you re run the rebuild tool.

If this isn't the case, post your replacement code.

barcena 07-17-2009 07:47 PM

1 Attachment(s)
Thanks Thee Geek, your patience paid of, any idea on why metacafe is not working?Dailymotion isn't either btw, Google and Youtube r working as a charm so far.

The Geek 07-17-2009 08:02 PM

Dont know as I didn't write them. The reason I gave AME the ability to import and export definitions was so that the community could share, modify and keep up with the ever changing face of media sites. It was that or I spent all my coding time trying to keep up with it all. Sadly, I'll never have the time to make everybodys definitions. I pitch in where I can, however the more time I spend doing this, the less time I have to work on the next version (which I am trying to do).

So I suppose in a round about way, I am saying "I'm not sure why those aren't working, buy if I get some time I'll check it out" ;)


All times are GMT. The time now is 09:34 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.02565 seconds
  • Memory Usage 1,892KB
  • 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
  • (1)bbcode_html_printable
  • (15)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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