[svn r13272] add the flv player in the video template.

fix a bug when editing it with firefox in fckeditor
skala
Eric Marguin 17 years ago
parent a8abe2edd9
commit cfcc25bec2
  1. 15
      main/document/create_document.php
  2. 3
      main/inc/lib/fckeditor/fcktemplates.xml.php
  3. 4
      main/newscorm/learnpath.class.php

@ -1,5 +1,5 @@
<?php
// $Id: create_document.php 13091 2007-09-19 14:25:42Z elixir_julian $
// $Id: create_document.php 13272 2007-09-26 09:19:53Z elixir_inter $
/*
==============================================================================
Dokeos - elearning and course management software
@ -301,10 +301,19 @@ if ($form->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('<img src="'.api_get_path(REL_PATH).'main/inc/lib/fckeditor/editor/css/images/flv.gif?flv=',
'<object type="application/x-shockwave-flash" data="'.api_get_path(REL_PATH).'main/inc/lib/flv_player/player_flv_mini.swf" height="240" width="320">
<param name="movie" value="'.api_get_path(REL_PATH).'main/inc/lib/flv_player/player_flv_mini.swf" />
<param name="FlashVars" value="flv=',$content);
$content = str_replace('&amp;endflv" alt="" />','&autoplay=1" /></object><style type="text/css">body{}</style>',$content);
$texte = str_replace('mp3player.swf?son='.urlencode($path_to_remove), 'mp3player.swf?son=.%2F', $texte);
fputs($fp, $texte);
fputs($fp, $content);
fclose($fp);

@ -317,7 +317,7 @@ $css = loadCSS(api_get_setting('stylesheets'));
</tr>
<tr>
<td valign="top">
<embed width="320" height="242" controller="true" src="<?php echo $_configuration['root_web']; ?>main/default_course_document/video/GrSphere.mov" />
<img src="<?php echo api_get_path(REL_PATH) ?>main/inc/lib/fckeditor/editor/css/images/flv.gif?flv=<?php echo api_get_path(WEB_CODE_PATH) ?>default_course_document/video/example.flv&endflv" />
</td>
<td style="vertical-align: top;">
<span class="tablehead"><font size="4"><span style="font-weight: bold;">Excerpt from Marc Shuttleworth's keynote</span></font><br />
@ -352,6 +352,7 @@ $css = loadCSS(api_get_setting('stylesheets'));
<br />
<br />
<br />
<style type="text/css">body{}</style><!-- to fix a strange bug appearing with firefox when editing this template -->
]]>
</Html>

@ -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('</body>','<style type="text/css">body{}</style></body>',$content);
if(!file_exists($filepath . $filename))
{
if($fp = @fopen($filepath . $filename, 'w'))

Loading…
Cancel
Save