Closed (fixed)
Project:
Web File Manager
Version:
6.x-2.10-rc5
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Apr 2008 at 20:58 UTC
Updated:
12 Jan 2011 at 20:24 UTC
Jump to comment: Most recent file
Comments
Comment #1
Piyush commentedHi. I've been desperately looking for how to get OG level permissioning into WebFM and came across this patch.
I've just started to see if this will work for me. Not really a coder but I managed to merge your patch into the current WebFM 2.13 module.
Seems to be working quite well which is great news. One issue I've found is that if you allow WebFM to auto create directories on new group creation, I get problems when the group title has spaces in it. It creates the directory ok (at least on a MAMP test system) but then can't upload anything into that directory using WebFM.
I changed 2 lines in function webfm_nodeapi(&$node, $op, $teaser) - basically doing a string replace on the spaces with underscores for the title, so:
$group_root_dir = file_directory_path() .'/'. variable_get('webfm_root_dir', '')."/".str_replace(' ','_', $node->title)
and
variable_set('root_dir_group_'. $node->nid, str_replace(' ','_', $node->title))
Maybe there's a better way of doing this that will also take care of other characters not allowed in directory names?
Have you worked any more on this functionality and if so, do you have an updated patch file?
Thanks!
Comment #2
jody lynnThanks Piyush
Attached is a new patch against 5.x-2.13. I added some code to get rid of spaces and other non-alphanumeric characters when the folder is created in the group.
Thanks for testing. So far it's working for me but it definitely needs more testing and refining.
Comment #3
jody lynnPiyush found a bug in my last patch related to the sanitizing of group names, so here's the latest patch.
Comment #4
robmilne commentedI wish I could test this but I don't have enough time - Maybe Andre? I'd like to give webfm some cycles again someday.
Comment #5
andremolnar commentedI can take a look once the jquerification of the client side is complete - though my OG experience is limited - i'm sure I can review the patch.
Comment #6
amit_singh15 commentedCan anybody tell me how to incorporate this patch into drupal website??
How do i include this patch into my module?
As i am new to drupal so sorry for asking such a question.
Comment #7
Utternonsense commentedIs there any way I can integrate this module with a panel layout inside OG? I was previously using OG Files but that's pretty limited. However, it does provide a tabbed page that can be integrated with a Blueprint of other tabbed pages in a OG group layout.
Is there any way I can do this with WebFM too? I can build a Panels page with a list of previously uploaded files but I really want to embed the whole shebang into a panel page. Do I need to write a specific content type to handle this?
Thanks in advance for any help.
Comment #8
darius123-1 commentedhttp://drupal.org/node/14231
Comment #9
develcuy commentedwhat a wonderful patch! I have tested it with og 8.x and seems to work properly.
Here I provide an extended version of the patch, which provides a tab to every og node (group homepage) and also webfm root path is jailed to corresponding group's file path(user will only see files corresponding to her group).
Blessings!
Comment #10
design.er commentedHey, this is a great function! Are there any plans to port this to D6?
Comment #11
najibx commented+1 for D6 port. Great stuff
Comment #12
vacilando commentedExtremely useful if ported to D6; subscribing!
Comment #13
jody lynnI will work on a port to D6 if the maintainer expresses interest in committing the patch.
Comment #14
develcuy commented@Jody Lynn
I doubt that, latest commit was 4 months ago, perhaps trying to contact him directly...
Blessings!
Comment #15
robmilne commentedI'm still alive but have been way too busy with other projects to volunteer any time. My availability may improve next month. There is such a backlog of issues I cannot promise anything.
-rob
Comment #16
rezboom commentedD6port++ subscribing
Comment #17
ianchan commentedD6port++ subscribing
Comment #18
BetaTheta commentedD6port++subscribing
Comment #19
robmilne commentedNow that there is a new release I'd like to see a new 6.x patch of this work for the next release.
Comment #20
higherform commentedI also vote for a D6 port of this. Can contribute a small amount of testing time when its ready. Thanks.
Comment #21
jody lynnHere's an untested patch for D6 og integration.
It needs thorough access testing.
Comment #22
jody lynnComment #23
robmilne commentedJust to confirm, is this patch applied to RC5?
I have never used OG so I don't feel qualified to test this. I'd appreciate it if OG users familiar with WebFM could help out in this regard. I will review security issues by looking at the code only.
-rob
Comment #24
jody lynnYes, RC5.
I'd like someone who wants the patch to test it out with some OG groups and users. If no one does, I will eventually.
Comment #25
BetaTheta commentedI'll do it this weekend. I'll let you know how it works out
Comment #26
BetaTheta commentedTested, seems to work pretty fine. Creates new root directories for each new group as well.
Comment #27
BetaTheta commentedAlso, I don't know how hard this would be, but it'd be awesome if group admins could administrate their group directories (but not any other directory obviously)
Comment #28
BetaTheta commentedAlso, this may be impossible to do, but if there is any way to have a link on the local tasks bar for each group, that'd be awesome. What would be even better is if by clicking that link, a webfm browser would show up, but it would only show that group's directory and not all the directories the user is able to see. Now that would make it a complete integration with WebFM.
Comment #29
robmilne commented#27 is a variation of many previous requests for local administration rather than the current global admin. I don't have the time to implement this though I will keep it in mind.
Thanks for testing the patch. I will include in the next release - hopefully in the next few weeks.
Comment #30
klucid commentedThis is great. I got it patched to create the group directories automatically. Great work guys.
I really would like the feature mentioned in #28. That is exactly what I need. I'm guessing to add the link on the "taskbar" (i.e., the group details block) we'd have to patch the OG module.
I would PAY for the patch that creates a private WebFM per Organic Group, which also takes you directly to the group's directory, with no access to parent directories.
Any takers?!
Comment #31
robmilne commentedIn 6.x-2.11
Comment #33
design.er commentedHello, I have three different node types for organic groups and would like to limit the automated creation of folders in webfm for only 1 of them. I guess, it must be an if-statement (something like
if ($groups[$node->type] == 'myspecialgroup') { ... }?)... but where and how exactly?I would be very thankful if somebody could help me to get it working.
Stefan
Comment #34
cgmonroe commentedThe "create subdirectory magic" is done in the webfm_nodeapi function. Look at the insert case.
Here's a quick untested way to do this is to change this section:
to look like:
Comment #35
design.er commentedI was so close - right line, wrong code. :D
Thank you VERY MUCH for your help! You made my day! :)
Comment #36
lechuck-1 commentedHi, How it's possible to grant Group Admin the permission to create and delete folders ?
thanks
lechuck
Comment #37
jody lynnYou should open a new issue rather than re-opening a closed one.