Denis
Denis
Offline
0
OK - wiped the whole Joomla installation and started again!

What is the simplest way to upload songs from the frontend?

The problem with the song upload form
/index.php?option=com_muscol&view=song&layout=form

is that although I can upload a song (and it correctly associates it with the One Artist and One Genre) I can see no way of associating the upload with an album.

The Result - file uploads but is not available in any album.

All I wish to achieve is to allow a site administrator to upload MP3s into the One Artist, One Genre and One Album.

Adding the usual Title, Lyrics etc.
Responses (4)
  • Accepted Answer

    Monday, March 22 2010, 10:37 AM - #Permalink
    0
    you should use this view, actually

    songs should be added inside the album form (there's a songs tab), not individualy...

    for now, that's the way it is. maybe we can improve that on the future

    Germi
    The reply is currently minimized Show
  • Accepted Answer

    Denis
    Denis
    Offline
    Monday, March 22 2010, 07:10 PM - #Permalink
    0
    Pity - Surely all that is needed is to add a pull down to select the album? (or even better it is already selected like the Artist and Genre already is)

    The problem with the Album view is that it invites the user to add a new album everytime they want to add a new track.

    I have a sort of workaround whic is to show the album view pre-populated using the id for the album e.g:

    /muscol?id=2&layout=form&view=album

    Is there a workaround that would show the view for this album but hide the first Tab Entitled ALBUM DETAILS (so we can just view the SONGS and PART OF A SET tabs for this album with the add new songs button.

    It seems we are so close to the solution?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, March 23 2010, 03:57 PM - #Permalink
    0
    well, you can surely do that very easily, BUT consider that if you are logged in as a different user thatn the creator of the album (try it!), you will be KICKED OUT and it ont let you "edit" that album. its a security think to prevent users to modify other user's data. so I think this wont be ok for you

    here's a better solution for what you're looking for: you can use the song form, but automaticaly assign it to this "pre-setted" album id (id=2), hidded on the song form

    that's the way you do it:

    open /components/com_muscol/views/tmpl/form.php and go to the end of the file

    you'll see the hidded field that related that song to its album (the first hidden input, "album_id"). well, on its valu attribute, you find this:

    echo $this->song->album_id;

    all you need to do is replace it with:

    echo $this->song->album_id ? $this->song->album_id : 2;

    (this piece of code makes the album_id be 2 when its 0, that is, when accecing the song form directly, wich is what you did at the beginning

    and that's it! :) does it help?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, March 23 2010, 08:13 PM - #Permalink
    0
    no problem

    yes, this is on the list to be added on a future version

    take care my friend :)

    Germi
    The reply is currently minimized Show
Your Reply