MP3 Album Track list

Locked

Started by ontherun on 2 Nov 2006, 9:02 PM · Views: 20,475

Results 21 to 36 of 36
This thread is locked. New replies are disabled.
24 May 2007, 10:47 PM
#21
bettysue avatar

bettysue

Inactive

Join Date:
May 2004
Posts:
747
Plugin Contributions:
0

MP3 Album Track list

swortis:

Hi Betty,

I was referring to genabit's mod, which, yes, appears to be what you're using. The mod adds the extra field to the regular Products Info display, and I've been trying to get it to work with the Music Products Info display (but alas so far to no avail..)

Cheers,
SWW

Hi swortis,

Yes, that's the mod I'm referring to as genabit is my fiance. I haven't actually looked at his mod package as he installs me for it where I need it, but he usually does install it for the Product Music Type for me. I know the template modification I made for him for it was in that template.

He's on the road but subscribed to this thread I think, so once he stops at a truck stopwhere he can get internet access he will probably post and hopefully help you out.

betty

25 May 2007, 1:11 PM
#22
swortis avatar

swortis

New Zenner

Join Date:
Mar 2007
Location:
Cambridge, MA
Posts:
59
Plugin Contributions:
0

Re: MP3 Album Track list

Actually I retracked my steps. One single typo had done me in, but now it's working.

This is an excellent mod as it's a fine blueprint for adding extra fields in general to product listings.

