I just downloaded the latest svn files for bulk_uploader, sortable_dataobject and swfupload and tried to install them on a fresh build of SS 2.3.0-rc2 with no other modules added.
When doing a dev/build, below is the error I get:
--------------
Building Database
Creating database tables
PageComment
Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /Users/Amir/Sites/silverstripe/mysite/code/Resource.php on line 4
--------------
As before, I want to implement your module for the basic Page type, so below is my code for Page.php.
-----------------------
<?php
class Page extends SiteTree {
public static $db = array(
);
public static $has_one = array(
);
static $has_many = array (
'Resources' => 'Resource'
);
function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Files", new BulkUploaderField(
$this,
'Resources',
'PDF'
));
return $fields;
}
}
class Page_Controller extends ContentController {
public function init() {
parent::init();
// Note: you should use <% require %> tags inside your templates instead of putting Requirements calls here. However
// these are included so that our older themes still work
Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("form");
}
}
?>
-----------------------
and the following is the code for Resource.php
-----------------------
<?php
class Resource extends DataObject {
static $db = array (
'Name' => 'Text',
'Description' => 'Text'
);
static $has_one = array (
'Page' => 'Page',
'PDF' => 'File'
);
protected static $bulk_uploader_fields = array (
'Name' => 'TextField',
'Description' => 'TextField'
);
protected static $allowed_file_types = array (
'pdf'
);
}
?>
-----------------------
What's causing that error?
Could you possibly zip the latest stable version of bulk_uploader, sortable_dataobject and swfupload and provide them as links here?