We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

[Solution available] Customise Privacy | Forum

matt
matt Jun 19 '15
Hi,

I wish to customise the list of options that the user can set privacy of.

Can you point me in the right direction, please?

Thanks!
The Forum post is edited by Alia Jul 3 '15
matt
matt Jun 22 '15
Looking at the plugin - Am I right in thinking that the $actionList array, gets built by parsing the plugin files, presumably looking for some sort of privacy variable?

What might be a good approach to working with this array? I want users to have less privacy options.

Thanks!
Oxwall Software
Oxwall Software Jun 22 '15
Topic was moved from Privacy.
Alia Team
Alia Jun 30 '15
matt, you are right. Privacy plugin just gathers actions from other plugins.

If you would like to remove certain privacy option you will need to look into source code of corresponding plugin. Usually action gets declared within  public function genericInit() .

Let's take "Photo" plugin as an example. It adds "Who can view my photo albums" action into "Privacy" plugin. To remove this privacy settings you will need to edit ow_plugins/phot/classes/event_handler.php file.

Line to remove: $em->bind('plugin.privacy.get_action_list', array($this, 'addPrivacyAction'));

Another example "Blogs" plugin. It adds "Who can view my blogs" action. To remove it you will need to edit ow_plugins/blogs/classes/event_handler.php  file.
Action to remove:

        $action = array(
            'key' => PostService::PRIVACY_ACTION_VIEW_BLOG_POSTS,
            'pluginKey' => 'blogs',
            'label' => $language->text('blogs', 'privacy_action_view_blog_posts'),
            'description' => '',
            'defaultValue' => 'everybody'
        );

        $event->add($action);

matt
matt Jun 30 '15
As I thought! Thanks for your help.

It would be easier (to administrate) if the privacy plugin collected the array, and then gave a set of selection boxes in the plugin, to switch the privacy on or off.

It will be a major pain to re-edit each plugin.

Thanks for your help, much appreciated.

Kindest,