Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2005
    Location
    Wylie, Texas
    Posts
    77
    Plugin Contributions
    0

    help question Customizing Media Manager - Track order and formatting

    I tried to customize the media manager to make it a little more presentable but I still have a few problems (surprised there isn't a mod for this thing yet):

    Here's the link: http://www.dustincrockerband.com/Dus...&products_id=6
    (the songs are under the blue Prev/Next box)

    (1) I uploaded the songs in the order they appear on the cd (track 1 first, track 2 second, etc.) but it arranged them in a very strange way. Not even in alphabetical order. I'm guessing file size or something ridiculous like that. So, I would like to arrange them in the order uploaded, or maybe customize that somehow (enter order number next to each track name?)

    (2) Is there a way to remove the .mp3 part? Or is it possible to type in your own track name instead of letting Media Manager use the filename as track name?

    Thanks in advance!

  2. #2
    Join Date
    Dec 2005
    Location
    Wylie, Texas
    Posts
    77
    Plugin Contributions
    0

    Default Re: Customizing Media Manager - Track order and formatting

    I hate to bump but can anyone help me?

  3. #3
    Join Date
    Dec 2005
    Location
    Wylie, Texas
    Posts
    77
    Plugin Contributions
    0

    Default Re: Customizing Media Manager - Track order and formatting

    Quote Originally Posted by vera View Post
    (2) Is there a way to remove the .mp3 part? Or is it possible to type in your own track name instead of letting Media Manager use the filename as track name?
    I figured this part out but still have a problem with the other part. Here's the solution for this one though:

    In tpl_modules_media_manager.php (in includes\templates\dc_template\templates\), where it talks about za_clip somewhere at the bottom (don't know the exact line number because I messed with the file) right before
    PHP Code:
    echo '<span class="mediaClipFilename"> 
    add this line:
    PHP Code:
     $za_clip['clip_filename'] = preg_replace('/.mp3/'''$za_clip['clip_filename']); 
    ...and it will get rid of the .mp3 extension for every song. I like answering my own questions...lol

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Customizing Media Manager - Track order and formatting

    Quote Originally Posted by vera View Post
    (1) I uploaded the songs in the order they appear on the cd (track 1 first, track 2 second, etc.) but it arranged them in a very strange way. Not even in alphabetical order. I'm guessing file size or something ridiculous like that. So, I would like to arrange them in the order uploaded
    Something like this might work to make them appear in the order in which they were uploaded:

    /includes/modules/YOURTEMPLATE/media_manager.php
    around line 27 you have:
    Code:
        } else {
          $zv_clips_query = "select * from " . TABLE_MEDIA_CLIPS . "
                             where media_id = '" . (int)$zq_media_manager->fields['media_id'] . "'";
    add the sort on date like this:
    Code:
        } else {
          $zv_clips_query = "select * from " . TABLE_MEDIA_CLIPS . "
                             where media_id = '" . (int)$zq_media_manager->fields['media_id'] . "' ORDER BY date_added ";
    or instead of date_added, you could choose clip_filename and then name all the files starting with the number of the order in which you want them to appear (basically, making it alphabetical on filename).
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Dec 2005
    Location
    Wylie, Texas
    Posts
    77
    Plugin Contributions
    0

    Default Re: Customizing Media Manager - Track order and formatting

    It worked! I can't believe the solution was so easy! Thank you so much!

 

 

Similar Threads

  1. Unable to upload media using media manager
    By ThomasT in forum Basic Configuration
    Replies: 17
    Last Post: 5 Aug 2010, 08:04 PM
  2. Replies: 0
    Last Post: 13 Mar 2009, 10:00 PM
  3. Changing sort order of media clips in media manager
    By Lovere in forum General Questions
    Replies: 2
    Last Post: 12 Jul 2006, 08:04 PM

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