Forums  ›  General  ›  General discussions
 

Let's talk about privacy groups

here's an interesting thing. Geek_Girl sent me a link to this thread when she responded to a recent suggestion I made about Privacy Groups. Firstly, I don't ever recall seeing this thread before, yet (secondly) slap bang in the middle I offered G_G a module that has zilch to do with this discussion.

The problem with any social networking site is too much focus on giving members control. That's dangerous because you are the one creating the site and "you" should be the one who dictates which way the site develops. For those of you who have read my posts on the Boonex forums and here, you should recall the number of times I've asked the developers to let the Admin decide where the ship sails. - One Ship, one Captain.

With that in mind, Privacy controls should be totally in the hands of the Admin. If they aren't, astute members will create profiles that nobody can read or navigate. Please use as an example, the friend requests you get on FB. You go to their profile and it's blocked. You have to become a friend to see that you don't want to be a bloody friend!

This is 21st century madness. I choose my friends, they don't choose me.

 Privacy settings should be site related, not member related. If members don't like your choice of Privacy settings, let them go elsewhere.

If you're running a football club site, it would be beneficial if there were Privacy settings available for Committee, Coaches, Players and members.

Any site worth its salt needs that level of privacy.

If members want to keep their smutty photos from the Committee, they don't belong in the Club!

On a dating site, members may wish to create albums for public, silver friends and gold friends, so admins should be able to set those privacy levels.

Sadly, the old Dolphin code just became too complex for no reason at all. Each privacy level should be nothing more than a number with the label set by the site admin. 

01 Admins
02 Gold Friends   (Committee)
03 Silver Friends  (Coaches)
04 Members        (Players)
05 Public             (Members)

I did this years ago for a Club site, but I couldn't do it now.  The problem is, when you're trying to sort out someone else's mess it's not always clear sailing.

Grrrrrrrrr

Thank you Deano.  I had no idea when I first started on this that it would be so involved.  Thank you for working on this; it will add to the value of Cheetah.

I have added a tutorial for this. https://www.cheetahwsb.com/m/tutorials/view/Add-custom-global-privacy-groups

 

Hopefully i did not miss anything.

EDIT:

UGGGGG. Never fails. The tinymce code sample plugin i added to tinymce is malfunctioning of course. If the post is re-edited the brackets such as < end up getting striped from the code.

If you run into any syntax error problems with any of that code let me know.

I want that plugin properly working even if i have to write my own. I think it's important that this site have a easy way to enter code into the editor and i want the syntax highlighting as well.

 

It appears to be working.  I logged in as Tommie, I added a co-worker.  I then created an album, set the privacy to co-workers, and uploaded a photo.  My co-worker could see the photo but when I logged in as a non co-worker I could not see the post and it was not listed in the timeline.  Looks good.  Thanks so much Deano for working on this.  You are the greatest.

Ok. i am close to complete on this. Sorry for the delay, as you were not in a hurry due to other projects, i put it on hold to do some other things myself.

I have been working on this on my dev site. https://dev.cheetahwsb.com

At that site are 13 regular user accounts you can play with. All have a password of cheetah.

The deano account is the one that currently has a photo album with the Co-Worker privacy group enabled on it. The accounts Tommie and Lucille are set as Co-Workers of deano and can see the album, no one else can.

There is a action button on the profile of each member just like the add Fave, Befriend and other buttons there. There is also a link on the Profile submenu that i have placed after the Friends submenu items that takes you to the page that show the member their current Co-Workers and from there they can add and remove co-workers. That page could use a lot more improvements such as pagination, and search features but it does work. https://dev.cheetahwsb.com/page/Co-Workers

So. Play around on those accounts and let me know if it even come close to what you need.

I am working on writing up the instructions to do this.

 

@Geek_Girl, if you want the splash on my demo site http://digital-junction.com/demo l haven't tested it on Cheetah, but let me know and I'll email it to you.

 Yes, I have that and it works great on Cheetah.  This is a splash.php file to present a cover to the website instead of the default index.php file.

@Geek_Girl, if you want the splash on my demo site http://digital-junction.com/demo l haven't tested it on Cheetah, but let me know and I'll email it to you.

 

