Closed (duplicate)
Project:
elFinder file manager
Version:
7.x-2.x-dev
Component:
Miscellaneous
Priority:
Minor
Category:
Feature request
Assigned:
Reporter:
Created:
18 Mar 2013 at 21:54 UTC
Updated:
22 Jan 2019 at 17:01 UTC
Jump to comment: Most recent
Comments
Comment #1
Cookie.Monster commentedI mostly have this working with OG, with the exception of being able to view and create the proper folder due to a token replacement issue I am having (issue posted about that). Once I have it fully working, I'll come back and post some instructions in case others want to do the same.
Comment #2
CarolineCB commentedWere you able to make it work? I am also interested in integrating elfinder with organic groups.
Comment #3
CarolineCB commentedSince I've seen questions online about the same issue, I will post here how I was able to integrate the two together. The only thing that I haven't been able to figure out yet is how to create an elfinder profile programmatically (that would make it fully automatic).
I created rules so that a new role is added every time a group is created. These roles don't need any special permissions, they are just there for the elfinder profiles to work.
-When a user is added (or accepted, or activated) as a group member, he is given the role.
-When a user is blocked (or removed, or unsubscribes) from a group, the role is removed.
Since I wanted to display ONLY the folder belonging to the group when displaying the file manager, I added some CSS and JavaScript to hide the other folders.
So here it is, step by step:
Rules
New group created
EVENTS
After saving new content
CONDITIONS
Entity is group
ACTIONS
Execute custom PHP code
I also added a "Send mail to all users of a role" because I need the administrator to create the elfinder profile when the group is created.
New group user
EVENTS
User membership has been approved
User has become a group member
CONDITIONS
Data comparison
ACTIONS
Execute custom PHP code
I added the "active" membership condition because I also have private groups and I did not want my users to have the role without being first approved by the group admin.
User blocked/removed from group
EVENTS
User has been removed from group
User membership has been blocked
CONDITIONS
None
ACTIONS
Execute custom PHP code
CSS
Javascript
The Javascript is kind of a real mess right now so if you are wondering how to do it you can comment here and I'll see how I can help. Since the folders are populated by ajax, I added a button that the person has to press to display the folders. It then grabs the references to the folders names, compares it to the URL and unhides the right folder.
Comment #4
ph0enix commentedComment #5
tyrant commentedHi there, how would I integrate this code into it? Thank you
Comment #6
Cookie.Monster commentedSorry I didn't reply or add any updates. My project was cancelled abruptly and I no longer have access to the code I wrote. I wish I could be more help. :(
Here is a link to a thread where I made a code change in elFinder. It was long ago already so I can't remember why I was doing it, but hopefully it points someone in the right direction https://drupal.org/node/1948058
Comment #7
madhusudan commented+1 for this feature,if this gets official it would be very good feature.
#3 code may work, but thats virtual, because its just CSS and JS for hiding folders and files.
Comment #8
mrpauldriver commentedI too am very keen to see support for Organic Groups
Comment #9
nwom commentedThis would be a feature request, and setting to Active (since no patch is attached). Also removing the tags. Please read the issue tag guidelines before adding tags.
Comment #10
ph0enix commentedComment #11
ph0enix commentedMoved #33