Search

Version 1.0, 12th January 2009

Mediathek is the German word for media center. It is an enhancement of a multi-select box field that links entries of a media section to an article or blog section.

Field: Mediathek

Download

http://github.com/nilshoerrmann/mediathek/tree/master

Setup

  1. Upload the 'mediathek' folder in this archive to your Symphony 'extensions' folder.

  2. Enable it by selecting the "Field: Mediathek", choose Enable from the with-selected menu, then click Apply.

  3. You have to set up two sections:

    • One section with all your media files. You will need an input field and an upload field at least.
    • Another section where you like to insert media from your media center, e. g. your articles or blog section.
  4. Go to your second section and add the Mediathek field.

Adding media to an entry

  1. Go to your article or blog section.

  2. Create an new entry.

  3. To add an item to an entry click on Show All to browse a list of all entries belonging to your media section.

  4. If your media section is empty, simply click Create New to add an new item. New items will automatically be added to the selection of the current entry and will be made available for selection in each entry of your article or blog section. New items are directly uploaded to your media section – no switchig between section is needed.

  5. PLEASE DO NOT FORGET TO SAVE YOUR ENTRY AFTER ADDING ITEMS!

Removing media from an entry

  1. Go to your article or blog section.

  2. Open the entry you want to change.

  3. Unselect the unneeded media item by double clicking it OR open the Mediathek by clicking Show All and click the unneeded media to unselect it.

  4. Note that the media item will not be deleted but removed from the selection. It will still be avaiable for selection.

  5. PLEASE DO NOT FORGET TO SAVE YOUR ENTRY AFTER ADDING ITEMS!

Deleting media

  1. Go to your media section.

  2. Delete unneeded entries.

Adding media to textarea

  1. Drag and item from the Mediathek to your textarea. Items will be inserted to your textarea on drop respecting your text formatter setting. Currently the extension recognizes Markdown, Textile and plain HTML.

Preview media

  1. Click on Preview in the Mediathek list.

  2. Images will be previewed as inline thumbnails. Other files will be downloaded or opened depending on your browser settings.

Good to know

  • The number of available items will always be shown in braces appended to the Show All and Show Selection Only links.
  • Unselected items that are dragged into a textarea will automatically be added to the selection.

Ah! and yes, if you try it I'm open for comments, suggestions, ideas and bug reports :)

Brilliant! I haven't tried this out yet, but it appears to answer questions raised in the Approach to Images thread. I know Allen and Alistair had a similar concept for the same functionality, and a colleague and I had planned to write one as well. This may well have saved a lot of additional work!

Looking forward to playing around this this next week.

Hey Nils, this is great, it would be perfect if you could find a way to add images to it easily.

it would be perfect if you could find a way to add images to it easily.

Yes, this is on my list. But I don't know yet which would be the most elegant, symphonian solution:

  1. Adding a upload pane with only the required fields of the linked section (I'm not sure how this could be implemented in an easy way). In this case, fields that are not required have to be added using the standard section menu.
  2. The lightbox way: popping up an inline frame with the create new form of the linked section.

Any other ideas?

My Inline Section idea uses JS and CSS to hide most of the Symphony UI when loading Publish and Entry pages into an iframe. It's not perfect, but is an alternative route.

it would be perfect if you could find a way to add images to it easily.

I just uploaded a new version (0.2) which enables inline uploading. Inspired by Nick, I'm using an iframe customized with CSS and JavaScript. The Mediathek should respect all settings of the related section, either validation rules or required fields. After uploading a new item, it will be added to the list of selected items. To approve the selection you still have to save the entry.

It seems to work fine in Firefox und Safari (both Mac, lastest versions).
If you test it, please post bugs or ideas here in the thread. Thanks :)

Nils, could you make this available via github? I'd really appreciate that, so I'd be able to play with the field and merge any changes you make.

rowanjl I'll try it when I manage to get git running on my mac. Work started again this week so I have so see when I'll find the time.

Cheers, hope you get it sorted. I know that there's a simple installer package floating around somewhere.

Nils, you might want to try downloading the Git for OS X installer package from Google Code.

Edit: By the way, if it matters, I was worried that the packages designated for Leopard (10.5) would not work for my iMac running on Tiger (10.4). I installed it on Tiger and it works just fine.

Yeah, took me a few tries as well to get Git working here on my work computer. Funny how some things are actually way easier in Linux. Go figure.

I have to say I'm not a "terminal guy" but I managed to get it working:
github.com/nilshoerrmann/mediathek/tree/master

I rewrote the javascript hoping to make things better. Calling it 1.0 now. Hope it works fine. Download above.

Is this broken in git at present? All I see is a generic select box and a "Create" link at the bottom.

It shouldn't. Which browser and OS are you using?

Safari 3.2.1, Mac OS X 10.5.6 - it's throwing an error from mootools:

mootools-1.2.1-core.js (line 115) TypeError: Result of expression '$.element' [undefined] is not a function.

Update: I found that uninstalling the "Reference Link" extension fixed this problem - it was loading jQuery as well :(

Strange: I installed a git copy of the field, using the same browser and OS and I don't see any errors.

Are you using Symphony 2 release or lastest GitHub version? Do you have other extensions enabled that insert mootools in the admin pages?

Update: I found that uninstalling the "Reference Link" extension fixed this problem - it was loading jQuery as well :(

Hm ... jQuery and mootools shouldn't interfere - at least I think they shouldn't. I'll check that later.

Yeah, sorry guys. "Reference Link" is a work-in-progress and really not intended for public use at all. I originally forgot to include a README to that effect but it's there now.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details