Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Preview: DataObjectManager module

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
Go to End
Author Topic: 61497 Views
  • NickJacobs
    Avatar
    Community Member
    144 Posts

    Re: Preview: DataObjectManager module Link to this post

    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!

  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: DataObjectManager module Link to this post

    @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.

  • drye
    Avatar
    Community Member
    49 Posts

    Re: Preview: DataObjectManager module Link to this post

    @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!

  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: DataObjectManager module Link to this post

    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.

  • drye
    Avatar
    Community Member
    49 Posts

    Re: Preview: DataObjectManager module Link to this post

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

  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: DataObjectManager module Link to this post

    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!

  • wasser
    Avatar
    Community Member
    1 Post

    Re: Preview: DataObjectManager module Link to this post

    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

  • Howard
    Avatar
    Community Member
    215 Posts

    Re: Preview: DataObjectManager module Link to this post

    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

    61497 Views
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.