Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Preview: DataObjectManager module


Go to End
Reply


379 Posts   62702 Views

Avatar
NickJacobs

Community Member, 144 Posts

8 March 2009 at 12:34am

Just wanted to say thanks for all the work on this module.... I found it just in time to use in a couple of current projects and it has really made the difference between an average backend workaround (read hack!) and a system that really adds value to a clients website. Thanks to UncleCheese & everyone else!

Avatar
UncleCheese

Forum Moderator, 4094 Posts

8 March 2009 at 3:15am

@Tsunami - Thanks so much for the feedback. I'm putting together a list of testimonials about the DataObjectManager and ImageGallery. I'd like to use that if you don't mind.

@howard -

1: How would I go about getting an email sent whenever a new dataobject is added? ie, if they add an document to a page it sends me an email letting me know.

==> This is a little tricky. You have to use the onBeforeWrite() hook in the DataObject class.

class MyObject extends DataObject
{
function onBeforeWrite()
{
if(!$this->ID) {
// Do email notification
}
parent::onBeforeWrite();
}
}

2: Is there a way to have the date set in the popup automatically to 'Todays' date so we can order additions by date added?

==> Nice catch on this one. The DataObjectManager popup is designed to sniff out CalendarDateFields and substitute them with DatePickerField (jQuery based). In that process, it was only feeding the name and title to the DatePickerField. I've added Value to that, as well. Also, I've updated DatePickerField to default to today's date, and it is now a readonly field.

3: I have a FileDataObjectManager and a DataObjectManager on the same pagetype on different tabs, how can I set different things for the manager of each ie: $manager->setPluralTitle('Documents'); for one and $manager->setPluralTitle('Comment'); for the other?

==> Provided each DataObjectManager is stored in different variables, this should not be a problem.

$manager1 = new DataObjectManager(....);
$manager1->setPluralTitle('foo');

$manager2 = new DataObjectManager(...);
$manager2->setPluralTitle('bar');

They should be self-contained objects. Let me know if that's not working for you.

Avatar
drye

Community Member, 49 Posts

8 March 2009 at 6:55am

Edited: 08/03/2009 7:23am

@UncleCheese I have to say again NICE WORK. I am using the ImageDataObjectManager and it doesn't seem to have the drag reorder option enabled. Am I missing something simple? At first I thought I needed your other extension SortableDataObject, but then I saw this quote from you: "Also, SortableDataObject is obsolete since it has been merged into the DataObjectManager extension." Please let me know if I am missing something, or if there is a reason that the ImageDataObjectManager can't do the drag and drop sorting.

EDIT: Never mind... After watching a little more closely your youTube video steered me in the right direction. THANKS! In the _config.php of the dataobject_manager I had to add:SortableDataObject::add_sortable_class('ImageShowItem'); I suppose I could also put them in the mysite/_config.php

Thanks again!

Avatar
UncleCheese

Forum Moderator, 4094 Posts

8 March 2009 at 7:25am

Edited: 08/03/2009 7:26am

You are missing something. Lucky for you, I just put the docs up.

http://doc.silverstripe.com/doku.php?id=modules:dataobjectmanager#activate_drag-and-drop_sorting

Edit: Looks like you got it. Yes, it is probably more appropriate to put that in mysite/_config.php.

Avatar
drye

Community Member, 49 Posts

8 March 2009 at 7:39am

With the added documentation, I have to say that the DataObjectManager Module is the most useful extension to date. UncleCheese has out done himself.

Avatar
UncleCheese

Forum Moderator, 4094 Posts

8 March 2009 at 8:12am

Edited: 08/03/2009 8:13am

Wow! Thanks for the accolades, guys. I can't wait to give this feedback to the higher-ups.

In other news... OMFG!!! NEW STUFF!!!!

Relation DataObjectManagers

- HasOneDataObjectManager
- HasManyDataObjectManager
- ManyManyDataObjectManager

All checked in, but lightly tested.

- HasOneFileDataObjectManager (coming soon)
- HasManyFileDataObjectManager (coming soon)
- ManyMayFileDataObjectManager (coming soon)

SimpleHTMLEditorField

Allows HTML editing in your popup window! Documentation here:
http://doc.silverstripe.com/doku.php?id=simplehtmleditorfield

Dok-you-men-tay-shun

Finally posted at:
http://doc.silverstripe.com/doku.php?id=modules:dataobjectmanager

ZIP file

Coming soon!

Avatar
wasser

Community Member, 1 Post

8 March 2009 at 8:50pm

Edited: 08/03/2009 8:56pm

UncleCheese, as other's have already mentioned: Fantastic work!! I am successfully using this module.

I have a, perhaps silly, question. Any chance making this work w/ ModelAdmin, in particular the re-ordering aspect?

Thanks

Avatar
Howard

Community Member, 215 Posts

8 March 2009 at 10:03pm

The great work just keeps coming! Thanks for the new calendar function, will text it when the below error is sorted :)

I might have a bug here, either in your code or mine but it seems to sometimes happen and sometimes not... oh I'm running latest svn. I get the error:

[Notice] Object of class Text to string conversion
GET /admin/

Line 514 in /var/www/vhosts/skrig.co.nz/httpdocs/dataobject_manager/code/FileDataObjectManager.php

If i comment out sections of my PlanningPage.php file i can get the site to load but it doesn't seem to be consistently the same line of code which makes me wonder if there is something else going on. I have pastied the details of the error and my relevant code here: http://pastie.org/410765

Thanks
Howard

Go to Top