Delete privacy from events

I want to get rid of the privacy block on the BxEventsFormAdd.php page (see picture)

 

 

Solution By AlexT:

I would suggest to not delete this block, but replace it with hidden values, which are public by default.

To do this you need to replace the following code in modules/boonex/events/classes/BxEventsFormAdd.php file near ~388 line:

                // privacy

                'header_privacy' => array(
                    'type' => 'block_header',
                    'caption' => _t('_bx_events_form_header_privacy'),
                ),

                'allow_view_event_to' => $GLOBALS['oBxEventsModule']->_oPrivacy->getGroupChooser($iProfileId, 'events', 'view_event'),

                'allow_view_participants_to' => $aInputPrivacyViewParticipants,

                'allow_comment_to' => $aInputPrivacyComment,

                'allow_rate_to' => $aInputPrivacyRate,

                'allow_post_in_forum_to' => $aInputPrivacyForum,

                'allow_join_to' => $GLOBALS['oBxEventsModule']->_oPrivacy->getGroupChooser($iProfileId, 'events', 'join'),

                'JoinConfirmation' => array (
                    'type' => 'select',
                    'name' => 'JoinConfirmation',
                    'caption' => _t('_bx_events_form_caption_join_confirmation'),
                    'info' => _t('_bx_events_form_info_join_confirmation'),
                    'values' => array(
                        0 => _t('_bx_events_form_join_confirmation_disabled'),
                        1 => _t('_bx_events_form_join_confirmation_enabled'),
                    ),
                    'checker' => array (
                        'func' => 'int',
                        'error' => _t ('_bx_events_form_err_join_confirmation'),
                    ),
                    'db' => array (
                        'pass' => 'Int',
                    ),
                ),

                'allow_upload_photos_to' => $aInputPrivacyUploadPhotos,

                'allow_upload_videos_to' => $aInputPrivacyUploadVideos,

                'allow_upload_sounds_to' => $aInputPrivacyUploadSounds,

                'allow_upload_files_to' => $aInputPrivacyUploadFiles,

to:

                // privacy

                'allow_view_event_to' => array ('type' => 'hidden', 'name' => 'allow_view_event_to', 'value' => 3),

                'allow_view_participants_to' => array ('type' => 'hidden', 'name' => 'allow_view_participants_to', 'value' => 3),

                'allow_comment_to' => array ('type' => 'hidden', 'name' => 'allow_comment_to', 'value' => 3),

                'allow_rate_to' => array ('type' => 'hidden', 'name' => 'allow_rate_to', 'value' => 3),

                'allow_post_in_forum_to' => array ('type' => 'hidden', 'name' => 'allow_post_in_forum_to', 'value' => 3),

                'allow_join_to' => array ('type' => 'hidden', 'name' => 'allow_join_to', 'value' => 3),

                'JoinConfirmation' => array ('type' => 'hidden', 'name' => 'JoinConfirmation', 'value' => 0),

                'allow_upload_photos_to' => array ('type' => 'hidden', 'name' => 'allow_upload_photos_to', 'value' => 'p'),

                'allow_upload_videos_to' => array ('type' => 'hidden', 'name' => 'allow_upload_videos_to', 'value' => 'p'),

                'allow_upload_sounds_to' => array ('type' => 'hidden', 'name' => 'allow_upload_sounds_to', 'value' => 'p'),

                'allow_upload_files_to' => array ('type' => 'hidden', 'name' => 'allow_upload_files_to', 'value' => 'p'),
Quote · 30 Nov 2014

I would suggest to not delete this block, but replace it with hidden values, which are public by default.

