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.
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
-
Accepted Answer
0Pity - 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? -
Accepted Answer
0well, 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?
-
Accepted Answer
Your Reply

Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »