UncleCheese, is the audio and video component for DOM ready to be used in a production environment?
150 Posts 24920 Views
I have one, going on two clients using it in production. I also know of one other user in the forum who is about to launch a site using it. So, it's by no means out of Beta, but it certainly has shown that it will hold up. Just be attentive and aware that it's not an iron-clad codebase yet, and be sure to do plenty of testing before you launch. Everyone's server is different.
These new features awesome! I'm wanting to get the mp3 streamer (identical to the demo in the video) up running, but I just can't seem to get anything substantial happening at all!
Operating from http://doc.silverstripe.com/doku.php?id=modules:dataobjectmanager#introduction the first tutorial code (Testimonials) works fine for me, but the second bunch (Resource) have a syntax error, and eve once that's fixed the furthest it gets is a dbuild, then in the CMS on page creation it fails (you then have to delete the created .php files and rebuild db to get rid of the page.
My first question is: Is the version of DOM that comes down from the main site up to date enough to stream mp3's as the demo shows? or is it all still in SVN?
2nd: Would anyone be able to write a tutorial on how to get the mp3 streaming up and running? A major problem I've found with SS is almost every tutorial is written in such a way that they leave out basics steps, and you need to know what you're doing for them to be useful.... I'm unfortunately not a coder but I'm doing my best to learn more and more, and I just need a bit more depth to fill the gaps.
ps: I've got SS 2.3.1, SWFUpload and DOM all installed etc, it's the code elements I struggle with.
DOM looks really great, can't wait to get it running :D
The ZIP file download is pretty outdated. Use the SVN channel to get the most recent stuff. I'm positive the Autdio/Video features are not in the download.
Here's a quick example of how to do an MP3 page. (Pardon any haphazard syntax errors)..
class AudioPage extends Page
static $has_many = array ('AudioFiles' => 'AudioFile');
public function getCMSFields()
$f = parent::getCMSFields();
$f->addFieldToTab("Root.Content.Audio", new FileDataObjectManager(
array('Name' => 'Name', 'Description' => 'Description),
class AudioPage_Controller extends Page_Controller
class AudioFile extends DataObject
static $db = array (
'Name' => 'Varchar(100)',
'Description' => 'Text'
static $has_one = array(
'AudioPage' => 'AudioPage',
'MP3' => 'MP3'
<% control AudioFiles %>
<% end_control %>
Now we'll enable drag-and-drop sorting of our audio files, just for fun.
Let me know how that goes for ya.
Thanks UC - The quality of that reply (and speed) was awesome :D
Grabbed everything for DMO from the SVN links you posted, made the pages (missing a ' in 'Description) in AudioPage.php ;) just incase anyone copy/pastes and can't find it) - run the db/build and created an AudioPage in the CMS, but it displays this error:
Fatal error: Class 'FileDataObjectManager' not found in /var/www/mysite/code/AudioPage.php on line 9
2nd issue is the drag and drop sorting, when that line is in mysite/_config.php the db won't build (I'll grab exact error in a little while)
Dude, that's one messed up error. Did you delete FileDataObjectManager.php?!
Are you running db/build, or /dev/build? The latter is correct. Either, way, that's pretty messed up.
Ok, sorted that out.... for some reason a bunch of files didn't copy in :S but that's fixed now.
using /dev/build now too :)
Now when I create Audio Page in the CMS I get the standard popup box with "There has been an error" (this is usually where I get stuck as it's completely indescriptive)