Page 4 of 4 FirstFirst ... 234
Results 31 to 36 of 36
  1. #31
    Join Date
    Oct 2005
    Posts
    66
    Plugin Contributions
    0

    Default 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...products_id=37
    Attached Files Attached Files

  2. #32
    Join Date
    Oct 2005
    Posts
    66
    Plugin Contributions
    0

    Default 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="clsid27CDB6E-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...ld Preview.mp3 with the full filename. How do i get the filename to show up, whats the right bit of code to use?

    Thanks!

  3. #33
    Join Date
    Oct 2005
    Posts
    66
    Plugin Contributions
    0

    Default 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...products_id=25

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

    Change the text 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:

    Code:
    <?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!
    Attached Files Attached Files

  4. #34
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: MP3 Album Track list

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

  5. #35
    Join Date
    Oct 2005
    Posts
    66
    Plugin Contributions
    0

    Default Re: MP3 Album Track list

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

  6. #36
    Join Date
    Oct 2005
    Posts
    66
    Plugin Contributions
    0

    Default 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...:

    Code:
    <?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 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 www.subtractor.net :)
    Last edited by fran; 29 Jul 2009 at 04:56 AM.

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. v151 Linking mp3 clips to specific mp3 downloadables
    By Banjoguy in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 22 Aug 2014, 03:59 PM
  2. Multiple mp3 products listed on Album page
    By MDIWade in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 3 Jan 2012, 09:42 PM
  3. How to change a price of a single track of the album?
    By outline in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Jun 2010, 03:49 AM
  4. Music Album Track Listing - how do I get a bulleted list?
    By sibiya2000 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 7 May 2007, 01:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR