From cfcc25bec24732d9c646a50ee580c0b79ae8528a Mon Sep 17 00:00:00 2001 From: Eric Marguin Date: Wed, 26 Sep 2007 11:19:53 +0200 Subject: [PATCH] [svn r13272] add the flv player in the video template. fix a bug when editing it with firefox in fckeditor --- main/document/create_document.php | 15 ++++++++++++--- main/inc/lib/fckeditor/fcktemplates.xml.php | 3 ++- main/newscorm/learnpath.class.php | 4 ++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/main/document/create_document.php b/main/document/create_document.php index 3ef8e59c15..c60261dd2e 100644 --- a/main/document/create_document.php +++ b/main/document/create_document.php @@ -1,5 +1,5 @@ validate()) $texte = text_filter($texte); $content = str_replace(api_get_path('WEB_COURSE_PATH'), $_configuration['url_append'].'/courses/', $texte); + + // replace fake by flv player if needed (fake is present only in templates) + $content = str_replace(' + + ','&autoplay=1" />',$content); $texte = str_replace('mp3player.swf?son='.urlencode($path_to_remove), 'mp3player.swf?son=.%2F', $texte); - - fputs($fp, $texte); + + + fputs($fp, $content); fclose($fp); diff --git a/main/inc/lib/fckeditor/fcktemplates.xml.php b/main/inc/lib/fckeditor/fcktemplates.xml.php index 17ff29edee..843e9e151e 100644 --- a/main/inc/lib/fckeditor/fcktemplates.xml.php +++ b/main/inc/lib/fckeditor/fcktemplates.xml.php @@ -317,7 +317,7 @@ $css = loadCSS(api_get_setting('stylesheets')); - + Excerpt from Marc Shuttleworth's keynote
@@ -352,6 +352,7 @@ $css = loadCSS(api_get_setting('stylesheets'));


+ ]]> diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index d2d82ba302..e3713a8e3e 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -3991,6 +3991,10 @@ class learnpath { $content = str_replace('flv=/|','flv=/',$content); + // for flv player : to prevent edition problem with firefox, we have to use a strange tip (don't blame me please) + $content = str_replace('','',$content); + + if(!file_exists($filepath . $filename)) { if($fp = @fopen($filepath . $filename, 'w'))