sharing list or records with different group of users

am

New Member
would you please give me a clue for below request?

I want to share my records with three groups (Public, Friends(or groups of friends), myslef), I think it means, my list should be filtered based on who views them. But I do not know how to do it.

My app: every user will have its list in their profile, I created till this phase which list filtered by logged in user, but do not know how to manage to show the same list (should be the same list or new list?!) in others profile whit filtering based on who allows to see the record and the profile users id.

Thanks in advance
 
Hi,

If I understand correctly, any given user should be able to see themselves, anyone in the public group, and anyone (I am assuming in some private group that is their "friend"). If that is the case...

1) pre-filter the list on user for the current user (they can see themselves) - sounds like you may already have this
2) add an OR pre-filter on 'public' t- they can see public
3) For the "friends" part - you will probably need something like a separate lookup table that stores current user id and id of all friends, then filter add another OR pre-filter to the main list based on that lookup

The 3rd one is going to require a bit of coding to do. If you can or want to paste some code, screenshots, or link to site if you need more help, that would be useful.

Dale
 
  • Like
Reactions: am
Hi Dale and thanks for reply, I would appreciate a lot if you can answer to my below questions

my first question is that, since I need to have different options for my list in the others people profile than myself (like extra elements for purchasing, and some button ...) how i should create this, either with new list or same list with hide/show elements and other options? and how to do it?

then come back to my above question,
I might use a social networking component like Jomsocial for membership and integrate my fabrik list in that components profile, then i should use the "friend" and Userid of this component for writing my query. I jomsocial they have privacy options for sharing stuff but i could not figure it out. However, it store friends of a user in "friends" column of ctd_community_users table and based on documents of jomsocial we can retrieve visited user by $cuser=CFactory::getRequestUser(); ....
my list has an element "shared with" : public, friends & only me, and another element "user plugin" to record creator of any record .. so my prefilter should be based on this options .... hope this info is enough to let you help me to write required query

thanks in advance
 
Hi,

I haven't messed with Jomsocial so I can't say much about that. You may want to post your specifics on their support forum for that. Personally, aside from Fabrik which pretty much gives me complete control, I avoid J! extensions for the most part and write my own if I need something Fabrik cannot help with (which so far hasn't been much at all).

Otherwise, your questions directly relate to Fabrik, all ELEMENTS have an access option that says who can see editor delete, etc them and lists have the same, but those are list wide. Beyond that, you could consider filtering the elements on load via JavaScript (this will leave them visible in the html if someone vies the page source though).

I couldn't even begin to guess what the query or queries might look like without some understanding of your data map (types, relationships, etc). Even then I would need to understand the desired result based on those specifics.

You should try a few things and if you hit a brick wall, post the specifics here. It would be hard for me or anyone else here to speculate on what might work best because we do not know all the specifics of your environment or scenarios. The wiki here has articles on just about every aspect of Fabrik, so searching there should help as well.
 
  • Like
Reactions: am
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top