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)
-   -   Major Additions - AME 2.5 - Media Embedding for posts, sigs, vm's, groups and blogs (https://vborg.vbsupport.ru/showthread.php?t=202476)

markuswarren 06-23-2009 12:19 PM

I've also noticed an oddity with the youtube media definition not always working. I cannot state wether this was due to the 3.8.3 upgrade or not, but I don't think it is.
Why? Well I've spoken to some users and asked them to supply me with the URLS they actually put into their posts, both for working and non working youtube media. I've found the following:

A url of this format does work:
Code:

http://www.youtube.com/watch?v=XXXX-XxXXxxX
A url of this format does NOT work:
Code:

http://www.youtube.com/v/XXXX-XxXXxxX
The reason to me is obvious, the format of the urls are different and the youtube definition seems to be working on the one with "watch?" as part of the url. Thus I would assume you could add a new definition via exporting the existing youtube one, changing the key for it and of course the regular expression it's looking at and then import it as a new definition

I've exported and imported my "new" definition, but I'm no expert on regular expressions, so I'm a bit stuck here.

It's possible this problem has always existed, or it could be that youtube has changed something in regards to it's url format and it's co-incidence that this occurred when vB 3.8.3 was released.

barcena 06-23-2009 02:59 PM

PHP Code:

http://www.metacafe.com/watch/sy-25841763001/jordin_sparks_battlefield_official_music_video/ 

Id paste the link of a Metacafe video and i'm getting only the link, not the video itself.

http://www.metacafe.com/watch/sy-258...l_music_video/

barcena 06-23-2009 03:07 PM

Well not only that, now i only get links even with youtube, i will like to go to my previous status, how can i do that? Just by dissabling the mod?.

I want to be able to see at least the youtube videos embeded.

The Geek 06-23-2009 04:30 PM

Quote:

Originally Posted by Ryloth (Post 1835194)
ok so 3.8.3 and youtube def does not work. it always wraps it w/ a URL tag and puts the following image before it:

Provide some example youtube urls for me to check out. It could be that the validation is failing because of some other error. You can try editing the definition and clearing out the validation regexp which will prevent AME from trying to validate the media.

The Geek 06-23-2009 04:33 PM

Quote:

Originally Posted by newsoftw (Post 1835535)

when i Upgrade vb vbulletin version 3.8.2 into 3.8.3....after that , the youtube video is working stop and also some other videos means only show links in forum...

http://www.newsoftworld.com/forums/f...wc-2009-a.html

plz any idea about that and solve urgently this problem.

please any body help me urgently............please.....the videos are not display in the forum and all user start the complaints......

thanks in ADVNS



I dont fully follow you, but it could be related to the post above. Can you provide some URLs that are not working?

The Geek 06-23-2009 04:34 PM

Quote:

Originally Posted by markuswarren (Post 1835556)
I've also noticed an oddity with the youtube media definition not always working. I cannot state wether this was due to the 3.8.3 upgrade or not, but I don't think it is.
Why? Well I've spoken to some users and asked them to supply me with the URLS they actually put into their posts, both for working and non working youtube media. I've found the following:

A url of this format does work:
Code:

http://www.youtube.com/watch?v=XXXX-XxXXxxX
A url of this format does NOT work:
Code:

http://www.youtube.com/v/XXXX-XxXXxxX
The reason to me is obvious, the format of the urls are different and the youtube definition seems to be working on the one with "watch?" as part of the url. Thus I would assume you could add a new definition via exporting the existing youtube one, changing the key for it and of course the regular expression it's looking at and then import it as a new definition

I've exported and imported my "new" definition, but I'm no expert on regular expressions, so I'm a bit stuck here.

It's possible this problem has always existed, or it could be that youtube has changed something in regards to it's url format and it's co-incidence that this occurred when vB 3.8.3 was released.

That could cause a problem. Please post some example URLs though that are having a problem.

The Geek 06-23-2009 04:36 PM

Quote:

Originally Posted by barcena (Post 1835649)
PHP Code:

