add absolute path for player
authorymh <ymh.work@gmail.com>
Wed, 12 May 2010 13:31:26 +0200
changeset 131 7f75650ef59d
parent 130 92097c549081
child 132 646c59d77cc9
add absolute path for player
build/sbin/sync_mosatags
web/thdProject/apps/frontend/modules/homepage/templates/searchSuccess.php
web/thdProject/apps/frontend/templates/layout.php
web/thdProject/web/js/uc.common.js
--- a/build/sbin/sync_mosatags	Fri May 07 12:19:04 2010 +0200
+++ b/build/sbin/sync_mosatags	Wed May 12 13:31:26 2010 +0200
@@ -147,6 +147,8 @@
 P robots.txt
 P log/***
 P data/***
+P web/media/***
+P web/media
 EOT
         if [ "$hg_operation" == "update" ]; then
           pushd "$export_path_web";
--- a/web/thdProject/apps/frontend/modules/homepage/templates/searchSuccess.php	Fri May 07 12:19:04 2010 +0200
+++ b/web/thdProject/apps/frontend/modules/homepage/templates/searchSuccess.php	Wed May 12 13:31:26 2010 +0200
@@ -11,7 +11,7 @@
 </div>
 <script language="JavaScript">
 	// a very simple setup
-	flowplayer("div.player-item", "flashes/flowplayer-3.1.3.swf",
+	flowplayer("div.player-item", "<?php echo flash_path('flowplayer-3.1.3.swf'); ?>",
 	{
 		// configuration for a clip
 			clip: {
--- a/web/thdProject/apps/frontend/templates/layout.php	Fri May 07 12:19:04 2010 +0200
+++ b/web/thdProject/apps/frontend/templates/layout.php	Wed May 12 13:31:26 2010 +0200
@@ -7,6 +7,10 @@
     <?php include_http_metas() ?>
     <?php include_metas() ?>
     <?php include_title() ?>
+    <?php include_javascripts() ?>
+    <script type="text/javascript">
+    uc.common.initplayer("<?php echo flash_path('flowplayer-3.1.3.swf'); ?>");
+    </script>
     <link rel="shortcut icon" href="/favicon.ico" />
   </head>
   <body>
--- a/web/thdProject/web/js/uc.common.js	Fri May 07 12:19:04 2010 +0200
+++ b/web/thdProject/web/js/uc.common.js	Wed May 12 13:31:26 2010 +0200
@@ -10,6 +10,24 @@
 	uc.utils.ajaxifyForm(jQuery('form.ajax'), function() {uc.common.ajaxify();});
 }
 
+uc.common.initplayer = function(swflocation) {
+	jQuery(document).ready(function() {
+		// Instantiate all flow player
+		flowplayer(".player-item", swflocation,
+			{
+				// configuration for a clip
+				clip: {
+					autoPlay: true,
+			    	autoBuffering: true,
+			    	scaling: 'fit'
+				},
+				// setup controlbar to use skins
+				plugins: {
+				  	controls: conf.skins.universcine
+				}
+			});
+	});
+}
 
 // Process document after its loading
 jQuery(document).ready(function() {
@@ -24,19 +42,5 @@
 		jq_this.blur(function() {if (jq_this.val() == '') jq_this.val(help);});
 	});
 
-	// Instantiate all flow player
-	flowplayer(".player-item", "flashes/flowplayer-3.1.3.swf",
-		{
-			// configuration for a clip
-			clip: {
-				autoPlay: true,
-		    	autoBuffering: true,
-		    	scaling: 'fit'
-			},
-			// setup controlbar to use skins
-			plugins: {
-			  	controls: conf.skins.universcine
-			}
-		});
 });