sverhagen / mp3-browser

This Joomla plugin will create a table of every MP3 in a specified folder. It displays the ID3 information of each track with a link to download or play the file in the browser
https://www.totaalsoftware.com/products/mp3-browser
GNU General Public License v2.0
5 stars 6 forks source link

MP3 Year / Date #78

Open samhnky opened 5 years ago

samhnky commented 5 years ago

Is anyone able to provide guidance on how to add the ID3 Year/Date tag? http://wheelersburgfaithbaptistchurch.com/connect/sermon-audio

I added the following code to the following file: content/mp3browser/html/HtmlNameColumn.php

   protected function getCellText($data, $isAlternate) {
        $html = $this->addItemAnchor($data);
        if ($data->getTitle()) {
            $title = $this->wrapAnchor($data, $data->getTitle());
            $html .= "<span style='font-size: .7em;'>Message Title:</span><strong>" . $title . "</strong>";
        }
        if ($data->getArtist()) {
            $artist = $this->wrapAnchor($data, $data->getArtist());
            $html .= "<br/><span style='font-size: .7em;'>Speaker:</span>" . $artist;
        }
         if ($data->getDate()) {
            $date = $this->wrapAnchor($data, $data->getDate());
            $html .= "<br/><span style='font-size: .7em;'>Date:</span>" . $date;
        }
        return $html;
    }

If I use $date I do not get an error, if I use Year I get an error,..