Overview
The Jamroom Media File Slurper (slurp.php) is a script that will allow your users to grab a media file from a remote server by entering the URL to the media file. The File will be placed in the Artists "uploads" directory, and can then be imported into their Control Panel.
Configuration
Configuring the Jamroom Audio File Slurp script is easy - just make sure you have the “Allow Imports” setting set to “yes” in the Jamroom Quota(s) that you would like to enable this feature for. When the slurp.php script “grabs” a file from the web, it will drop it in the jamroom/uploads/(band_id) directory. This means that the file, after slurping, will then become available to be “imported” as a new media item
Creating the Jamroom Custom Button
To allow your users to access the slurp script, simply create a Jamroom Custom Button with the following:
-
Button Label - “slurp a file” (or whatever you would like it to say in the Artist Menu.
-
Button URL - enter: slurp.php?mode=menu
-
Button Quota - select the quota(s) you would like this Custom Button to be available for.
-
Hide Button - leave unchecked or the button will not be visible.
That’s it - save your new Custom Button and the “slurp” function will be available from the Artist Menu.
Usage
Now that you have the new “Slurp” button available from the Artist Menu, using it is easy. When you click on the new “slurp a file” button, you will be presented with a small form that allows you to define the:
-
Audio File Name - this will be the local file name that will be written in the artists jamroom/uploads directory.
-
Audio File URL - this is the URL to the audio file.
After entering correct values for both forms, press submit. The slurp script will now attempt to “grab” the remote file and copy it in to the Artist’s uploads directory. Once successful the new audio file will be made available in the drop-down list of files that can be imported from the Create and Modify Song screens.
That’s all there is to it - happy slurping!
|