http://www.metacafe.com/watch/sy-25841763001/jordin_sparks_battlefield_official_music_video/ 

Id paste the link of a Metacafe video and i'm getting only the link, not the video itself.

http://www.metacafe.com/watch/sy-258...l_music_video/

Youll have to ask the person who did the metacafe definition.

Hmm... will start to run some 3.8.3 tests.

The Geek 06-23-2009 04:50 PM

FWIW, I just installed a fresh copy of 3.8.3 and AME 2.5.4 and can't see any issues. Everything I am posting from youtube is working as expected so if you think that AME is getting false positives on validating embedding, please provide some example URLs that should be embedding but aren't.

Thanks all

daFish 06-23-2009 05:25 PM

A user recently posted this URL and it doesn't get converted to the embedded player:
http://www.youtube.com/watch?v=KzShwtQHYms

I assume the bracket in the video title confuses the parser.

The Geek 06-23-2009 05:46 PM

Bracket should be fine. In fact, just tested it on default install and it embeds fine. Have you tried it?

daFish 06-23-2009 06:11 PM

Quote:

Originally Posted by The Geek (Post 1835777)
Bracket should be fine. In fact, just tested it on default install and it embeds fine. Have you tried it?

Here is the result: http://www.soundtrack-board.de/11647...tml#post153185

The Geek 06-23-2009 07:06 PM

Like I said, it works on a default install. My guess would be that another mod is conflicting or a sloppy paste job. Am assuming you are using the default youtube definition.

HTHs

barcena 06-23-2009 08:50 PM

1 Attachment(s)
Hi The Geek or anyone else that knows, is this correctly set?

See screenshot please.

This is what I'm getting, a kind of little linked dot.

Example

Ryloth 06-23-2009 11:15 PM

Quote:

Originally Posted by The Geek (Post 1835704)
Provide some example youtube urls for me to check out. It could be that the validation is failing because of some other error. You can try editing the definition and clearing out the validation regexp which will prevent AME from trying to validate the media.



http://www.youtube.com/watch?v=LrQIA-0C9WY


hehe sorry my thought process at the time i made the post.


If I throw it in AME tags, it works fine.

https://vborg.vbsupport.ru/external/2009/06/53.jpg

markuswarren 06-24-2009 04:55 PM

Quote:

Originally Posted by The Geek (Post 1835708)
That could cause a problem. Please post some example URLs though that are having a problem.

Ok, here you go:

URL from YouTube that AME parses correctly when put in a post:
Code:

http://www.youtube.com/watch?v=VKJO-aWyOww

URL from embed link that AME is not parsing (shows an icon followed by the link to the video)
Code:

http://www.youtube.com/v/VKJO-aWyOww

Ryloth 06-24-2009 04:59 PM

^^ by your above logic that means my post should have been parsed correctly and it is not. see my post above yours for the link.

newsoftw 06-24-2009 05:33 PM

Quote:

Originally Posted by newsoftw (Post 1835535)
[B]
when i Upgrade vb vbulletin version 3.8.2 into 3.8.3....after that , the youtube video is working stop and also some other videos means only show links in forum...

http://www.newsoftworld.com/forums/f...wc-2009-a.html

plz any idea about that and solve urgently this problem.

please any body help me urgently............please.....the videos are not display in the forum and all user start the complaints......

thanks in ADVNS



Quote:

Originally Posted by The Geek (Post 1835707)
I dont fully follow you, but it could be related to the post above. Can you provide some URLs that are not working?



when any body post any new youtube links in forum but not show videos and display only youtube links...

please check that links...

youtube
01. http://www.newsoftworld.com/forums/f...scary-rat.html

02. http://www.newsoftworld.com/forums/f...-nail-gun.html

03. http://www.newsoftworld.com/forums/f...wc-2009-a.html

metacefa
04. http://www.newsoftworld.com/forums/e...html#post11462



please help on that problem.
Thanks in ADVNS

The Geek 06-26-2009 12:13 PM

Bug notice where URLs are only showing instead of the media (or showing oddly) in vB3.8.3:

It looks like there is a bug with the latest WYSIWYG editor. I have only done initial tests and have only just posted a bug in the vB bug tracker so it could be a little early yet to pin point, however: It appears that when using the WYSIWYG editor in IE on vb3.8.3, the editor will include color tags within the URL tags. This doesnt appear to happen with FF or earlier versions of vB. It appears that if indeed this is the reason, that AME is choking on the HTML/BBcode that is chucked in with the URL.

I am sure I can insert some tests to strip these out if needed, but in the meantime the only workaround I can find is to either post in FF or toggle to the normal text editor.

I am going out of town tomorrow so I may not get a fix posted until next week.

The Geek 06-26-2009 12:15 PM

Quote:

Originally Posted by Ryloth (Post 1835194)
URL from embed link that AME is not parsing (shows an icon followed by the link to the video)
Code:

http://www.youtube.com/v/VKJO-aWyOww

The above isn't a valid URL. Its a direct link to the actual flash object and one that wouldnt appear in the address bar when browsing youtube. AME needs a valid URL (though a custom definition could possibly be created)

markuswarren 06-26-2009 12:25 PM

Quote:

Originally Posted by The Geek (Post 1837778)
The above isn't a valid URL. Its a direct link to the actual flash object and one that wouldnt appear in the address bar when browsing youtube. AME needs a valid URL (though a custom definition could possibly be created)

Ah, well that would probably explain the issue I'm seeing then. So, basically, I should ensure that if someone is going to post a url from youtube they make sure it's a proper url, by this I mean it's copied from the youtube page it's being viewed from and has the "watch" portion included.

The DaveyG 06-26-2009 10:37 PM

Great mod.

I'm using this in conjunction with a Forms app. For example, I have the user enter the URL of a show on Hulu and it is supposed to automatically show up embedded on the thread that is generated. However, it's not changing the link into an imbed. Is there some setting I am missing or does this just not work on posts not made using the traditional means?

swami2302 06-28-2009 06:58 PM

I need help!!!! Youtube isn't showing up. All I get is the title of my post. And that's it. In fact I have tried several different sites and the only one I've had any success with is Google. However the videos in Google are small. Please Help

http://www.unitygospel.net/forum/showthread.php?t=240

Ohiosweetheart 06-29-2009 03:41 PM

I have good success with Yahoo videos.

But, I too, am having a problem with YouTube not parsing. I get the link instead of the video. However, it's only intermittent, not all the time.

See Here - http://www.rushhourmadness.com/showt...p?t=124&page=2

wolfstream 06-29-2009 04:29 PM

Quote:

Originally Posted by Ohiosweetheart (Post 1839650)

You'll note in that specific Youtube video, in the embedding link:

Quote:

Embedding disabled by request
This would be why it doesn't work.

If the video couldn't be embedded, there needs to be some sort of warning for the user, it only makes sense, but that would be why that youtube video didn't work right. In fact, if you look at most of them that don't work right (if not all), I'd bet you would see the same thing

Ryloth 06-29-2009 09:09 PM

Quote:

Originally Posted by The Geek (Post 1837778)
The above isn't a valid URL. Its a direct link to the actual flash object and one that wouldnt appear in the address bar when browsing youtube. AME needs a valid URL (though a custom definition could possibly be created)


According to the definition it is. Also if you wrap it in AME tags, it loads up just fine.

Btw I am using FF and not the advanced WYSIWYG



Definition:

