Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to link it without a popup?


floppy

Recommended Posts

Posted

I checked the contribution thread for osplayer but there is nothing that helped me, cause its a php/java/html llink problem i post it here.

The main thing that i want to work is that the player doesn't open in a popup window - it should always stay in right_column.php

 

So i added the player in the right_column.php :

<!-- osPlayer v2 Start --><?php echo '<object type="application/x-shockwave-flash" data="osc_player.swf?mp3id=' . $HTTP_GET_VARS['products_id'] .'&autoplay=' . ENTRY_OSCP_PLAY . '" width="193" height="265"><param name="scale" value="exactfit" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="movie" value="osc_player.swf?mp3id=' . $HTTP_GET_VARS['products_id'] . '&autoplay=' . ENTRY_OSCP_PLAY . '"/><a href=http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash  target="blank"><img src="images/icons/noflash.gif" width="88" height="31" vspace="5" hspace="50" alt="install flash player plugin"/></a></object>';?> 
<!-- osPlayer v2 End -->

The player in right_column.php loads the mp3s when i open a product (product_info.php)

But when i click the "play" (listen) button in the product list (product_listing.php) the player in the right_column.php dont load the mp3s.

I think i have to change a link but i dont know how the change has to look.

 

product_listing.php (here is the "play" (listen) intigrated)

/// osPlayer v2   start  
	case 'PRODUCT_LIST_MP3': 
		 $lc_align = 'center'; 
		if( (tep_not_null($product_mp3['folder']))  && (file_exists(DIR_FS_CATALOG_MP3 . $product_mp3['folder'])) && (is_dir(DIR_FS_CATALOG_MP3 . $product_mp3['folder']))) { 
	 $lc_text = '<a href="java script:popupWindow(\'' . 'popup_oscplayer.php?product_id=' . $listing['products_id'] . '\')">' . tep_image_button('play.jpg', IMAGE_BUTTON_MP3) . '</a>'; 
	   } else { 
	 $lc_text = '-'; 
	   } 
		break; 
/// NOTE :  " $lc_text = '-'; "  is what will be diplayed if there isn't a Mp3 preview for the product . U can change it to what u want   
/// osPlayer v2 end

 

There are also 2 other files that have some java/popup information, could be that there has to be some changes, too.

 

popup_oscplayer.php

<!--swf player file -->

<object type="application/x-shockwave-flash" data="osc_player.swf?mp3id=<?php echo $_GET['product_id'];?>&autoplay=<?php echo $_GET['autoplay'];?>"   
width="193" height="265">
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="movie" value="osc_player.swf?mp3id=<?php echo $_GET['product_id'];?>&autoplay=<?php echo $_GET['autoplay'];?>"/> 
<a href=http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash  target="blank"><img src="http://www.tutorials.de/forum/images/icons/noflash.gif" width="88" height="31" vspace="5" hspace="50" alt="install flash player plugin"/></a>
</object>

 

 

index.php

<!--  osPLayer Start //-->
<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=no,copyhistory=no,width=193,height=265,screenX=0,screenY=0,top=300,left=45
0')
}

//--></script>
<!--  osPlayer end //-->

 

I dont know how to link it correct, please give me a hint if you know the proper way to do it. :blush:

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...