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.


All times are GMT. The time now is 03:57 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.02846 seconds
  • Memory Usage 1,767KB
  • 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
  • (8)bbcode_php_printable
  • (4)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