In the case of Mp3s, and specifically the Wimpy player (which can play tracks from a SQL server and has ecommerce functionality, seems like it'll take more tweaking to seemlessly really work it into Zen-Cart but I'm optimistic.

(Although it'd be nice to have a completely open-source solution to the problem).

(Note: As of 2007 I've moved all my ecommerce development to Drupal/Ubercart.)

25 May 2007, 5:34 PM
#23
bettysue avatar

bettysue

Inactive

Join Date:
May 2004
Posts:
747
Plugin Contributions:
0

Re: MP3 Album Track list

glad to hear you got it working and all is well!

betty

15 Jul 2008, 6:37 PM
#24
fran avatar

fran

New Zenner

Join Date:
Oct 2005
Posts:
67
Plugin Contributions:
0

Re: MP3 Album Track list

Hi, this is a great mod for music shops, thanks to bettsue and genabit for this!

I'd like to expand on it a bit though and have the little Wimpy "play" button on the product listing pages so people can listen without clicking into the actual product itself, just makes browsing music much faster... like Beatport.com

How would you change the code so that the play button appeared next to titles in the product listing display?

Thanks!

16 Jul 2008, 3:44 AM
#25
fran avatar

fran

New Zenner

Join Date:
Oct 2005
Posts:
67
Plugin Contributions:
0

Re: MP3 Album Track list

I think im having problems with the player on each product page, the wimpy player is playing all the files in the previews folder where the wimpy.swf file is and all the mp3 song previews are.
Are we supposed to be making folders for separate artists and putting the wimpy files in each artist folder, then link to the artist folder or is there a way to get wimpy to play the file/files which are specific to each product as in the mp3 preview attributes that are assigned to the specific product?

I also still see "product description" written beside the box that is now supposed to be called "mp3 code", did i miss something?

16 Jul 2008, 6:00 PM
#26
fran avatar

fran

New Zenner

Join Date:
Oct 2005
Posts:
67
Plugin Contributions:
0

Re: MP3 Album Track list

Actually a potential problem with this mod might arise if you want to do a site wide change of the mp3 player code across all product descriptions where the code is stored. So the way it is now you have multiple copies of the same code with just a different mp3 filename.
Im not much of a PHP guru but would it be beneficial to have the wimpy code in 1 php file with the file name part of the code setup as a variable which gets inserted with the file that is setup in zencart as the preview file?
So you could use code something like this in the product description:

require('wimpy_player.php' . '/' . $filename=song.mp3);

Im not even sure how to write it properly but im sure if someone that knows PHP like genobit, they would be able to find a way to do it...?

On my previews in a product info page, zencart generates the filename:

http://sonictrip.net/store/media/U%20Think%20U%20Know%20Preview.mp3

So, that could be the variable $filename which gets picked up depending which product you are on.

Then, if site wide changes need to be made like different skin or shape and size of the player, you would just need to change 1 php file instead of loads of product descriptions...

There's a version of Wimpy Player which uses javascript in a similar way to what im trying to describe above but i couldnt manage to even get the player loading up. It stores all the wimpy info in a file called wimpy.js and you use code like this in your product decriptions:

<script language="JavaScript" > makeWimpyPlayer("somefile.mp3"); </script>
16 Jul 2008, 6:05 PM
#27
fran avatar

fran

New Zenner

Join Date:
Oct 2005
Posts:
67
Plugin Contributions:
0

Re: MP3 Album Track list

fran:

I think im having problems with the player on each product page, the wimpy player is playing all the files in the previews folder where the wimpy.swf file is and all the mp3 song previews are.
Are we supposed to be making folders for separate artists and putting the wimpy files in each artist folder, then link to the artist folder or is there a way to get wimpy to play the file/files which are specific to each product as in the mp3 preview attributes that are assigned to the specific product?

I also still see "product description" written beside the box that is now supposed to be called "mp3 code", did i miss something?

The following code works to overcome this problem and play an individual mp3 instead of a whole folder, works on v5 of Wimpy player:

<object id="wimpy2853" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,47,0" height="115" width="340" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"> <param value="always" name="allowScriptAccess" /> <param value="http://www.your-url.net/store/media/wimpy.swf" name="movie" /><param value="false" name="loop" /> <param value="false" name="menu" /><param value="high" name="quality" /><param value="noscale" name="scale" /> <param value="lt" name="salign" /><param value="000000" name="bgcolor" /> <param value="wimpyApp=http://www.your-url.net/store/media/wimpy.php&bufferAudio=1&startPlayingOnload=yes&voteScript= http://www.your-url.net/store/media/votescript.php&trackPlays=http://www.your-url.net/store/media/trackscript.php&playlist=http://www.your-url.net/store/media/filename.mp3" name="flashvars" /> <param value="transparent" name="wmode" /> </object>
23 Apr 2009, 5:52 AM
#29
koesbong avatar

koesbong

New Zenner

Join Date:
Feb 2009
Posts:
30
Plugin Contributions:
0

Re: MP3 Album Track list

bump. anyone can help with the link?

1 May 2009, 11:16 PM
#30
jrdark13 avatar

jrdark13

New Zenner

Join Date:
Apr 2009
Posts:
2
Plugin Contributions:
0

Re: MP3 Album Track list

Anyone have this mod so they can pass it on? thanx.

28 Jun 2009, 8:32 PM
#31
fran avatar

fran

New Zenner

Join Date:
Oct 2005
Posts:
67
Plugin Contributions:
0

Re: MP3 Album Track list

This mp3_flv_mod.zip is attached.

We still need a solution to put "Play" buttons beside the product names on the product listing page to make it quicker and easier to preview music without having to click into the product all the time.
I almost have a solution but i need to find out what bit of code to use for the media preview button that comes up on the bottom of the product info page under "Preview". Whats the variable to use??? I need the bit of code that generates the url: http://sonictrip.net/media/Ruff World Preview.mp3

Here's a page with what im talking about:
http://sonictrip.net/store/index.php?main_page=product_music_info&cPath=2&products_id=37

28 Jun 2009, 8:43 PM
#32
fran avatar

fran

New Zenner

Join Date:
Oct 2005
Posts:
67
Plugin Contributions:
0

Re: MP3 Album Track list

Im trying to modify the product_listing.php code to incorporate a Play button by editing around line 115 with the following code:

case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<div id="mp3"><object style="WIDTH: 32px; HEIGHT: 30px" id="wimpy_button_35319" name="wimpy_button_35319" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,47,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="32" height="30"><param name="movie" value="http://www.subtractor.net/media/wimpy_button.swf?theFile='** . zen_href_link(DIR_WS_MEDIA . $za_clip['clip_filename'], '', 'NONSSL', false, true, true) . **'&wimpyReg=&autoplay=no&loopMe=no" /><param name="quality" value="high" /><param name="bgcolor" value="#6A7A95" /></object><!-- End Wimpy Button Code --></div><br />';
$lc_align = 'right';
$lc_text = $lc_price;

The bit above in bold will only seem to output http://www.sonictrip.net/store/media instead of http://www.sonictrip.net/store/media/RuffWorldPreview.mp3 with the full filename. How do i get the filename to show up, whats the right bit of code to use?

Thanks!

4 Jul 2009, 7:07 PM
#33
fran avatar

fran

New Zenner

Join Date:
Oct 2005
Posts:
67
Plugin Contributions:
0

Re: MP3 Album Track list

I managed to change the code in includes/template/template_default/templates/tpl_modules_media_manager.php to incorporate a Flash music player button there instead of an image file. The flash button is just like an MP3 player, it streams the MP3 file and has play, pause and back to beginning functionality, its the Wimpy Play Button.

See it in action here: http://sonictrip.net/store/index.php?main_page=product_music_info&cPath=2&products_id=25

So now theres no need for you to hard code a player into the description of a product!

Change the text https://www.yourwebsite.net in the code below and upload the wimpy button to your store/media folder

Here's the code i used for the tpl_modules_media_manager.php file:

<?php
/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_media_manager.php 3251 2006-03-23 23:04:57Z wilt $
 */
/**
 * require module to aggregate media clips to an array
 */
  require(DIR_WS_MODULES . zen_get_module_directory('media_manager.php'));
  if ($zv_product_has_media) {
?>


<h2 id="mediaManagerHeading"><?php echo TEXT_PRODUCT_COLLECTIONS; ?></h2>

<?php
  while (list($za_media_key, $za_media) = each($za_media_manager)) {
?>
<div class="rowWrapper">
      <table class="back" cellpadding="2" valign="middle"><tr><td><?php echo $za_media['text']; ?>
<?php
    $zv_counter1 = 0;
    while(list($za_clip_key, $za_clip) = each($za_media_manager[$za_media_key]['clips'])) {
?></td><td valign="middle"><object style="WIDTH: 32px; HEIGHT: 30px" id="wimpy_button_35319" name="wimpy_button_35319" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,47,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="32" height="30"><param name="movie" value="http://www.yourwebsite.net/media/wimpy_button.swf?theFile=<?php echo zen_href_link(DIR_WS_MEDIA  . $za_clip['clip_filename'], '', 'NONSSL', false, true, true); ?>&wimpyReg=&autoplay=no&loopMe=no" /><param name="quality" value="high" /><param name="bgcolor" value="#747474" /></object>
      </td></tr></table>

<?php
    }
?>
    </div>
<?php
  }
  }
?>

Now, how do i use the code above on the product_listing.php page, anyone? It doesnt seem to work the same way coz its html inside php and im not sure how to reformat the code to work on the product_listing page but if anyone has any ideas, please post it here!

5 Jul 2009, 5:50 AM
#34
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: MP3 Album Track list

There is a problem with your wimpy button zip attachment...

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

5 Jul 2009, 7:25 PM
#35
fran avatar

fran

New Zenner

Join Date:
Oct 2005
Posts:
67
Plugin Contributions:
0

Re: MP3 Album Track list

It's a WinRAR file renamed to zip extension, dont rename, just use WinRar to open it...

29 Jul 2009, 3:52 AM
#36
fran avatar

fran

New Zenner

Join Date:
Oct 2005
Posts:
67
Plugin Contributions:
0

Re: MP3 Album Track list

Updated code for tpl_modules_media_manager.php file, backup your original file and replace it with the following code which has the EMBED tags between the OBJECT tag which lets the button work in Firefox whereas the last bit of code only worked in IE, much better...:

<?php
/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_media_manager.php 3251 2009-07-29 23:04:57Z wilt $
 * @modified to use flash preview button for single mp3 preview by fran @ www.digitaldomain.ie
 */
/**
 * require module to aggregate media clips to an array
 */
  require(DIR_WS_MODULES . zen_get_module_directory('media_manager.php'));
  if ($zv_product_has_media) {
?>


<h2 id="mediaManagerHeading"><?php echo TEXT_PRODUCT_COLLECTIONS; ?></h2>

<?php
  while (list($za_media_key, $za_media) = each($za_media_manager)) {
?>
<div class="rowWrapper">
      <table class="back" cellpadding="2" valign="middle"><tr><td><?php echo $za_media['text']; ?>
<?php
    $zv_counter1 = 0;
    while(list($za_clip_key, $za_clip) = each($za_media_manager[$za_media_key]['clips'])) {
?></td><td valign="middle"><object style="WIDTH: 32px; HEIGHT: 30px" id="wimpy_button_35319" name="wimpy_button_35319" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,47,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="32" height="30"><param name="movie" value="http://www.yourwebsite.net/zencart/media/wimpy_button.swf?theFile=<?php echo zen_href_link(DIR_WS_MEDIA  . $za_clip['clip_filename'], '', 'NONSSL', false, true, true); ?>&wimpyReg=&autoplay=yes&loopMe=no" /><param name="quality" value="high" /><param name="bgcolor" value="#333333" /><embed src="http://www.yourwebsite.net/zencart/media/wimpy_button.swf?theFile=<?php echo zen_href_link(DIR_WS_MEDIA  . $za_clip['clip_filename'], '', 'NONSSL', false, true, true); ?>&wimpyReg=&autoplay=yes&loopMe=no" quality="high" bgcolor="#333333" width="32" height="30" name="Preview" align="middle" menu="false" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed></object>
      </td></tr></table>

<?php
    }
?>
    </div>
<?php
  }
  }
?>

Change https://www.yourwebsite.net with your own domain name, change autoplay=yes&loopMe=no to whatever you want and change #333333 with the background colour of your site. Each change is both inside the EMBED tag and inside the OBJECT tag, so thats 2 different places that need to be changed for each of those settings...

An example of the preview button can be seen at https://www.subtractor.net :)