| Project: | Flash Node |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Issue Summary
Hi.. I had 2 questions about possible future features for Flashnode (which we love, by the way! :)
1. any chance of getting Flash node to be IMCE-aware in a future version, and if so, use IMCE to upload, instead? (http://drupal.org/project/imce)
2. any chance of getting Flash node to be Domain-Access-aware in a future version, and therefore be able to set separate upload directories for each domain/site? (http://drupal.org/project/domain)
the motivation for asking for either of these is to be able to be more organized in terms of where (i.e., which folders) flash content is stored on our machine.
for instance, we may have several domains being served off of one machine (whether they share the same content/database or not -- in our case they do). such as:
- anthro.ourschool.edu
- economics.ourschool.edu
- psychology.ourschool.edu
- ...in our case, each domain represents a different department in our school, with its own web site/domain. each department has a different web developer (author/editor) for its site. we would like it so that when each department's web developer goes to upload a Flash object to their own site, that their flash objects don't all go into the same folder used by other sites/domains. for instance, it would be better if each site gets its own sub-directory/folder, and when they go to upload their flash object, the folder they are to upload to already appears for them. for instance:
/files/
flash/
anthro/
economics/
psychology/
.....
images/
anthro/
economics/
psychology/
.....or even better..
/files/
anthro/
flash/
images/
economics/
flash/
images/
psychology/
flash/
images/
.....and these folders could each be assigned, one to each "site" or domain.
in fact, we might even be able to go further and have separate *years* under each site, so that their folder doesn't get too clogged over time.
thus, the motivation is:
a) to keep the flash (and images, and pdfs, and other files) separate for each site (and maybe for each year, too),
b) to prevent too many files from collecting in one folder over the years, thus making finding anything become unwieldy,
c) to prevent authors/editors from one site from deleting files another site has uploaded,
yet
d) if site B wants to use a flash node or image from another site (shared content), they still can (since the other subdirectories are still readable, just not writeable by other sites).
IMCE does allow for subfolder setup somewhat, but IMCE is not Domain-Access-aware, either (and therefore not aware of thinking in terms of more than one site/domain). however, this setup can still be achieved with IMCE (although klunkily) because IMCE allows for what it calls IMCE Configuration Profiles", and we can set up each site's author/editor with a separate IMCE profile (which includes what their upload directory will be).
But if Flashnode were Domain-Access aware, then, the setting where where the flash files go could be set for each separate domain.
Also, even without Domain awareness, IMCE is also a nice thing to have because it provides a nicer interface to seeing where the files will go -- i.e., it is more user-friendly -- and it has its own profiles if necessary. (These profiles would not be necessary to setup for us, though, if FlashNode were Domain-aware. it's just that IMCE's popup file browser window is a nicer interface).
Just wondering if these might be possible?
Thanks!
Comments
#1
Glad you like flash node.
I've never used IMCE, and what you describe sounds like a fairly hefty overhaul of flash node! I'm not saying it will never happen, but I'm not sure when I'll get time to look at such a major update.
I'm setting this to postponed to reflect that, realistically, I'm unlikely to make headway on this in the short/medium term.
Of course, if anyone would like to work up a patch...
#2
Does Flash Node use Tokens? If so, we might be able to expose some tokens to make this easier.
#3
hi, stuart,
thanks for responding so fast -- much appreciated..
well, short of putting IMCE or Domain support in, is there any way to tell FlashNode, when uploading a new Flash object, what subdirectory to put the new uploaded Flash file in (without having to go back in and re-edit the {files} or {flashnode} tables)?
for instance, suppose that on my system, FlashNode is set to upload things to "DRUPAL/files/flash". now, i go to create new content: a FlashNode. is there some way i can specify which subdirectory to put the new .swf file into? for instance, if i want the new .swf to go into "DRUPAL/files/flash/anthro", is there some way i can tell FlashNode to put it there under the anthro subdirectory, instead?
thanks
#4
Not on a case-by-case basis. There is a global setting on the admin page where you can specify where content should be put, but that's it.
It just uses a standard Drupal file upload field, nothing more than that.
#5
thanks stuart..
btw&fyi, there's a nice model for implementing file-uploading in the FCKeditor (http://drupal.org/project/fckeditor). it allows for the setup of profiles, and lets you use IMCE (since the coders of FCKe have implemented the IMCE hooks) for its file-uploader. using FCKeditor with IMCE ends up being a very easy way to support Domains, since IMCE allows for auto-calculating the file-upload location using some php and the base-url, etc. so this would work nicely for our uses.
to see an example of what this setup looks like: if you have FCKeditor installed, you can see these options in your drupal installation by going to Administer => Site Configuration => FCKeditor, go to the default profile and click "edit", then open up the "File Browser settings" section. i've included a snapshot of this in "fcke.png".
it would be lovely to have such a section in the Flash node module, as well. i wonder whether we could just ask the coders of FCKeditor and grab their code? (i am not a drupal hacker, so i don't know how to do this -- if i did, i would! :) but it looks like it's already been implemented and would make uploading both powerful and yet easy, as it is with FCKeditor when coupled with IMCE.
the idea here would be that it would work like a FlashNode import, but it would help get the file up to the correct location.
the IMCE's file browser window would help the user get the Flash uploaded to the correct subdirectory. then IMCE's window returns back to FlashNode the path/location of the file that was chosen to be "imported". this would essentially combine both your methods -- "Upload Flash" and "Import Flash" into one method, with a very elegant interface (IMCE) -- all with very little coding on our parts to get it into Flash.
wish i could figure out how to integrate IMCE into FlashNode myself, or i would.. it looks tantalizing.. :P
#6
There seems to be no movement on this after more than a year! I find it hard to believe that someone in this day and age would think it is all right to dump all files of a certain type - flash SWFs in this case - all in the same directory! Drupal is designed to be scalable and host an infinite number of sites, and large organisations use it - so this makes it all the more perplexing that fine-graned directory support is not available for FLASH NODE! Most file-related Drupal modules offer this level of directory control, so it is not even as though new technical ground is having to be broken to achieve it. I am sorry but this has to go down as poor design on the part of the developer, although I am very grateful for the work done to date.
#7
hey, michael, yeah, for our site(s), we just ended up not using flashnode at all. we decided that for our purposes, we didn't actually need flash files to have nodes associated with them. the files just need to be stored somewhere under the files tree in an organized way, and be able to make links to them.
so, since we use the domains modules to implement a multiple domain drupal, we used IMCE, and set up directories using IMCE configuration profiles and some PHP code to set the IMCE upload "Directory Path", much like nirbhasa mentions in post #7 of #198131: Domain Files module. (the code just strips off the ".com" from the domain name and adds a "/files/" to "auto-calculate" the name of the directory path it will present the user with.)
for instance, for example1.com, example2.com, and example3.com:
DRUPALDIR/files/
example1/
documents/
2009/
2010/
flash/
2009/
2010/
images/
2009/
2010/
example2/
documents/
2009/
2010/
flash/
2009/
2010/
images/
2009/
2010/
example3/
documents/
2009/
2010/
flash/
2009/
2010/
images/
2009/
2010/
(as you can see, we also moved our files directory out to DRUPALDIR/files)
this way, when an "affiliate editor" logged in to one domain -- say, example2.com -- uses the FCKeditor (or TinyMCE) and IMCE to upload a file, they get a pop-up file browser which only shows them the DRUPALDIR/files/example2 subdirectory tree. thus, in their IMCE file browser, all they see is:
DRUPALDIR/files/
example2/
documents/
2009/
2010/
flash/
2009/
2010/
images/
2009/
2010/
..which prevents them from editing files from another domain.
..and they can navigate down to the flash/ directory put their flash files there.
the FCKeditor even has a button for generating the correct html for the embedded flash (though i think there's currently a bug they're working on -- but you can obviously correct the html to your liking).
hope this helps someone.. :-)
#8
Hi jastern,
This is a neat work around. I did something similar myself with FileField, FileField Paths and SWF Tools after I came to the realisation that flashnode doesn't seem to offer anything I actually needed and it was proving too restrictive directory-wise. I also didn't like the fact that flashnode provides no update progress graphics like PECL, and it doesn't allow you to add multiple files at the same time.
Thanks for your comment - good to know I wasn't missing something obvious! ;-)