[http://]*[a-z]*?[\.]?youtube\.[a-z]*?/watch\?v=([A-Z0-9._%-]*)[&\w;=\+_\-]*

Ryloth 06-29-2009 09:15 PM

update, i went into the definition and turned off Extract Information and youtube started working again just fine.

Looks like there is an issue w/ the Extract Information functionality.


the extract definition date value is:

value="http://www\.youtube\.com/v/([\w\-]*)?&

Omanternity 06-30-2009 03:44 AM

Hey

Is there any possible way to make AME only come into effect when the URL is posted in it's URL form

http://youtube.com/etc

and not if it was inside a marked up text link [URL] ?

Is this possible at all ?

newsoftw 06-30-2009 09:49 AM

Quote:

Originally Posted by Ryloth (Post 1839834)
update, i went into the definition and turned off Extract Information and youtube started working again just fine.

Looks like there is an issue w/ the Extract Information functionality.


the extract definition date value is:

value="http://www\.youtube\.com/v/([\w\-]*)?&


Thanks for great helping and also after doing that, working start only youbue videos but youtube videos are twice a time show in post....please below link....

http://www.newsoftworld.com/forums/f...-nail-gun.html


please any idea ???

Ohiosweetheart 06-30-2009 09:29 PM

Quote:

Originally Posted by wolfstream (Post 1839680)
You'll note in that specific Youtube video, in the embedding link:


This would be why it doesn't work.

If the video couldn't be embedded, there needs to be some sort of warning for the user, it only makes sense, but that would be why that youtube video didn't work right. In fact, if you look at most of them that don't work right (if not all), I'd bet you would see the same thing

Well darn. I thought that the other link would work.

Thanks for your help.

Wayne Luke 07-01-2009 07:08 PM

Sorry if this has been posted before but there are too many posts in the thread to read them all.

I want to show YouTube HD in a 16:9 format and not the 4:3 format provided now. Anyone know how to change the definition to accommodate this?

The Geek 07-03-2009 10:57 AM

I have just uploaded AME 2.5.5 to address a couple of minor issues. Mainly surrounding editing of existing AME links that contain brackets inside the name. This could (in rare cases) also affect posts with multiple media URLs in them.

I also added another hook to extend additional functionality for media that fails to validate (i.e. a youtube link that doesn't allow external embedding). I do not currently have plans to extend this area further than I have done, but its there :)

Files changed:
  • forums/includes/ame_bbcode.php
  • forums/includes/xml/hooks_automediaembed.xml

I have also updated the ame_nomedia template to add the phrase 'External Embedding Not Available' as the title to the link. This appears if the definition does not validate along with an icon. If you want to make it more obvious to the user that AME is working, but the video won't embed, I suggest playing with that template (or use the new hook).

To upgrade:

Download the latest package
Unzip and upload the contents of the upload/forums folder into your own forums folder (be sure to upload ALL the files and folders choosing to overwrite existing files).
Import the product_ame.xml file into your admincp product system (choosing to overwrite existing version)

The Geek 07-03-2009 11:16 AM

Quote:

Originally Posted by Wayne Luke (Post 1840936)
Sorry if this has been posted before but there are too many posts in the thread to read them all.

I want to show YouTube HD in a 16:9 format and not the 4:3 format provided now. Anyone know how to change the definition to accommodate this?

Depends on a couple things. I moved the position of one of AMEs hooks in 2.5.5 to hopefully accommodate what I think you're after.

If only using the default youtube definition and you only want youtube videos with hd=1 in the URL to be a larger size, then just create a new plugin:

Hook Location: automediaembed_parse_bbcode_match_start
Title: Youtube HD Bigga Please
Code:
PHP Code:

if ($ameinfo['key'] == "youtube" && $ameinfo['zone'] == "post")
{
    if (
strpos($ameinfo['url'], "hd=1"))
    {
        
$ameinfo['width'] = "640";
        
$ameinfo['height'] = "480";
    }


Obviously adjust width and height as you fancy.

What this will do is check the definition key and the zone you are in. If the matching definition key is youtube and the zone is post, then it will check the URL for hd=1 (which is my understanding of how youtube marks HD URLs. It then overrides the zones size.

I am sure you can get even more creative :)

Anyhoo, hope this helps!

The Geek 07-03-2009 11:18 AM

Quote:

Originally Posted by newsoftw (Post 1840093)
Thanks for great helping and also after doing that, working start only youbue videos but youtube videos are twice a time show in post....please below link....

http://www.newsoftworld.com/forums/f...-nail-gun.html


please any idea ???

Double posting indicates duplicate definitions.

The Geek 07-03-2009 11:21 AM

Quote:

Originally Posted by Omanternity (Post 1839985)
Hey

Is there any possible way to make AME only come into effect when the URL is posted in it's URL form

http://youtube.com/etc

and not if it was inside a marked up text link [URL] ?

Is this possible at all ?

Not sure if I follow. vB wraps all text it thinks are URLs with URL tags before AME gets to it (as long as the option to automatically parse links in text is checked). AME only checks URL tags and not the text itself so you have a couple options:

1- Untick the option to parse links in text
2- Untick the 'Automatically embed media' option when posting

Hope that helps!

The Geek 07-03-2009 11:27 AM

Quote:

Originally Posted by Ryloth (Post 1839831)
According to the definition it is. Also if you wrap it in AME tags, it loads up just fine.

Btw I am using FF and not the advanced WYSIWYG



Definition:

[http://]*[a-z]*?[\.]?youtube\.[a-z]*?/watch\?v=([A-Z0-9._%-]*)[&\w;=\+_\-]*

Quote:

Originally Posted by Ryloth (Post 1839834)
update, i went into the definition and turned off Extract Information and youtube started working again just fine.

Looks like there is an issue w/ the Extract Information functionality.


the extract definition date value is:

value="http://www\.youtube\.com/v/([\w\-]*)?&

I think you are using another definition here.

[http://]*[a-z]*?[\.]?youtube\.[a-z]*?/watch\?v=([A-Z0-9._%-]*)[&\w;=\+_\-]*

Will not match

http://www.youtube.com/v/XXXX-XxXXxxX

Nor should it because http://www.youtube.com/v/XXXX-XxXXxxX in an address bar will not take you to a video as it is the movie object address. When AME validates, it uses

value="http://www\.youtube\.com/v/([\w\-]*)?&

Because that is the HTML that is in the source when the embed URL is present on the page. Otherwise it isn't there and instead 'Embedding disabled by request' or whatever.

I have tested this pretty throughly and while bugs in anything are inevitable, I am confident that the default install works as intended. If you are using custom or new definitions, that could be the culprit.

The Geek 07-03-2009 11:31 AM

Quote:

Originally Posted by wolfstream (Post 1839680)
If the video couldn't be embedded, there needs to be some sort of warning for the user, it only makes sense, but that would be why that youtube video didn't work right. In fact, if you look at most of them that don't work right (if not all), I'd bet you would see the same thing

If the video doesn't allow embedding, the page title will still appear and an icon will be displayed. Furthermore in 2.5.5 I put 'External embedding not available' in the anchor title. I also added a hook to enable modders to extend this functionality, but apart from that, not sure how much more I can do. Personally I would suggest editing the ame_nomedia template to maybe put text after the link like: (media cannot be embedded). I didn't do that by default because I didn't want to go overkill on visual hints.

The Geek 07-03-2009 11:35 AM

Quote:

Originally Posted by The DaveyG (Post 1838118)
Great mod.

I'm using this in conjunction with a Forms app. For example, I have the user enter the URL of a show on Hulu and it is supposed to automatically show up embedded on the thread that is generated. However, it's not changing the link into an imbed. Is there some setting I am missing or does this just not work on posts not made using the traditional means?

The forms app would need to hook into AME to prep and parse the text. Check out AMEs plugins to see how AME is doing it for blogs, visitor messages, posts, etc... for an idea of how to do it.

HTHs!

jkcerda 07-03-2009 06:51 PM

updated.

Break.com
ESPN
and AOL video are still NOT working:confused:

HMBeaty 07-03-2009 06:53 PM

Just FYI Geek, theres an error in the version checking of this modification

jkcerda 07-03-2009 07:11 PM

Quote:

Originally Posted by Redlinemotorsports (Post 1842257)
Just FYI Geek, theres an error in the version checking of this modification

dang, I just installed it too:o


All times are GMT. The time now is 04:43 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.02814 seconds
  • Memory Usage 1,883KB
  • 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
  • (7)bbcode_code_printable
  • (3)bbcode_php_printable
  • (24)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