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
see below
OW::getRouter()->addRoute(new OW_Route('view_photo_list', 'photo/viewlist/:listType/', 'PHOTO_CTRL_Photo', 'viewList', array('listType' => array('default' => 'latest'))));
OW::getRouter()->addRoute(new OW_Route('view_tagged_photo_list_st', 'photo/viewlist/tagged/', 'PHOTO_CTRL_Photo', 'viewTaggedList'));
OW::getRouter()->addRoute(new OW_Route('view_tagged_photo_list', 'photo/viewlist/tagged/:tag', 'PHOTO_CTRL_Photo', 'viewTaggedList'));
OW::getRouter()->addRoute(new OW_Route('view_photo', 'photo/view/:id', 'PHOTO_CTRL_Photo', 'view'));
OW::getRouter()->addRoute(new OW_Route('view_photo_type', 'photo/view/:id/:listType', 'PHOTO_CTRL_Photo', 'view', array('listType' => array('default' => 'latest'))));
OW::getRouter()->addRoute(new OW_Route('photo_admin_config', 'photo/admin', 'PHOTO_CTRL_Admin', 'index'));
OW::getRouter()->addRoute(new OW_Route('photo_admin_view', 'photo/admin/view', 'PHOTO_CTRL_Admin', 'view'));
OW::getRouter()->addRoute(new OW_Route('photo_uninstall', 'photo/admin/uninstall', 'PHOTO_CTRL_Admin', 'uninstall'));
OW::getRouter()->addRoute(new OW_Route('photo_user_albums', 'photo/useralbums/:user/', 'PHOTO_CTRL_Photo', 'userAlbums'));
OW::getRouter()->addRoute(new OW_Route('photo_user_album', 'photo/useralbum/:user/:album', 'PHOTO_CTRL_Photo', 'userAlbum'));
OW::getRouter()->addRoute(new OW_Route('photo.user_photos', 'photo/userphotos/:user/', 'PHOTO_CTRL_Photo', 'userPhotos'));
OW::getRouter()->addRoute(new OW_Route('photo.ajax_upload', 'photo/ajax-upload', 'PHOTO_CTRL_AjaxUpload', 'upload'));
OW::getRouter()->addRoute(new OW_Route('photo.ajax_upload_submit', 'photo/ajax-upload-submit', 'PHOTO_CTRL_AjaxUpload', 'ajaxSubmitPhotos'));
OW::getRouter()->addRoute(new OW_Route('photo.ajax_upload_delete', 'photo/ajax-upload-delete', 'PHOTO_CTRL_AjaxUpload', 'delete'));
OW::getRouter()->addRoute(new OW_Route('photo.ajax_create_photo', 'photo/ajax-create-album', 'PHOTO_CTRL_Photo', 'ajaxCreateAlbum'));
OW::getRouter()->addRoute(new OW_Route('photo.ajax_update_photo', 'photo/ajax-update-album', 'PHOTO_CTRL_Photo', 'ajaxUpdateAlbum'));
OW::getRouter()->addRoute(new OW_Route('photo.ajax_album_cover', 'photo/ajax-album-cover', 'PHOTO_CTRL_Photo', 'ajaxCropPhoto'));
OW::getRouter()->addRoute(new OW_Route('photo.download_photo', 'photo/download-photo/:id', 'PHOTO_CTRL_Photo', 'downloadPhoto'));
PHOTO_CLASS_EventHandler::getInstance()->init();
//OW::getEventManager()->bind(OW_EventManager::ON_BEFORE_DOCUMENT_RENDER, function()
//{
// $cmp = new PHOTO_CMP_AjaxUpload();
// OW::getDocument()->appendBody($cmp->render());
//});
??
I think this is the function you're looking for:So I changed the default value to NEWSFEED_BOL_Service::PRIVACY_FRIENDS_ONLY that I also added in service.php as 'friends_only' but still non-friends can see newsfeed messages between friends in their newsfeed.
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);
}
Any ideas?
I guess the only way to build a good privacy framework would include denying access until authorised.
Any easy way to add a privacy check on the www.youroxwallsite.com/friends/user/123 page listing?
Can you please specify, what do you mean see newsfeed messaged between friends in their newsfeed? Screenshot would be great!
I mean that you have person A and person B who are friends. Both A and B have "Show Newsfeed posts only to friends". Person A posts something on person's B newsfeed. Person C who is not a friend with either A or B can see the newsfeed message on A's or B's page that A posted to B's newsfeed. I could post a screenshot but you would not be able to see all the settings and who is a friends with whom.
hello, well i needed some help from you all.
pls tell me how can i set global privacy options of all users to "only Friends". currently default options are "everybody" i am asking to change all the option default to "only Friends" Here on link www.mysite.com/profile/privacy
pls help me, thank you.
I have already read that post but that is for album photos and I am asking for profile picture only. Also I have applied it but did not reflect ? Do I need to clear cache after change?
Friends. This display setting [everybody / only_for_me / friends_only] can be edited in version 1.7.2?
I have not had success and performed all that was said here.