Content Manager Questions

Hi guys,
I am trying to modify the Content Manager to show,

  • Thumbnail of the media items in library
  • Dimensions of the media items in library

I am able to get the thumbnail of the media items but still missing thumbnails for Video and Flash files.
I am able to get the dimensions of the images and Flash files but still missing the dimensions of the video files.

Is there any chance to get the missing dimensions and thumbnails?
And also,
is it possible to save the dimension info of the files into the database which will ease the loading process?


  • daniel

I’d encourage you to look at doing this in the 1.8 codebase (if you aren’t already).

There is a base method on ModuleWidget which each module can extend called determineDuration. At present this takes a filename (the media file name) and returns the duration of the file according to getId3.

This could be enhanced and indeed renamed to getFileMetaData and take the media object which is being worked on. It could then set the duration and the dimensions on that object and return it for further processing by whatever called it.

You’d need to add width & height fields to the media table and then hook those into both \Xibo\Entity\Media and \Xibo\Factory\MediaFactory so that they were known and available. You’d also need to find where determineDuration is currently called and make adjustments accordingly. The new fields would need adding to install/structure.sql for installation and as an upgrade step.

I think the width/height would be useful to show (perhaps as a hidden by default column) on the library page.

Thumbnails for video and flash files are much more difficult because it would involve extracting a thumb from the file and saving it somehow. There isn’t a provision for this at the moment and I am not clear how that would be achieved - any file you saved would need protecting from the library tidy routine which removes orphaned files (it may be as simple as adding a tn_ prefixed file) - but the it would also need a way for the library page to request a thumbnail from those widgets.

I hope this points you in the right direction at least - if you fork xibo-cms in github and upload your branch I can code review.

1 Like

Thanks Dan! :slight_smile:
I haven’t installed 1.8 yet but i will once it is official because i currently have a small production server where i run 1.7

the information of the media is very important, specially,

  • Width & Height
  • Dimensions
  • Size
  • Thumbnail
    The listed information tells pretty much about the media which eases up the using.

I will wait until 1.8 becomes official and try to see if i can manage to show these information.
Any ideas when 1.8 will be official?


Probably a good few months yet - we will have a release candidate first (1.8.0-rc1) and then depending on how stable that turns out to be, either a rc2 or a stable release.

You can do 1.8 development on pretty much any machine you like now - just fork the repository and then vagrant up.

Great :slight_smile:
Thanks a lot!
I think i will try to test the current 1.8 release which i have not yet tested first before starting to modify it.

Best regards

  • daniel
1 Like