Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Customizing Media Manager - Track order and formatting

Customizing Media Manager - Track order and formatting

Locked

Views: 1,550

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
26 Mar 2007, 9:58 AM
#1
vera avatar

vera

New Zenner

Join Date:
Dec 2005
Location:
Wylie, Texas
Posts:
77
Plugin Contributions:
0

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/DustinCrockerStore/index.php?main_page=product_music_info&cPath=2&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!

26 Mar 2007, 7:15 PM
#2
vera avatar

vera

New Zenner

Join Date:
Dec 2005
Location:
Wylie, Texas
Posts:
77
Plugin Contributions:
0

Re: Customizing Media Manager - Track order and formatting

I hate to bump but can anyone help me?

5 Jun 2007, 12:57 AM
#3
vera avatar

vera

New Zenner

Join Date:
Dec 2005
Location:
Wylie, Texas
Posts:
77
Plugin Contributions:
0

Re: Customizing Media Manager - Track order and formatting

vera:

(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 echo '<span class="mediaClipFilename"> add this line:```php
$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
5 Jun 2007, 2:26 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Customizing Media Manager - Track order and formatting

vera:

(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 uploadedSomething 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:```
} else {
$zv_clips_query = "select * from " . TABLE_MEDIA_CLIPS . "
where media_id = '" . (int)$zq_media_manager->fields['media_id'] . "'";

} else {
  $zv_clips_query = "select * from " . TABLE_MEDIA_CLIPS . "
                     where media_id = '" . (int)$zq_media_manager->fields['media_id'] . "'[B] ORDER BY date_added [/B]";
5 Jun 2007, 4:46 AM
#5
vera avatar

vera

New Zenner

Join Date:
Dec 2005
Location:
Wylie, Texas
Posts:
77
Plugin Contributions:
0

Re: Customizing Media Manager - Track order and formatting

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