Changeset 1334

Show
Ignore:
Timestamp:
12/03/07 22:09:01 (1 year ago)
Author:
misja
Message:

Misja Hoebe <misja@curverider.co.uk> Applied patch in #145, Make video keyword {{video:}} more flexible

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/contenttoolbar/lib/contenttoolbar_text_processing.php

    r1147 r1334  
    99 * @param string $run_result String with the result 
    1010 *  
    11  * @author Diego Andrés Ramírez Aragón <diego@somosmas.org> 
    12  * @copyright Diego Andrés Ramírez Aragón - 2007 
     11 * @author Diego Andrᅵs Ramᅵrez Aragᅵn <diego@somosmas.org> 
     12 * @copyright Diego Andrᅵs Ramᅵrez Aragᅵn - 2007 
    1313*/ 
    1414if (isset ($parameter)) { 
    1515            $functionbody = <<< END 
    1616                 
    17                 \$width = 240; 
    18                 \$height = 200; 
    19                 \$url = str_replace("&amp;","&",\$matches[1]); 
     17                \$width = 400; 
     18                \$height = 300; 
     19                \$url = trim(\$matches[1]); 
     20                \$url = str_replace("&amp;","&",\$url); 
     21                \$url = preg_replace("/youtube.com\/watch\?v\=/","youtube.com/v/",\$url); // youtube 
     22                \$url = preg_replace("/video.google.com\/videoplay/","video.google.com/googleplayer.swf",\$url); // google video 
    2023                preg_match("/(.*)\@\@(\d+)x(\d+)/i",\$url,\$size); 
    2124                if(count(\$size)==4){