Sorry for the delay on this. This is proving to be a bit more difficult than i had thought.

 OK Deano, always put the important work ahead of such things as this.  I am working on other things at the moment, coding in a splash page with the login and join forms.

I do appreciate your devotion.

Sorry for the delay on this. This is proving to be a bit more difficult than i had thought.

 

I wonder how they are handling privacy in UNA?

 No clue. I have not downloaded UNA since it's early beta days.

 

I work all day tomorrow, so Monday i will whip up some sample code to do a custom global privacy group.

It will consist of

1) A action button for the profile page action block, such as Add Co-Worker or Co-Worker.

2) A page that will show current Co-Workers and allow adding of new ones.

3) A database query to create the new Global Privacy Group

4) A database table to store the Co-Workers

 

I will put it in the Tutorials section as it can reworked to be used for other List gathering/Privacy group needs just by changing a few things.

It should not take me to long to do. And it will at least provide an example of how those things work.

 

 Thanks Deano.  I need to buy you whatever your favourite beverage may be.

Thanks Deano, the way they want to handle privacy is rather complicated.  That might have to be reconsidered.  I thought Modzzz had a module "Custom Privacy" but it isn't adding custom privacy groups but adding parameters that you can filter on; such as sex and age and country.  I wonder how they are handling privacy in UNA?

I work all day tomorrow, so Monday i will whip up some sample code to do a custom global privacy group.

It will consist of

1) A action button for the profile page action block, such as Add Co-Worker or Co-Worker.

2) A page that will show current Co-Workers and allow adding of new ones.

3) A database query to create the new Global Privacy Group

4) A database table to store the Co-Workers so the Privacy group has a list to work with.

 

I will put it in the Tutorials section as it can reworked to be used for other List gathering/Privacy group needs just by changing a few things.

It should not take me to long to do. And it will at least provide an example of how those things work.

 

Having a list to go by is actually the key here.

The Global groups access data from lists that are already available.

