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

How to change default privacy settings to ( my friends ) [solved] | Forum

Topic location: Forum home » Support » General Questions
Steve
Steve Jul 24 '14
When a user signs up I would like to change the default privacy settings from 

"everybody" to ( my friends ) is this possible.


Thanks


The Forum post is edited by Steve Jul 28 '14
ross Team
ross Jul 25 '14
see this topic please: http://www.oxwall.org/forum/topic/2912
Steve
Steve Jul 25 '14
no help -


i don't see this where to change code for photo plugin init.php


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());
//});


??


ross Team
ross Jul 27 '14
in 1.7 it is in classes/event_handler.php
Steve
Steve Jul 28 '14
yay - that worked