'80' ,'autostart' => 'false' )); SDV($AudiooROEenabled, true); # ROEPatterns - AUDIOO EMBED CONVERSION # Converts pasted Audioo embed code into valid pmwiki (:audioo:) code if ($AudiooROEenabled) { $ROEPatterns['!!ie'] = "AudiooROE(PSS('$0'))"; SDV($AudiooROEFmt, '(:audioo $1 autostart=false:)'); function AudiooROE($videocode) { global $AudiooROEFmt; # get url preg_match('#^.*$#', $videocode, $matches); $audiooUrl = $matches[1]; # append extra parameters after the videocode $AudiooROEFmt_local = str_replace('$1', $audiooUrl, $AudiooROEFmt); # must use _local version, or else multiple conversions on the same page keeping adding params to the ROEFmt array $out = $AudiooROEFmt_local; return $out; } } function ShowAudiooVid($fullUrl, $args) { global $AudiooDefaultParams; # need to feed the code both the full url, plus the numeric code at the end of the url: # -> "http://audioo.com/t/for-blinky-palermo--dog-star-orchestra/4d4e3e080544ffd/" # -> and "4d4e3e080544ffd" # extract the numerical code if(!preg_match('#http://audioo.com/t/[^/]+/([^/]+)/?#',$fullUrl,$matches)) return "%error%error: audioo.com input invalid%%"; $urlCode = $matches[1]; # parameters $args = array_merge($AudiooDefaultParams, ParseArgs($args)); $vol = $args['volume']; $autostart = $args['autostart']; # output $out = ""; $out .= "\n "; $out .= "\n "; $out .= "\n "; $out .= "\n "; $out .= "\n\n"; return Keep($out); }