Embedding media
| Project: | Media Manager |
| Version: | 5.x-0.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
The "Embed media" link opens a new browser window (unstyled, white bg with the li-disc botched), with the text:
===
Media Manager
* generic Add Folder Close Folder
===
Clicking "Close" gets me to the same page (but properly styled), clicking "Add" gets me to a styled page with an input box. Entering a name there yields the message "Unable to create folder xxx".
When entering, the guidance text under has a problem with escaping: "(['\" -_])", whereas the error message (if I use something illegal) gets it right.
I have not yet succeded in embedding any media. That simply does not appear to be a choice yet.
Don't wory, I'll probably get around to something more constructive. I'm just covering stuff as I try 'em here. :)
Cheers!

#1
Addition: I have no problem adding a folder form "Media Manager", only when i get there from "Embed media".
And embedding media, that has already been uploaded is a bit weird. I get the text "[media:1]" embedded in the text. Is embedding dependent on something else? TinyMCE?
#2
On embedding: there are two ways in which media can be embedded, which unfortunately I haven't tested out fully as you may have noticed.
First, all embedded media is inserted into the textarea as a tag of the form [media:{id}:{settings}]. Eventually we'll be able to embed urls in place of the {id}, so we can handle things like youtube, etc. But this is both untested and rather hackish at the moment. This is meant to simply the process of embedding media using either no javascript editor, or things such as TinyMCE. I may add if there is demand something for FCKEditor, but I have no plans for that. This tag uses the filter system, so it is important that the filtering system be setup correctly otherwise the media will not be shown (the filter itself has to be AFTER the HTML filter - since it generates HTML which will be then possibly filtered out).
Second, this process also applies to the TinyMCE embedder, which takes the tag, transform it into an image, which is supposed to represent somewhat of what will be seen, then when finished, saves it the textarea as the above tag.
On the bug: I'll have a look at that, it seems that the whole process needs fine tuning, and I've tried to make it as clear as I can, without sacrificing useability and possibilities. I may have to check to see if this is the best possible way, suggestions of course are entirely welcome.
The opening of Embed Media is supposed to be by design as a popup (to differentiate it from simply rebrowsing on the website), and this popup like behaviour is meant to continue throughout the use of the popup. Once this is accomplished the plan was to make it a little more visually understandable, for instance, little icons to describe what each of the folder functions represents.
The layout of the Media I must admit is very much underdeveloped. The idea was to have somewhat of a Windows Explorer type feel to it, including drag and drop and context menus while using, but unfortunately, my javascript writing skills are limited. I have some preliminary ones that use the jQuery 1.0.4 that comes with the standard Drupal 5, but there are cross-browser problems.
#3
Ah, i can see that a popup would be a good route. I guess it's a matter of giving it dimensions, so it looks like a popup too. ;)
Javascript example:
var o_wnd= window.open('http://my.url.com', 'Embed Media', 'width=300, height=500, scrollbars=yes, scrolling=yes, location=no, toolbar=no');
I have done a little FCK hacking, will see whether I'll use FCK or TinyMCE in this project (have deadline so if TinyMCE is supported - I'll probably go that route <:).
#4
Thanks for the example, I'll definitely do something along those lines, since the clearer it can be made the better. However, since it is currently integrated with the Media Manager section, (which I think itself was unclear, because I wasn't certain exactly how it would be used), I may have a few other things to change to get it function nicely.
On TinyMCE, I don't know if the instructions in the README.txt where clear, but you have to copy across the mmedia directory from the media_embed module directory, into the tiny_mce plugins directory.
On FCK, if you put something together for that, and test it, I'd be happy to add it.
To help with this, the idea in the TinyMCE is to create from the [media:{id}:{settings}] tag, an image which can be used as a "place-holder" to provide a visual of something similar to what is supposed to show up. This image is then transformed back into the tag, so that Drupal places this in the body when saved into the database. If you require it, I will explain more about how the image generation itself is supposed to work (right now it's kind of a hack, since I didn't have time to really make it have finesse).
#5
Still in production, I've updated the section with the JS you've mentioned so that it looks like a scrollbar, but I'm yet to do the CSS coding.
#6
I'll be working on this in the coming days, so that we can get this module out the door.
#7
Since the module has changed quite a bit since this issue was raised, I'm closing the issue. Feel free to open another one, with the new development version of the module.
#8
Automatically closed -- issue fixed for two weeks with no activity.