To do this you need to replace the following code in modules/boonex/events/classes/BxEventsFormAdd.php file near ~388 line:

                // privacy

                'header_privacy' => array(
                    'type' => 'block_header',
                    'caption' => _t('_bx_events_form_header_privacy'),
                ),

                'allow_view_event_to' => $GLOBALS['oBxEventsModule']->_oPrivacy->getGroupChooser($iProfileId, 'events', 'view_event'),

                'allow_view_participants_to' => $aInputPrivacyViewParticipants,

                'allow_comment_to' => $aInputPrivacyComment,

                'allow_rate_to' => $aInputPrivacyRate,

                'allow_post_in_forum_to' => $aInputPrivacyForum,

                'allow_join_to' => $GLOBALS['oBxEventsModule']->_oPrivacy->getGroupChooser($iProfileId, 'events', 'join'),

                'JoinConfirmation' => array (
                    'type' => 'select',
                    'name' => 'JoinConfirmation',
                    'caption' => _t('_bx_events_form_caption_join_confirmation'),
                    'info' => _t('_bx_events_form_info_join_confirmation'),
                    'values' => array(
                        0 => _t('_bx_events_form_join_confirmation_disabled'),
                        1 => _t('_bx_events_form_join_confirmation_enabled'),
                    ),
                    'checker' => array (
                        'func' => 'int',
                        'error' => _t ('_bx_events_form_err_join_confirmation'),
                    ),
                    'db' => array (
                        'pass' => 'Int',
                    ),
                ),

                'allow_upload_photos_to' => $aInputPrivacyUploadPhotos,

                'allow_upload_videos_to' => $aInputPrivacyUploadVideos,

                'allow_upload_sounds_to' => $aInputPrivacyUploadSounds,

                'allow_upload_files_to' => $aInputPrivacyUploadFiles,

to:

                // privacy

                'allow_view_event_to' => array ('type' => 'hidden', 'name' => 'allow_view_event_to', 'value' => 3),

                'allow_view_participants_to' => array ('type' => 'hidden', 'name' => 'allow_view_participants_to', 'value' => 3),

                'allow_comment_to' => array ('type' => 'hidden', 'name' => 'allow_comment_to', 'value' => 3),

                'allow_rate_to' => array ('type' => 'hidden', 'name' => 'allow_rate_to', 'value' => 3),

                'allow_post_in_forum_to' => array ('type' => 'hidden', 'name' => 'allow_post_in_forum_to', 'value' => 3),

                'allow_join_to' => array ('type' => 'hidden', 'name' => 'allow_join_to', 'value' => 3),

                'JoinConfirmation' => array ('type' => 'hidden', 'name' => 'JoinConfirmation', 'value' => 0),

                'allow_upload_photos_to' => array ('type' => 'hidden', 'name' => 'allow_upload_photos_to', 'value' => 'p'),

                'allow_upload_videos_to' => array ('type' => 'hidden', 'name' => 'allow_upload_videos_to', 'value' => 'p'),

                'allow_upload_sounds_to' => array ('type' => 'hidden', 'name' => 'allow_upload_sounds_to', 'value' => 'p'),

                'allow_upload_files_to' => array ('type' => 'hidden', 'name' => 'allow_upload_files_to', 'value' => 'p'),
Rules → http://www.boonex.com/terms
Quote · 1 Dec 2014

Hi Alex,

 

Thanks for that explanation, I did as you suggested, but still the option "Allow joining by membership" is shown on the page. And that's exactly the one I was struggling with to have it disappeared.

Quote · 1 Dec 2014

My answer was too fast ...

 

I also changed next :

 

'EventMembershipFilter' => array(

                    'type' => 'hidden',

                    'name' => 'EventMembershipFilter',

                    'caption' => _t('_bx_events_caption_membership_filter'),

                    'info' => _t('_bx_events_info_membership_filter'),

                    'values' => $aMemberships,

                    'value' => '',

                    'checker' => array (

                        'func' => 'preg',

                        'params' => array('/^[0-9a-zA-Z]*$/'),

                        'error' => _t ('_bx_events_err_membership_filter'),

 

Thanks for your support !

Quote · 1 Dec 2014

"Allow joining by membership" is for admins only, it isn't displayed regular users.

Thanks for that explanation, I did as you suggested, but still the option "Allow joining by membership" is shown on the page. And that's exactly the one I was struggling with to have it disappeared.

 

Rules → http://www.boonex.com/terms
Quote · 8 Dec 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.