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

Default Privacy Settings! - Privacy | Forum

Mutahir Mirza
Mutahir Mirza Dec 13 '11
I wish to change the default privacy settings.
How am I supposed to do it?
Den Team
Den Dec 15 '11
These settings are stored in init.php file of every plugin which has privacy setting (photos, videos, blogs and etc). 
To change it, you need to find in plugin's init.php file this code:

function photo_privacy_add_action( BASE_CLASS_EventCollector $event )
{    $language = OW::getLanguage();
    $action = array(        'key' => 'photo_view_album',        'pluginKey' => 'photo',        'label' => $language->text('photo', 'privacy_action_view_album'),        'description' => '',        'defaultValue' => 'everybody'    );
    $event->add($action);}
OW::getEventManager()->bind('plugin.privacy.get_action_list', 'photo_privacy_add_action');

You should be interested in this string:
'defaultValue' => 'everybody'

Default value can be set as:
- everybody
- only_for_me
- friends_only

friends_only will be applied if "Friends" plugin was installed. 

Notice: remember, that all direct code modifications will be lost after plugin was updated. 
The Forum post is edited by Den Dec 15 '11
Den Team
Den Jan 23 '12
Yes, it will.
Alex
Alex Jun 28 '12
How do i change the view my profile bit

PM please

Miguel
Miguel Feb 16 '13
Hi Den! Tried to find the 'defaultValue' but there isn't any in the file init.ph...
james letts
james letts Mar 18 '13
Where are the Default settings please, which file?

Alia Team
Alia Apr 5 '13
Guys, for example you would like to change the default "Privacy" for the "Photo" plugin.

1. Go to ow_plugins/photo
2. Find init.php
3. Find the the line setting'defaultValue'



4. Change "everybody" to desired privacy.

Same applies to all other plugins. You need to open init.php within each plugin and change default privacy. 

Hope that this helps.
dave Leader
dave May 9 '13

I might add one suggestion, all the other values on this plugin, the defaut really does not matter, but for the birthday default value it really should default to only_for_me, this can be an issue if we change it and then the plug is updated and we forget to change it again.. 

 

The birthday really should be only_for_me by default on this one item for safety and privacy issues.  The rest is ok but would be nice to have the birthday set for only_for_me by default right out of the box.

 

Thanks..


 

Alia Team
Alia May 16 '13
>>birthday really should be only_for_me by default on this one item for safety and privacy issues

Site admin can always make birthday "not required" field or remove it completely from "profile view" page. This way user either doesn't add his b-date, or it will just be invisible for other users.
Katie
Katie Mar 18 '14
Strange... I cant see the 'defaultValue' => in any of the init.php files Ive opened.

Have the codes changed or something? Ive looked in photos, poker, friends etc and the code is not like the one youve posted above.

Love some help with this :)

Thanks
Katie
Oli Rakith
Oli Rakith Apr 4 '14
Up this topic !! ^^


I would like this plugin is based on "friends only", how ??

Sorry i'm french and my english is bad ^^

ross Team
ross Apr 14 '14
Oli waht do you mean by "is based on "friends only"?
Tawhid
Tawhid Apr 17 '14
How can i set a default value for all users ? init.php does not contain these..
The Forum post is edited by Tawhid Apr 17 '14
Oxwall Software
Oxwall Software Apr 17 '14
in 1.6. it is in classes/event_handler.php file
Tawhid
Tawhid Apr 19 '14
I have edited the classes/event_handler.php for the photo plugin but now the pictures don't show for the user am i doing something wrong :(

Edit1 This does work just need to find a way to edit photo menu to show useralbum

     * @param BASE_CLASS_EventCollector $event

     */

    public function addPrivacyAction( BASE_CLASS_EventCollector $event )

    {

        $language = OW::getLanguage();


        $action = array(

            'key' => 'photo_view_album',

            'pluginKey' => 'photo',

            'label' => $language->text('photo', 'privacy_action_view_album'),

            'description' => '',

            'defaultValue' => 'friends_only'

        );


        $event->add($action);

    }

The Forum post is edited by Tawhid Apr 19 '14
UrbAn
UrbAn Apr 21 '14

Hi guys,


I believe by default all plugins should be set as "friends_only"... Then if you want to change, do it, but you don't play with so important aspect as privacy is.


Additionally each updated pluging asks for the webmaster to change the setting, so it can be a nighmare.


Regards,


UrbAn

gami
gami Apr 22 '14
Hello,
it is possible that "privacy plugin" to play in the management of user memberships with a? And only the VIP get this access? Would be glad if there would be the option :-)

thanks for your help and answer

micha

sorry my english is :-(
UrbAn
UrbAn Apr 25 '14
Hi,


I was searching on "classes/event_handler.php" to set friends_only for the newfeed plugin but it has not the same structure, any suggestion?


Thanks!


UrbAn

Tawhid
Tawhid Apr 25 '14
For the newsfeed i think its "My_friends" i m still trying to figure it out as well some input would be helpful because there seems to be 2 different newsfeed one on the main page and one on the index page :/



Hi,


I was searching on "classes/event_handler.php" to set friends_only for the newfeed plugin but it has not the same structure, any suggestion?


Thanks!


UrbAn



Oxwall Software
Oxwall Software May 5 '14
I think this is the function you're looking for:
 public function onPrivacyCollectActions( BASE_CLASS_EventCollector $event )
    {
        $language = OW::getLanguage();

        $action = array(
            'key' => NEWSFEED_BOL_Service::PRIVACY_ACTION_VIEW_MY_FEED,
            'pluginKey' => 'newsfeed',
            'label' => $language->text('newsfeed', 'privacy_action_view_my_feed'),
            'description' => '',
            'defaultValue' => NEWSFEED_BOL_Service::PRIVACY_EVERYBODY,
            'sortOrder' => 1001
        );

        $event->add($action);
    }
Pages: 1 2 3 »
You do not have permission to reply this topic