Parcourir la source

[svn r13074] implements autoplay for mp3player when viewing a doc (not when building it)

Eric Marguin il y a 17 ans
Parent
commit
bbacf605c3

+ 3 - 2
main/document/create_document.php

@@ -1,5 +1,5 @@
 <?php
-// $Id: create_document.php 12809 2007-07-30 21:44:36Z yannoo $
+// $Id: create_document.php 13074 2007-09-18 16:06:35Z elixir_inter $
 /*
 ==============================================================================
 	Dokeos - elearning and course management software
@@ -41,8 +41,9 @@
 // name of the language file that needs to be included 
 $language_file = 'document';
 
-
 include ('../inc/global.inc.php');
+
+$_SESSION['whereami'] = 'document/create';
 $this_section = SECTION_COURSES;
 
 $htmlHeadXtra[]='<script>

+ 3 - 1
main/document/edit_document.php

@@ -1,4 +1,4 @@
-<?php // $Id: edit_document.php 12809 2007-07-30 21:44:36Z yannoo $
+<?php // $Id: edit_document.php 13074 2007-09-18 16:06:35Z elixir_inter $
 /*
 ==============================================================================
 	Dokeos - elearning and course management software
@@ -59,6 +59,8 @@ $language_file = 'document';
 ------------------------------------------------------------------------------
 */
 include('../inc/global.inc.php');
+
+$_SESSION['whereami'] = 'document/create';
 $this_section=SECTION_COURSES;
 
 include(api_get_path(LIBRARY_PATH).'fileManage.lib.php');

+ 3 - 1
main/document/showinframes.php

@@ -1,4 +1,4 @@
-<?php // $Id: showinframes.php 12377 2007-05-11 08:56:44Z elixir_julian $ 
+<?php // $Id: showinframes.php 13074 2007-09-18 16:06:35Z elixir_inter $ 
 /*
 ============================================================================== 
 	Dokeos - elearning and course management software
@@ -54,6 +54,8 @@
 */ 
 
 include('../inc/global.inc.php');
+
+$_SESSION['whereami'] = 'document/view';
 	
 $interbreadcrumb[]= array ("url"=>"./document.php", "name"=> get_lang("Documents"));
 $nameTools = get_lang("Documents");

+ 22 - 0
main/inc/lib/mp3player/is_autostart.as.php

@@ -0,0 +1,22 @@
+<?php
+/**
+This script is used by the mp3 player to see if it should start automatically or not
+*/
+
+require ('../../global.inc.php');
+
+switch($_SESSION['whereami'])
+{
+
+
+	case 'lp/build' : 
+	case 'document/create' : 
+	case 'document/edit' : 
+		$autostart = 'false'; 
+	break;
+	default :
+		$autostart = 'true'; 
+
+}
+echo utf8_encode('autostart='.$autostart);
+?>

BIN
main/inc/lib/mp3player/player_mp3.fla


BIN
main/inc/lib/mp3player/player_mp3.swf