media_cck.module
casey - March 7, 2008 - 16:58
| Project: | Media Manager |
| Version: | 5.x-0.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Description
First (absolutely not working) version of media_cck.module.
Biggest problem is to implement CCK field_formatters ; Especially when you have a mediareference field which can accept all kind of media types (from all kind of extensions). Formatters have no clue of type/ext, but when using configurable presenters and/or derivatives this information is needed.
This weekend I am not at home so I post it now anyway. It's a start.
| Attachment | Size |
|---|---|
| media_cck.tar_.gz | 2.8 KB |

#1
I have not much of an idea of how to code for CCK, but I'll definitely be looking to add this into the mmedia module.
Thanks for posting that.
#2
I came up with a solution for my problem:
Formatters don't support settings. And since mediareference can link to media of any type/ext we can't just define formatters for every derivative/presenter. Because of this issue I've introduced profile-based formatters. These profiles contain customizable derviative/presenter settings per type/ext.
#3
updated code
#4
This looks definitely like a module I'll be putting in the release itself.
Is it possible to generate a node token for the media reference based on it's name, and value of the formatters you have going?
This would be incredibly useful in a templating system I'm developing.
#5
Currently I am trying to create a new form element (media_referencefield). It'll contain:
- uploadbox (upload new media and add to dropbox)
- browsebox (browse through folders and add existing items to dropbox)
- dropbox (list of selected items; actual value of element)
This form element I use for the default cck widget but it is reusable (maybe for media_attach and media_embed)
---
It's not clear to me what you mean with node token.
#6
How's this progressing?
Don't worry about the node token, I've worked out a way to handle this regardless. (Basically it was using the token module to do search-replace within text, but now that because the filter works in the particular way, I can overcome the difficulties I was running into).
#7
Having stabilized the API, and general module configuration, could you please let me know how you'd like to proceed here?
I can write a basic mmedia_cck, but I suspect you'd like a lot more flexibility, given the comments.
#8
hi,
i'm trying to get the media to show up in my view, and tried installing casey's code from above ... but it reports:
Defines an media field type.
This version is incompatible with the 6.8 version of Drupal core.
i put it in the mmedia folder