Posted by catbyte on December 11, 2007 at 10:01am
Jump to:
| Project: | Video Filter |
| Version: | 6.x-2.4 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | catbyte |
| Status: | active |
| Issue tags: | Newbie |
Issue Summary
Hello,
first sorry for my bad english and thank you very much for this very nice module!
I tried to setup myvideo support for your modul but i need a little help with regex...
myvideo.inc
---
<?php
function video_filter_myvideo($video) {
video_filter_dimensions($video, 470, 406);
$video['source'] = substr(strstr($video['source'], '/watch/'), 7);
$output = '<object type="application/x-shockwave-flash" width="'.$video['width'].'" height="'.$video['height'].'" data="http://www.myvideo.de/movie/'.$video['source'].'"><param name="movie" value="http://www.myvideo.de/movie/'.$video['source'].'" /><param name="wmode" value="transparent" /><param name="quality" value="high" /></object>';
return $output;
}
?>---
video_filter.module
i changed the regex to this one, but now the other video platforms are broken.
if (preg_match_all('/\[video(\:(.+))\]/isU', $text, $matches_code)) {
can you help me please?
Greets Maik
Comments
#1
Hi Maik,
My filter does not allow me to acces MyVideo.de
Please send me the full URL of a MyVideo.de video page and I will add support.
Fokke
#2
Always forget to change state :)
#3
No response would mean no really urgent request I guess :)
#4
Sorry, i'm was very busy the last time.
HPI Savage X 4.6 - Skatepark mit bösem Ende! - MyVideo
http://www.myvideo.de/movie/2947646
Thank you very much!!
Greets from Germany!
#5
##############################################################
## SNIPPED Description: Video support for MyVideo.de
##
## Files To Edit: [PathToModules]/video_filter/video_filter.codecs.inc
##
## Edit Level: Easy
##############################################################
## Before Adding This SNIPPET To Your File, You Should Back Up All Files Related To This SNIPPET
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
[PathToModules]/video_filter/video_filter.codecs.inc#
#-----[ FIND ]------------------------------------------
#
function video_filter_codec_info(){
$codecs = array();
#
#-----[ AFTER, ADD ]------------------------------------------
#
$codecs['myvideode'] = array('name' => t('MyVideo'),
'callback' => 'video_filter_myvideode',
// http://www.myvideo.de/4041733
'regexp' => '/myvideo\.de\/video\/([0-9]+)/',
'ratio' => 476 / 411,
);
#
#-----[ FIND ]------------------------------------------
#
return $codecs;}
#
#-----[ AFTER, ADD ]------------------------------------------
#
function video_filter_myvideode($video) {$video['source'] = 'http://myvideo-000.vo.llnwd.net/d1/player/player_V20q.swf?quality=high&DESTSERVER=http://www.myvideo.de&V=http://myvideo-000.vo.llnwd.net/movie/'.$video['codec']['matches'][1].'.flv&ID='.$video['codec']['matches'][1].'&_encxml=http://www.myvideo.de/dynamic/get_xml.php';
return video_filter_flash($video);
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Maybe somebody can optimise the code.
Vielleicht kann jemand den Code optimieren.
Greets from Germany / Grüße aus Deutschland.
#6
See previous post.
#7
Please roll a proper patch.