define('BX_DOL_PG_DEFAULT', '1'); This one i do not know what it does. Sorry. This one has me stumped.
define('BX_DOL_PG_NOBODY', '2');  This one always returns false. So is nobody. This is the one used for private albums.
define('BX_DOL_PG_ALL', '3'); This always returns true, so matches everyone. This is the one used for Public.
define('BX_DOL_PG_MEMBERS', '4'); This one uses the Profiles table as a list.
define('BX_DOL_PG_FRIENDS', '5'); This one uses your friends as a list.
define('BX_DOL_PG_FAVES', '6'); This one uses your Favs as a list.
define('BX_DOL_PG_CONTACTS', '7'); This one uses your contacts in mail for a list. (That's your contact list BTW that you mentioned there was no way to add to. You can and can't. it's your mail contacts. You have to at least send a message to someone at least once for someone to be on your contacted list. But your right, there is no way to directly add to that list.)
define('BX_DOL_PG_HIDDEN', '8'); I do not know what this one is for. It's not for private lists as nobody(2) is used for that, so this is another one i have no clue on.

Anyhow. I believe all of the Global groups need a list to look up the members in. Or at least the ones that i know how they work do.

So, you can create a co-workers group, but it will not be of any use until a interface is built that allows your members to enter co-workers so a list of them are stored in the database. That's what you will need to build in order to create a Global group. You need to create code to allow the members to enter data for that group to use because the global groups require data to look up.

That's why i mentioned the members groups. It may be easier to use those because cheetah does not have built in way to allow members to add to custom lists for the groups to use. But you could write code to collect that data. Depends on how far your willing to go for this customer. One or two groups might not be to bad, but if they need a lot of them, it's going to be a lot of work.

I will have to discuss this with the person I am building the site for; they requested the privacy groups.  It is a very niched site with very specific parameters.

there are a few things I see with your idea. I did this a long time ago with a dolphin site and it just became easier to allow users to create their own privacy groups.

for starters, you don't want to waste your time creating a multitude of privacy groups - and then those privacy groups are not used. a tutorial - for users- on how to add their own privacy group and add people to it is what I ended up going with because it was a lot easier.

in your example of a co-workers privacy group. I am self employed and don't have co-workers. so you would have created something that actually gets into my way instead of assisting me.

I think that was the basic logic with dolphin - lets give em a bare minimum and let the users create the rest based on their specific needs. the most common groups are 'friends', 'everyone', 'no one', 'members only', or 'non members only'. in my opinion - anything more than that and the user should create for themselves. you will end up spending a lot of time for something that won't actually get much use.

 

now - how would you accomplish what you want. it isn't all that difficult, but when I did it, it ended up being a waste of time cause no-one used the new global privacy group. I can't remember all the steps, but you want to look at the Faves privacy group as your template. Faves are based on the user specifically. If you try to use the Members privacy group as an example - it will result in what deano was referring to - a privacy group with ALL coworkers - regardless of the company they work for. since Faves is based on the user individual friends list, it will only list co workers related to that specific user.

if you want a co workers privacy group that doesn't have to be populated from existing friends - then use the Friends privacy group as your template.

I remember that I originally started by trying to rename the Faves privacy group to a new name. this allowed me to follow all the places and duplicate the code snippets in the correct places. 

 

 

Example. You have 2 members. One works at Dunkin Donuts, the other at Stop&Shop. Each enter their coworkers into this privacy group. Now you have a group that has both Dunkin Donuts and Stop&Shop co-workers in it which i assume is not how you would want it to work. The global groups are not designed to work at the individual member level, that's what the members groups are for.

First of all, I know I am creating custom code that I would be responsible to maintain; making sure upgrades don't overwrite my custom code.  I did this a lot for Dolphin.  I don't understand exactly what you are saying here.  There is a global privacy group for friends, favourites, and contacts although there is no way for one to add to the contact group; Dolphin had a lot of incomplete features; for one, I can't see who has blocked me although the coding is in place for that; the GUI is missing.  I can manually add members to my favourite list and that favourite list only applies to me.  However, all members can add or remove members from their own favourites list.  So I don't understand the privacy group thing enough to be able to add an additional group, "co-workers" that site members can access and add members so they have a list of their co-workers in a privacy group to control viewing, comments, etc just like I do with friends and favourites.  For example, I create a blog post that is about work and I only want my co-workers to read just as can be done now with friends.

Maybe this is an example of terminology.  When I say global, I mean accessible to all members of the site.  Currently global privacy groups that members can use are Friends, Favs, Me Only, Public, Members, and Contacts although I don't know how you add someone to Contacts.  For Favs you go to their profile and there is an action button for that.  Me Only, Public, Members are privacy group that one don't add to as a list for obvious reasons.  Friends get added or removed when you add or remove someone as a friend.  So it only seems logical that as a programmer I could custom code a site to have a "co-worker" privacy group that members can use as well as friends and favourites.

I also know that privacy is controlled by a number:

bx_import('BxDolPrivacyQuery');

define('BX_DOL_PG_DEFAULT', '1');
define('BX_DOL_PG_NOBODY', '2');
define('BX_DOL_PG_ALL', '3');
define('BX_DOL_PG_MEMBERS', '4');
define('BX_DOL_PG_FRIENDS', '5');
define('BX_DOL_PG_FAVES', '6');
define('BX_DOL_PG_CONTACTS', '7');
define('BX_DOL_PG_HIDDEN', '8');

Which corresponds to the ID in the sys_privacy_group.

By the way, I have been curious about privacy level hidden; 8 and where that is used.

 

 

Example. You have 2 members. One works at Dunkin Donuts, the other at Stop&Shop. Each enter their coworkers into this privacy group. Now you have a group that has both Dunkin Donuts and Stop&Shop co-workers in it which i assume is not how you would want it to work. The global groups are not designed to work at the individual member level, that's what the members groups are for.

First of all, I know I am creating custom code that I would be responsible to maintain; making sure upgrades don't overwrite my custom code.  I did this a lot for Dolphin.  I don't understand exactly what you are saying here.  There is a global privacy group for friends, favourites, and contacts although there is no way for one to add to the contact group; Dolphin had a lot of incomplete features; for one, I can't see who has blocked me although the coding is in place for that; the GUI is missing.  I can manually add members to my favourite list and that favourite list only applies to me.  However, all members can add or remove members from their own favourites list.  So I don't understand the privacy group thing enough to be able to add an additional group, "co-workers" that site members can access and add members so they have a list of their co-workers in a privacy group to control viewing, comments, etc just like I do with friends and favourites.  For example, I create a blog post that is about work and I only want my co-workers to read just as can be done now with friends.

Maybe this is an example of terminology.  When I say global, I mean accessible to all members of the site.  Currently global privacy groups that members can use are Friends, Favs, Me Only, Public, Members, and Contacts although I don't know how you add someone to Contacts.  For Favs you go to their profile and there is an action button for that.  Me Only, Public, Members are privacy group that one don't add to as a list for obvious reasons.  Friends get added or removed when you add or remove someone as a friend.  So it only seems logical that as a programmer I could custom code a site to have a "co-worker" privacy group that members can use as well as friends and favourites.

I also know that privacy is controlled by a number:

bx_import('BxDolPrivacyQuery');

define('BX_DOL_PG_DEFAULT', '1');
define('BX_DOL_PG_NOBODY', '2');
define('BX_DOL_PG_ALL', '3');
define('BX_DOL_PG_MEMBERS', '4');
define('BX_DOL_PG_FRIENDS', '5');
define('BX_DOL_PG_FAVES', '6');
define('BX_DOL_PG_CONTACTS', '7');
define('BX_DOL_PG_HIDDEN', '8');

Which corresponds to the ID in the sys_privacy_group.

By the way, I have been curious about privacy level hidden; 8 and where that is used.

The built in privacy groups access is determined by the script that is in the get_content field of the sys_privacy_groups table.

For example the Members group uses the script isMember() && isProfileActive($arg2); which returns true if the access attempt is coming from a member with a active profile.

The Contacts group uses a more complex script that looks up the member attempting access to see if they are listed in the other members mail contacts.

Dolphin/Cheetah does not provide a way for admins to create new global groups, and there is also no way for members to add other members to these global groups.

The member created groups are the only ones that work that way.

To allow the admin to create a custom group and let members add other members to this group would require custom code. There is no built in way to do it.

Also note, if your were to add a global group called co-workers, it is global, and not per user. Thus all members would be able to add to this group. So for it to work as i believe you would want it to work, each user would need to have their own separate co-workers group.

Example. You have 2 members. One works at Dunkin Donuts, the other at Stop&Shop. Each enter their coworkers into this privacy group. Now you have a group that has both Dunkin Donuts and Stop&Shop co-workers in it which i assume is not how you would want it to work. The global groups are not designed to work at the individual member level, that's what the members groups are for.

I suppose you could add that group for every member in the table. Then in ChWsbJoinProcessor after a profile is created and verified. a new group for that user could also be created as well.

At the moment tho, there is no built in way to do it, nor can i think of a easier way to do it.

 

if it is what I ran into a long time ago - it is a decent tool

 

example - you create a new group, but you only want 6 of your friends to view it - they are your bffs

you create a privacy group called bffs, and add those friends to that privacy group. then, you set your new group to the bffs privacy group, and only those 6 people can see it.

This is member created privacy groups.  In the sys_privacy_group table, there is a field for the owner and a parent field since you can create a privacy group from an existing group.

What I want is to create new privacy groups that can be used by anyone on the site.

if it is what I ran into a long time ago - it is a decent tool

 

example - you create a new group, but you only want 6 of your friends to view it - they are your bffs

you create a privacy group called bffs, and add those friends to that privacy group. then, you set your new group to the bffs privacy group, and only those 6 people can see it.

I am working on a site where I need to add in several new privacy groups that can be available to all members. I am trying to understanding how this works.  I know there is the database tables; including sys_privacy_groups and ChWsbPrivacy.php along with a few other privacy classes.  So what would be the procedure for me to add in new site privacy groups?  In the backend, I see where one can enable or disable the built-in privacy groups; how is that managed?

There is one other thing I noticed is that Dolphin included a Contacts privacy group but there did not seem to be a way to add anyone to the Contacts privacy group.  So when I set up these new privacy groups, there must me a way for members to add someone to the group.  For example, I will be adding the privacy group Co-workers so members need to be able to add other members they work with into that group.