Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » HasOneFileDataObjectManager CMS display

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 913 Views
  • micahsheets
    Avatar
    Community Member
    164 Posts

    HasOneFileDataObjectManager CMS display Link to this post

    Silverstripe 2.3.2 with most recent DOM that was built for 2.3.

    Three questions regarding FileDOM.

    1. Is there a HasOnlyOneFileDataObjectManager where there is only ever the possibility to have a single object instead of lots of objects with a radio button to select the current one? An interface that would have no paging or drag and drop etc but still have a nice uploader?

    2. Since I don't have ffmpeg ( I tried to get it installed but couldn't ), I have set up my FileDOM to manage my own Extension of the FLV class. My extension allows me to associate a pre-made thumbnail with my video. However I can see that the FLV class is still trying to create a thumbnail regardless. The thumbnail object shows up in the Files table. Actually when I upload a video it creates two files. An flv_thumb_0 and an flv_thumb_{whatever the ID of the video is}. However these two files don't actually exist in the thumbnails folder. How can I tell the FLV class to skip the thumbnail creation process alltogether?

    3. I have it set up to show a CMS thumbnail version of the custom thumbnail in the grid view of the FileDOM. This seems to cause the trash can icon to be partially hidden under the bar that has the allow drag and drop checkbox. Is there a way to make that bar be pushed down by whatever container is holding the icons etc for the videos?

  • UncleCheese
    Avatar
    4085 Posts

    Re: HasOneFileDataObjectManager CMS display Link to this post

    Hi, Micah. Good to hear from you.

    1) You can use a FileIFrame field, or for a nicer interface, stay tuned for the Uploadify module, which I'll be releasing very soon.

    2) The FLV features were predicated upon having FFMPEG, so I can't really support using those features in its absence, but I'd probably start by updating the onBeforeWrite() method in FLV.php:

          if(!$this->getThumbnail())
           $this->createThumbnail();

    becomes:

          if(self::has_ffmpeg() && !$this->getThumbnail())
           $this->createThumbnail();

    3) Not sure.. I know CMSThumbnail brings in a lot of markup with it, so I usually use a custom getter for that.

    public function getDOMThumb() {
    return $this->SomeImage()->CroppedImage(50,50);
    }

  • micahsheets
    Avatar
    Community Member
    164 Posts

    Re: HasOneFileDataObjectManager CMS display Link to this post

    Thanks for this info. You always are on top of your game. I look forward to the Uploadify module.

    Im back from Basic Training and am off to Tech School in a week. So you probably won't hear from me again for a couple of months.

  • micahsheets
    Avatar
    Community Member
    164 Posts

    Re: HasOneFileDataObjectManager CMS display Link to this post

    I was able to get the Thumbnails show up in the DOM but I had to make them so small. If I had control over the Layout and CSS of the DOM I would probably change the markup so that that lower bar would be pushed down by whatever was above it. It doesn't matter if I use CMSThumbnail or Cropped image because all I am doing is passing in the source path of the image so no markup is brought in it is just that the default image happens to be really small so it always works. I always hate to go messing about with your core but in this case since it is the old version of DOM and SS it probably doesn't matter. However on another site I am using the newest versions of everything and this is still an issue. Maybe if you run into needing bigger thumbnails yourself you might look into updating it.

    Thanks as always for your hard work and help.

    913 Views
Page: 1
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.