Ejemplo n.º 1
0
 public function init()
 {
     parent::init();
     // My stuff
     //$this->setTitle('Member Level Settings')->setDescription("BANMEMBERS_FORM_ADMIN_LEVEL_DESCRIPTION");
     if (!$this->isPublic()) {
         //  Element: Manage Banned
         $this->addElement('Radio', 'manage', array('label' => 'Allow manage baned Users/IPs?', 'description' => 'Do you want to let members view and manage banned Users/IPs?', 'multiOptions' => array(1 => 'Yes', 0 => 'No'), 'value' => $this->isModerator() ? 1 : 0));
         //  Element: Ban
         $this->addElement('Radio', 'add', array('label' => 'Allow banning Users/Ip?', 'multiOptions' => array(1 => 'Yes', 0 => 'No'), 'value' => $this->isModerator() ? 1 : 0));
         // Element: Extra information
         $this->addElement('Radio', 'view_extra', array('label' => 'Allow viewing the extra profile information?', 'description' => 'Do you want to let members view the extra information of user (user ID, email,... )?', 'multiOptions' => array(1 => 'Yes, allow viewing.', 0 => 'No, do not allow this information to be viewed.'), 'value' => $this->isModerator() ? 1 : 0));
         // Element: Delete
         $this->addElement('Radio', 'delete', array('label' => 'Allow deleting user?', 'description' => 'Do you want to let members delete the other user?.', 'multiOptions' => array(1 => 'Yes, allow deleting.', 0 => 'No, do not allow.'), 'value' => $this->isModerator() ? 1 : 0));
         // Element: login as another user
         $this->addElement('Radio', 'login', array('label' => 'Allow the member to log in as another user?', 'description' => 'Do you want to let members to log in as another user?.', 'multiOptions' => array(1 => 'Yes', 0 => 'No'), 'value' => $this->isModerator() ? 1 : 0));
         // Element: view user's notes
         $this->addElement('Radio', 'note', array('label' => 'Allow viewing and adding notes for users when viewing their profiles?', 'description' => 'Do you want to let members view and add notes for another users when viewing their profiles?', 'multiOptions' => array(1 => 'Yes', 0 => 'No'), 'value' => $this->isModerator() ? 1 : 0));
         // Element: action button
         $this->addElement('Radio', 'action', array('label' => 'Allow issuing a "Notice", "Warning" or "Infraction" to the user.', 'description' => 'Do you want to let members to issue a "Notice", "Warning" or "Infraction" to the user?', 'multiOptions' => array(1 => 'Yes', 0 => 'No'), 'value' => $this->isModerator() ? 1 : 0));
         // Element: remove
         $this->addElement('Radio', 'remove', array('label' => 'Allow deleting a "Notice", "Warning" or "Infraction"', 'description' => 'Do you want to let members delete a "Notice", "Warning" or "Infraction"?', 'multiOptions' => array(1 => 'Yes', 0 => 'No'), 'value' => $this->isModerator() ? 1 : 0));
         $this->addElement('Radio', 'manage_user', array('label' => 'Allow member manage users', 'description' => 'Do you want to let members manage users?', 'multiOptions' => array(1 => 'Yes', 0 => 'No'), 'value' => $this->isModerator() ? 1 : 0));
     }
 }
Ejemplo n.º 2
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription('POLL_FORM_ADMIN_LEVEL_DESCRIPTION');
     // Element: view
     $this->addElement('Radio', 'view', array('label' => 'Allow Viewing of Polls?', 'description' => 'POLL_FORM_ADMIN_LEVEL_VIEW_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow viewing of all polls, even private ones.', 1 => 'Yes, allow viewing of polls.', 0 => 'No, do not allow polls to be viewed.'), 'value' => $this->isModerator() ? 2 : 1));
     if (!$this->isModerator()) {
         unset($this->view->options[2]);
     }
     if (!$this->isPublic()) {
         // Element: create
         $this->addElement('Radio', 'create', array('label' => 'Allow Polls?', 'description' => 'Do you want to allow members to create polls?', 'multiOptions' => array(1 => 'Yes, allow this member level to create polls', 0 => 'No, do not allow this member level to create polls'), 'value' => 1));
         // Element: edit
         $this->addElement('Radio', 'edit', array('label' => 'Allow Editing of Polls?', 'description' => 'Do you want to let members edit polls? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow members to edit all polls.', 1 => 'Yes, allow members to edit their own polls.', 0 => 'No, do not allow members to edit their polls.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->edit->options[2]);
         }
         // Element: delete
         $this->addElement('Radio', 'delete', array('label' => 'Allow Deletion of Polls?', 'description' => 'POLL_FORM_ADMIN_LEVEL_DELETE_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow members to delete all polls.', 1 => 'Yes, allow members to delete their own polls.', 0 => 'No, do not allow members to delete their polls.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->delete->options[2]);
         }
         // Element: comment
         $this->addElement('Radio', 'comment', array('label' => 'Allow Commenting on Polls?', 'description' => 'Do you want to let members of this level comment on polls?', 'multiOptions' => array(2 => 'Yes, allow members to comment on all polls, including private ones.', 1 => 'Yes, allow members to comment on polls.', 0 => 'No, do not allow members to comment on polls.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->comment->options[2]);
         }
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Poll Privacy', 'description' => 'POLL_FORM_ADMIN_LEVEL_AUTHVIEW_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'All Registered Members', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Element: auth_comment
         $this->addElement('MultiCheckbox', 'auth_comment', array('label' => 'Poll Comment Options', 'description' => 'POLL_FORM_ADMIN_LEVEL_AUTHCOMMENT_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'All Registered Members', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
     }
 }
Ejemplo n.º 3
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription("AUTHORIZATION_FORM_ADMIN_LEVEL_EDIT_DESCRIPTION");
     $this->addElement('Text', 'title', array('label' => 'Title', 'allowEmpty' => false, 'required' => true));
     /*
     $this->addElement('Textarea', 'description', array(
       'label' => 'Description',
       'allowEmpty' => true,
       'required' => false,
     ));
     */
     if (!$this->isPublic()) {
         // Element: edit
         if ($this->isModerator()) {
             $this->addElement('Radio', 'edit', array('label' => 'Allow Profile Moderation', 'required' => true, 'multiOptions' => array(2 => 'Yes, allow members in this level to edit other profiles and settings.', 1 => 'No, do not allow moderation.'), 'value' => 0));
         }
         // Element: style
         $this->addElement('Radio', 'style', array('label' => 'Allow Profile Style', 'required' => true, 'multiOptions' => array(2 => 'Yes, allow members in this level to edit other custom profile styles.', 1 => 'Yes, allow custom profile styles.', 0 => 'No, do not allow custom profile styles.'), 'value' => 1));
         if (!$this->isModerator()) {
             unset($this->getElement('style')->options[2]);
         }
         // Element: delete
         $this->addElement('Radio', 'delete', array('label' => 'Allow Account Deletion?', 'multiOptions' => array(2 => 'Yes, allow members in this level to delete other users.', 1 => 'Yes, allow members to delete their account.', 0 => 'No, do not allow account deletion.'), 'value' => 1));
         if (!$this->isModerator()) {
             unset($this->getElement('delete')->options[2]);
         }
         $this->delete->getDecorator('Description')->setOption('placement', 'PREPEND');
         // Element: activity
         if ($this->isModerator()) {
             $this->addElement('Radio', 'activity', array('label' => 'Allow Activity Feed Moderation', 'required' => true, 'multiOptions' => array(1 => 'Yes, allow members in this level to delete any feed item.', 0 => 'No, do not allow moderation.'), 'value' => 0));
         }
         // Element: block
         $this->addElement('Radio', 'block', array('label' => 'Allow Blocking?', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_BLOCK_DESCRIPTION', 'multiOptions' => array(1 => 'Yes', 0 => 'No')));
         $this->block->getDecorator('Description')->setOption('placement', 'PREPEND');
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Profile Viewing Options', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_AUTHVIEW_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'All Registered Members', 'network' => 'My Network', 'member' => 'My Friends', 'owner' => 'Only Me')));
         $this->auth_view->getDecorator('Description')->setOption('placement', 'PREPEND');
         // Element: auth_comment
         $this->addElement('MultiCheckbox', 'auth_comment', array('label' => 'Profile Commenting Options', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_AUTHCOMMENT_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'All Registered Members', 'network' => 'My Network', 'member' => 'My Friends', 'owner' => 'Only Me')));
         $this->auth_comment->getDecorator('Description')->setOption('placement', 'PREPEND');
         // Element: search
         $this->addElement('Radio', 'search', array('label' => 'Search Privacy Options', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_SEARCH_DESCRIPTION', 'multiOptions' => array(1 => 'Yes', 0 => 'No')));
         $this->search->getDecorator('Description')->setOption('placement', 'PREPEND');
         // Element: status
         $this->addElement('Radio', 'status', array('label' => 'Allow status messages?', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_STATUS_DESCRIPTION', 'multiOptions' => array(1 => 'Yes', 0 => 'No')));
         // Element: username
         $this->addElement('Radio', 'username', array('label' => 'Allow username changes?', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_USERNAME_DESCRIPTION', 'multiOptions' => array(1 => 'Yes', 0 => 'No')));
         $this->username->getDecorator('Description')->setOption('placement', 'PREPEND');
         // Element: quota
         $this->addElement('Select', 'quota', array('label' => 'Storage Quota', 'required' => true, 'multiOptions' => Engine_Api::_()->getApi('storage', 'storage')->getStorageLimits(), 'value' => 0, 'description' => 'CORE_FORM_ADMIN_SETTINGS_GENERAL_QUOTA_DESCRIPTION'));
         // Element: commenthtml
         $this->addElement('Text', 'commenthtml', array('label' => 'Allow HTML in Comments?', 'description' => 'CORE_FORM_ADMIN_SETTINGS_GENERAL_COMMENTHTML_DESCRIPTION'));
     }
 }
Ejemplo n.º 4
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription('MUSIC_FORM_ADMIN_LEVEL_DESCRIPTION');
     // Element: view
     $this->addElement('Radio', 'view', array('label' => 'Allow Viewing of Playlists?', 'description' => 'MUSIC_FORM_ADMIN_LEVEL_VIEW_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow viewing of all playlists, even private ones.', 1 => 'Yes, allow viewing of playlists.', 0 => 'No, do not allow playlists to be viewed.'), 'value' => $this->isModerator() ? 2 : 1));
     if (!$this->isModerator()) {
         unset($this->view->options[2]);
     }
     if (!$this->isPublic()) {
         // Element: create
         $this->addElement('Radio', 'create', array('label' => 'Allow Music?', 'description' => 'Do you want to allow users to upload music to their profile?', 'multiOptions' => array(1 => 'Yes, allow this member level to create playlists', 0 => 'No, do not allow this member level to create playlists'), 'value' => 1));
         // Element: edit
         $this->addElement('Radio', 'edit', array('label' => 'Allow Editing of Playlists?', 'description' => 'MUSIC_FORM_ADMIN_LEVEL_EDIT_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow members to edit all playlists.', 1 => 'Yes, allow members to edit their own playlists.', 0 => 'No, do not allow members to edit their playlists.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->edit->options[2]);
         }
         // Element: delete
         $this->addElement('Radio', 'delete', array('label' => 'Allow Deletion of Playlists?', 'description' => 'MUSIC_FORM_ADMIN_LEVEL_DELETE_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow members to delete all playlists.', 1 => 'Yes, allow members to delete their own playlists.', 0 => 'No, do not allow members to delete their playlists.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->delete->options[2]);
         }
         // Element: comment
         $this->addElement('Radio', 'comment', array('label' => 'Allow Commenting on Playlists?', 'description' => 'Do you want to let members of this level comment on playlists?', 'multiOptions' => array(2 => 'Yes, allow members to comment on all playlists, including private ones.', 1 => 'Yes, allow members to comment on playlists.', 0 => 'No, do not allow members to comment on playlists.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->comment->options[2]);
         }
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Playlist Privacy', 'description' => 'MUSIC_FORM_ADMIN_LEVEL_AUTHVIEW_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'All Registered Members', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Element: auth_comment
         $this->addElement('MultiCheckbox', 'auth_comment', array('label' => 'Playlist Comment Options', 'description' => 'MUSIC_FORM_ADMIN_LEVEL_AUTHCOMMENT_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'All Registered Members', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
     }
     /*
     $this->addElement('Text', 'max_songs', array(
       'label' => 'Maximum Allowed Songs',
       'description' => 'MUSIC_FORM_ADMIN_LEVEL_MAXSONGS_DESCRIPTION',
       'value' => $settings->getSetting("music.maxSongsDefault", 30),
     ));
     
     $this->addElement('Text', 'max_filesize', array(
       'label' => 'Maximum Allowed Filesize',
       'description' => 'MUSIC_FORM_ADMIN_LEVEL_MAXFILESIZE_DESCRIPTION',
       'value' => $settings->getSetting("music.maxFilesizeDefault", 10000),
     ));
     
     $this->addElement('Text', 'max_storage', array(
       'label' => 'Maximum Allowed Storage',
       'description' => 'How much storage space in KB should each user have to store their files?',
       'value' => $settings->getSetting("music.maxStorageDefault", 100000),
     ));
     */
 }
Ejemplo n.º 5
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription('These settings are applied on a per member level basis. Start by selecting the member level you want to modify, then adjust the settings for that level below.');
     if (!$this->isPublic()) {
         // Element: max
         $this->addElement('Text', 'max_player_card', array('label' => 'Maximum Allowed Player Cards', 'description' => 'Enter the maximum number of allowed player cards. The field must contain an integer.', 'validators' => array(array('Int', true), new Engine_Validate_AtLeast(0))));
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Player Card Privacy', 'description' => 'Your members can choose from any of the options checked below when they decide who can see their player card. If you do not check any options, settings will default to the last saved configuration. If you select only one option, members of this level will not have a choice.', 'multiOptions' => array('everyone' => 'Everyone', 'owner_network' => 'Followers and Networks', 'owner_member' => 'My Followers', 'owner' => 'Only Me'), 'value' => array('everyone', 'owner_network', 'owner_member', 'owner')));
     }
 }
Ejemplo n.º 6
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription('These settings are applied on a per member level basis. Start by selecting the member level you want to modify, then adjust the settings for that level below.');
     if (!$this->isPublic()) {
         // Element: max
         $this->addElement('Text', 'max_referral', array('label' => 'Number of referral codes', 'description' => 'Enter the maximum number of allowed referral codes. The field must contain an integer, use zero for unlimited.', 'validators' => array(array('Int', true), new Engine_Validate_AtLeast(0)), 'value' => 5));
     }
     // Element: view
     $this->addElement('Radio', 'allow_referral', array('label' => 'Allow Referral Code Generation?', 'description' => 'Do you want to have access to Referral Code Generation?', 'multiOptions' => array(1 => 'Yes, allow to have access.', 0 => 'No, do not allow to have access.'), 'value' => 1));
 }
Ejemplo n.º 7
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription('These settings are applied on a per member level basis. Start by selecting the member level you want to modify, then adjust the settings for that level below.');
     // Element: view
     $this->addElement('Radio', 'view', array('label' => 'Allow Viewing of Libraries?', 'description' => 'Do you want to let members view libraries? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow viewing of all libraries, even private ones.', 1 => 'Yes, allow viewing of libraries.', 0 => 'No, do not allow libraries to be viewed.'), 'value' => $this->isModerator() ? 2 : 1));
     if (!$this->isModerator()) {
         unset($this->view->options[2]);
     }
     if (!$this->isPublic()) {
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Libraries Privacy', 'description' => 'Your members can choose from any of the options checked below when they decide who can see their library. If you do not check any options, settings will default to the last saved configuration. If you select only one option, members of this level will not have a choice.', 'multiOptions' => array('everyone' => 'Everyone', 'owner_network' => 'Followers and Networks', 'owner_member' => 'My Followers', 'owner' => 'Only Me'), 'value' => array('everyone', 'owner_network', 'owner_member', 'owner')));
     }
 }
Ejemplo n.º 8
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription('EVENT_FORM_ADMIN_LEVEL_DESCRIPTION');
     // Element: view
     $this->addElement('Radio', 'view', array('label' => 'Allow Viewing of Events?', 'description' => 'EVENT_FORM_ADMIN_LEVEL_VIEW_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow members to view all events, even private ones.', 1 => 'Yes, allow viewing and subscription of photo events.', 0 => 'No, do not allow photo events to be viewed.'), 'value' => $this->isModerator() ? 2 : 1));
     if (!$this->isModerator()) {
         unset($this->view->options[2]);
     }
     if (!$this->isPublic()) {
         // Element: create
         $this->addElement('Radio', 'create', array('label' => 'Allow Creation of Events?', 'description' => 'EVENT_FORM_ADMIN_LEVEL_CREATE_DESCRIPTION', 'multiOptions' => array(1 => 'Yes, allow creation of events.', 0 => 'No, do not allow events to be created.'), 'value' => 1));
         // Element: edit
         $this->addElement('Radio', 'edit', array('label' => 'Allow Editing of Events?', 'description' => 'Do you want to let members edit and delete events?', 'multiOptions' => array(2 => "Yes, allow members to edit everyone's events.", 1 => "Yes, allow  members to edit their own events.", 0 => "No, do not allow events to be edited."), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->edit->options[2]);
         }
         // Element: delete
         $this->addElement('Radio', 'delete', array('label' => 'Allow Deletion of Events?', 'description' => 'Do you want to let members delete events? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow members to delete all events.', 1 => 'Yes, allow members to delete their own events.', 0 => 'No, do not allow members to delete their events.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->delete->options[2]);
         }
         // Element: comment
         $this->addElement('Radio', 'comment', array('label' => 'Allow Commenting on Events?', 'description' => 'Do you want to let members of this level comment on events?', 'multiOptions' => array(2 => 'Yes, allow members to comment on all events, including private ones.', 1 => 'Yes, allow members to comment on events.', 0 => 'No, do not allow members to comment on events.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->comment->options[2]);
         }
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Event Privacy', 'description' => 'EVENT_FORM_ADMIN_LEVEL_AUTHVIEW_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'Registered Members', 'owner_network' => 'Followers and Networks (user events only)', 'owner_member_member' => 'Followers of Followers (user events only)', 'owner_member' => 'Followers Only (user events only)', 'parent_member' => 'Club Members (club events only)', 'member' => "Event Guests Only")));
         // Element: auth_comment
         $this->addElement('MultiCheckbox', 'auth_comment', array('label' => 'Event Posting Options', 'description' => 'EVENT_FORM_ADMIN_LEVEL_AUTHCOMMENT_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'owner_network' => 'Followers and Networks (user events only)', 'owner_member_member' => 'Followers of Followers (user events only)', 'owner_member' => 'Followers Only (user events only)', 'parent_member' => 'Club Members (club events only)', 'member' => "Event Guests Only", 'leader' => "Owner and Leader", 'owner' => 'Just Me')));
         /*
         $this->addElement('Radio', 'style', array(
           'label' => 'Allow Profile Style',
           'required' => true,
           'multiOptions' => array(
             1 => 'Yes, allow custom profile styles.',
             0 => 'No, do not allow custom profile styles.'
           ),
           'value' => 1
         ));
         */
     }
 }
Ejemplo n.º 9
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription('FORUM_FORM_ADMIN_LEVEL_DESCRIPTION');
     // Element: view
     $this->addElement('Radio', 'view', array('label' => 'Allow Viewing of Forums?', 'description' => 'FORUM_FORM_ADMIN_LEVEL_VIEW_DESCRIPTION', 'value' => 1, 'multiOptions' => array(2 => 'Yes, allow viewing and subscription of forums, even private ones.', 1 => 'Yes, allow viewing and subscription of forums.', 0 => 'No, do not allow forums to be viewed or subscribed to.'), 'value' => $this->isModerator() ? 2 : 1));
     if (!$this->isModerator()) {
         unset($this->view->options[2]);
     }
     if (!$this->isPublic()) {
         // Element: topic_create
         $this->addElement('Radio', 'topic_create', array('label' => 'Allow Creation of Topics?', 'description' => 'FORUM_FORM_ADMIN_LEVEL_TOPIC_CREATE_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow creation of topics in forums, even private ones.', 1 => 'Yes, allow creation of topics.', 0 => 'No, do not allow topics to be created.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->topic_create->options[2]);
         }
         // Element: topic_edit
         $this->addElement('Radio', 'topic_edit', array('label' => 'Allow Editing of Topics?', 'description' => 'FORUM_FORM_ADMIN_LEVEL_TOPIC_EDIT_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow editing of topics in forums, including other members\' topics.', 1 => 'Yes, allow editing of topics.', 0 => 'No, do not allow topics to be edited.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->topic_edit->options[2]);
         }
         // Element: topic_edit
         $this->addElement('Radio', 'topic_delete', array('label' => 'Allow Deletion of Topics?', 'description' => 'FORUM_FORM_ADMIN_LEVEL_TOPIC_DELETE_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow deletion of topics in forums, including other members\' topics.', 1 => 'Yes, allow deletion of topics.', 0 => 'No, do not allow topics to be deleted.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->topic_delete->options[2]);
         }
         // Element: post_create
         $this->addElement('Radio', 'post_create', array('label' => 'Allow Posting?', 'description' => 'FORUM_FORM_ADMIN_LEVEL_POST_CREATE_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow posting to forums, even private ones.', 1 => 'Yes, allow posting to forums.', 0 => 'No, do not allow forum posts.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->post_create->options[2]);
         }
         // Element: post_edit
         $this->addElement('Radio', 'post_edit', array('label' => 'Allow Editing of Posts?', 'description' => 'FORUM_FORM_ADMIN_LEVEL_POST_EDIT_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow editing of posts, including other members\' posts.', 1 => 'Yes, allow editing of posts.', 0 => 'No, do not allow forum posts to be edited.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->post_edit->options[2]);
         }
         // Element: post_edit
         $this->addElement('Radio', 'post_delete', array('label' => 'Allow Deletion of Posts?', 'description' => 'FORUM_FORM_ADMIN_LEVEL_POST_EDIT_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow deletion of posts, including other members\' posts.', 1 => 'Yes, allow deletion of posts.', 0 => 'No, do not allow forum posts to be deleted.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->post_delete->options[2]);
         }
         // Element: commentHtml
         $this->addElement('Text', 'commentHtml', array('label' => 'Allow HTML in posts?', 'description' => 'FORUM_FORM_ADMIN_LEVEL_CONTENTHTML_DESCRIPTION'));
     }
 }
Ejemplo n.º 10
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription('GROUP_FORM_ADMIN_LEVEL_DESCRIPTION');
     // Element: view
     $this->addElement('Radio', 'view', array('label' => 'Allow Viewing of Groups?', 'description' => 'GROUP_FORM_ADMIN_LEVEL_VIEW_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow members to view all groups, even private ones.', 1 => 'Yes, allow viewing and subscription of groups.', 0 => 'No, do not allow groups to be viewed.'), 'value' => $this->isModerator() ? 2 : 1));
     if (!$this->isModerator()) {
         unset($this->view->options[2]);
     }
     if (!$this->isPublic()) {
         // Element: create
         $this->addElement('Radio', 'create', array('label' => 'Allow Creation of Groups?', 'description' => 'GROUP_FORM_ADMIN_LEVEL_CREATE_DESCRIPTION', 'multiOptions' => array(1 => 'Yes, allow creation of groups.', 0 => 'No, do not allow groups to be created.'), 'value' => 1));
         // Element: edit
         $this->addElement('Radio', 'edit', array('label' => 'Allow Editing of Groups?', 'description' => 'Do you want to let users edit and delete groups?', 'multiOptions' => array(2 => 'Yes, allow members to edit everyone\'s groups.', 1 => 'Yes, allow  members to edit their own groups.', 0 => 'No, do not allow groups to be edited.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->edit->options[2]);
         }
         // Element: delete
         $this->addElement('Radio', 'delete', array('label' => 'Allow Deletion of Groups?', 'description' => 'Do you want to let members delete groups? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow members to delete all groups.', 1 => 'Yes, allow members to delete their own groups.', 0 => 'No, do not allow members to delete their groups.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->delete->options[2]);
         }
         // Element: comment
         $this->addElement('Radio', 'comment', array('label' => 'Allow Commenting on Groups?', 'description' => 'Do you want to let members of this level comment on groups?', 'multiOptions' => array(2 => 'Yes, allow members to comment on all groups, including private ones.', 1 => 'Yes, allow members to comment on groups.', 0 => 'No, do not allow members to comment on groups.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->comment->options[2]);
         }
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Group Privacy', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHVIEW_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'Registered Members', 'member' => 'Members Only')));
         // Element: auth_comment
         $this->addElement('MultiCheckbox', 'auth_comment', array('label' => 'Group Posting Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHCOMMENT_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_photo
         $this->addElement('MultiCheckbox', 'auth_photo', array('label' => 'Photo Upload Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHPHOTO_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_event
         $this->addElement('MultiCheckbox', 'auth_event', array('label' => 'Event Creation Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHEVENT_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: style
         $this->addElement('Radio', 'style', array('label' => 'Allow Group Style', 'required' => true, 'multiOptions' => array(1 => 'Yes, allow custom group styles.', 0 => 'No, do not allow custom group styles.'), 'value' => 1));
     }
     // Element: commentHtml
     $this->addElement('Text', 'commentHtml', array('label' => 'Allow HTML in posts?', 'description' => 'GROUP_FORM_ADMIN_LEVEL_CONTENTHTML_DESCRIPTION'));
 }
Ejemplo n.º 11
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription("BLOG_FORM_ADMIN_LEVEL_DESCRIPTION");
     // Element: view
     $this->addElement('Radio', 'view', array('label' => 'Allow Viewing of Blogs?', 'description' => 'Do you want to let members view blogs? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow viewing of all blogs, even private ones.', 1 => 'Yes, allow viewing of blogs.', 0 => 'No, do not allow blogs to be viewed.'), 'value' => $this->isModerator() ? 2 : 1));
     if (!$this->isModerator()) {
         unset($this->view->options[2]);
     }
     if (!$this->isPublic()) {
         // Element: create
         $this->addElement('Radio', 'create', array('label' => 'Allow Creation of Blogs?', 'description' => 'Do you want to let members create blogs? If set to no, some other settings on this page may not apply. This is useful if you want members to be able to view blogs, but only want certain levels to be able to create blogs.', 'multiOptions' => array(1 => 'Yes, allow creation of blogs.', 0 => 'No, do not allow blogs to be created.'), 'value' => 1));
         // Element: edit
         $this->addElement('Radio', 'edit', array('label' => 'Allow Editing of Blogs?', 'description' => 'Do you want to let members edit blogs? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow members to edit all blogs.', 1 => 'Yes, allow members to edit their own blogs.', 0 => 'No, do not allow members to edit their blogs.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->edit->options[2]);
         }
         // Element: delete
         $this->addElement('Radio', 'delete', array('label' => 'Allow Deletion of Blogs?', 'description' => 'Do you want to let members delete blogs? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow members to delete all blogs.', 1 => 'Yes, allow members to delete their own blogs.', 0 => 'No, do not allow members to delete their blogs.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->delete->options[2]);
         }
         // Element: comment
         $this->addElement('Radio', 'comment', array('label' => 'Allow Commenting on Blogs?', 'description' => 'Do you want to let members of this level comment on blogs?', 'multiOptions' => array(2 => 'Yes, allow members to comment on all blogs, including private ones.', 1 => 'Yes, allow members to comment on blogs.', 0 => 'No, do not allow members to comment on blogs.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->comment->options[2]);
         }
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Blog Entry Privacy', 'description' => 'Your members can choose from any of the options checked below when they decide who can see their blog entries. These options appear on your members\' "Add Entry" and "Edit Entry" pages. If you do not check any options, settings will default to the last saved configuration. If you select only one option, members of this level will not have a choice.', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'All Registered Members', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Element: auth_comment
         $this->addElement('MultiCheckbox', 'auth_comment', array('label' => 'Blog Comment Options', 'description' => 'Your members can choose from any of the options checked below when they decide who can post comments on their entries. If you do not check any options, settings will default to the last saved configuration. If you select only one option, members of this level will not have a choice.', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'All Registered Members', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Element: style
         $this->addElement('Radio', 'style', array('label' => 'Allow Custom CSS Styles?', 'description' => 'If you enable this feature, your members will be able to customize the colors and fonts of their blogs by altering their CSS styles.', 'multiOptions' => array(1 => 'Yes, enable custom CSS styles.', 0 => 'No, disable custom CSS styles.'), 'value' => 1));
         // Element: auth_html
         $this->addElement('Text', 'auth_html', array('label' => 'HTML in Blog Entries?', 'description' => 'If you want to allow specific HTML tags, you can enter them below (separated by commas). Example: b, img, a, embed, font', 'value' => 'strong, b, em, i, u, strike, sub, sup, p, div, pre, address, h1, h2, h3, h4, h5, h6, span, ol, li, ul, a, img, embed, br, hr'));
         // Element: max
         $this->addElement('Text', 'max', array('label' => 'Maximum Allowed Blog Entries?', 'description' => 'Enter the maximum number of allowed blog entries. The field must contain an integer between 1 and 999, or 0 for unlimited.', 'validators' => array(array('Int', true), new Engine_Validate_AtLeast(0))));
     }
 }
Ejemplo n.º 12
0
 public function init()
 {
     parent::init();
     // Form title and description
     $this->setTitle('Member Level Settings')->setDescription("BLOG_FORM_ADMIN_LEVEL_DESCRIPTION");
     // View Settings
     $this->addElement('Radio', 'view', array('label' => 'Allow Viewing of Blogs?', 'description' => 'Do you want to let members view blogs? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow viewing of all blogs, even private ones.', 1 => 'Yes, allow viewing of blogs.', 0 => 'No, do not allow blogs to be viewed.'), 'value' => $this->isModerator() ? 2 : 1));
     if (!$this->isModerator()) {
         unset($this->view->options[2]);
     }
     if (!$this->isPublic()) {
         // Create Settings
         $this->addElement('Radio', 'create', array('label' => 'Allow Creation of Blogs?', 'description' => 'Do you want to let members create blogs? If set to no, some other settings on this page may not apply. This is useful if you want members to be able to view blogs, but only want certain levels to be able to create blogs.', 'multiOptions' => array(1 => 'Yes, allow creation of blogs.', 0 => 'No, do not allow blogs to be created.'), 'value' => 1));
         // Edit Settings
         $this->addElement('Radio', 'edit', array('label' => 'Allow Editing of Blogs?', 'description' => 'Do you want to let members edit blogs? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow members to edit all blogs.', 1 => 'Yes, allow members to edit their own blogs.', 0 => 'No, do not allow members to edit their blogs.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->edit->options[2]);
         }
         // Delete Settings
         $this->addElement('Radio', 'delete', array('label' => 'Allow Deletion of Blogs?', 'description' => 'Do you want to let members delete blogs? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow members to delete all blogs.', 1 => 'Yes, allow members to delete their own blogs.', 0 => 'No, do not allow members to delete their blogs.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->delete->options[2]);
         }
         // Comment Settings
         $this->addElement('Radio', 'comment', array('label' => 'Allow Commenting on Blogs?', 'description' => 'Do you want to let members of this level comment on blogs?', 'multiOptions' => array(2 => 'Yes, allow members to comment on all blogs, including private ones.', 1 => 'Yes, allow members to comment on blogs.', 0 => 'No, do not allow members to comment on blogs.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->comment->options[2]);
         }
         // View Privacy
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Blog Entry Privacy', 'description' => 'Your members can choose from any of the options checked below when they decide who can see their blog entries. These options appear on your members\' "Add Entry" and "Edit Entry" pages. If you do not check any options, everyone will be allowed to view blogs.', 'multiOptions' => array('everyone' => 'Everyone', 'owner_network' => 'Followers and Networks', 'owner_member_member' => 'Followers of Followers', 'owner_member' => 'My Followers', 'owner' => 'Only Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Comment Privacy
         $this->addElement('MultiCheckbox', 'auth_comment', array('label' => 'Blog Comment Options', 'description' => 'Your members can choose from any of the options checked below when they decide who can post comments on their entries. If you do not check any options, everyone will be allowed to post comments on entries.', 'multiOptions' => array('everyone' => 'Everyone', 'owner_network' => 'Followers and Networks', 'owner_member_member' => 'Followers of Followers', 'owner_member' => 'My Followers', 'owner' => 'Only Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Element: style
         $this->addElement('Radio', 'style', array('label' => 'Allow Custom CSS Styles?', 'description' => 'If you enable this feature, your members will be able to customize the colors and fonts of their blogs by altering their CSS styles.', 'multiOptions' => array(1 => 'Yes, enable custom CSS styles.', 0 => 'No, disable custom CSS styles.'), 'value' => 1));
         // HTML Allowed Tags
         $this->addElement('Text', 'auth_html', array('label' => 'HTML in Blog Entries?', 'description' => 'If you want to allow specific HTML tags, you can enter them below (separated by commas). Example: b, img, a, embed, font', 'value' => 'strong, b, em, i, u, strike, sub, sup, p, div, pre, address, h1, h2, h3, h4, h5, h6, span, ol, li, ul, a, img, embed, br, hr'));
         // Maximum Blogs Number
         $this->addElement('Text', 'max', array('label' => 'Maximum Allowed Blog Entries?', 'description' => 'Enter the maximum number of allowed blog entries. The field must contain an integer between 1 and 1000, or 0 for unlimited.', 'required' => true, 'onKeyPress' => "return checkIt(event)", 'maxlength' => '4', 'value' => 0, 'validators' => array(array('Int', true), array('Between', true, array(0, 1000, true)))));
     }
 }
Ejemplo n.º 13
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription('ALBUM_FORM_ADMIN_LEVEL_DESCRIPTION');
     // Element: view
     $this->addElement('Radio', 'view', array('label' => 'Allow Viewing of Photo Albums?', 'description' => 'ALBUM_FORM_ADMIN_LEVEL_VIEW_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow members to view all albums, even private ones.', 1 => 'Yes, allow viewing and subscription of photo albums.', 0 => 'No, do not allow photo albums to be viewed.'), 'value' => $this->isModerator() ? 2 : 1));
     if (!$this->isModerator()) {
         unset($this->view->options[2]);
     }
     if (!$this->isPublic()) {
         // Element: create
         $this->addElement('Radio', 'create', array('label' => 'Allow Creation of Photo Albums?', 'description' => 'ALBUM_FORM_ADMIN_LEVEL_CREATE_DESCRIPTION', 'value' => 1, 'multiOptions' => array(1 => 'Yes, allow creation of photo albums.', 0 => 'No, do not allow photo album to be created.'), 'value' => 1));
         // Element: edit
         $this->addElement('Radio', 'edit', array('label' => 'Allow Editing of Photo Albums?', 'description' => 'Do you want to let members of this level edit photo albums?', 'multiOptions' => array(2 => 'Yes, allow members to edit all albums.', 1 => 'Yes, allow members to edit their own albums.', 0 => 'No, do not allow photo albums to be edited.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->edit->options[2]);
         }
         // Element: delete
         $this->addElement('Radio', 'delete', array('label' => 'Allow Deletion of Photo Albums?', 'description' => 'Do you want to let members of this level delete photo albums?', 'multiOptions' => array(2 => 'Yes, allow members to delete all photo albums.', 1 => 'Yes, allow members to delete their own photo albums.', 0 => 'No, do not allow members to delete their photo albums.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->delete->options[2]);
         }
         // Element: comment
         $this->addElement('Radio', 'comment', array('label' => 'Allow Commenting on Photo Albums?', 'description' => 'Do you want to let members of this level comment on photo albums?', 'multiOptions' => array(2 => 'Yes, allow members to comment on all photo albums, including private ones.', 1 => 'Yes, allow members to comment on albums.', 0 => 'No, do not allow members to comment on photo albums.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->comment->options[2]);
         }
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Album Privacy', 'description' => 'ALBUM_FORM_ADMIN_LEVEL_AUTHVIEW_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Element: auth_comment
         $this->addElement('MultiCheckbox', 'auth_comment', array('label' => 'Album Comment Options', 'description' => 'ALBUM_FORM_ADMIN_LEVEL_AUTHCOMMENT_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Element: auth_add_photo
         $this->addElement('MultiCheckbox', 'auth_add_photo', array('label' => 'Album Add Photo Options', 'description' => 'ALBUM_FORM_ADMIN_LEVEL_AUTHADDPHOTO_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Element: auth_tag
         $this->addElement('MultiCheckbox', 'auth_tag', array('label' => 'Album Tag Options', 'description' => 'ALBUM_FORM_ADMIN_LEVEL_AUTHTAG_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
     }
 }
Ejemplo n.º 14
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription("CLASSIFIED_FORM_ADMIN_LEVEL_DESCRIPTION");
     // Element: view
     $this->addElement('Radio', 'view', array('label' => 'Allow Viewing of Classifieds?', 'description' => 'Do you want to let members view classifieds? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow viewing of all classifieds, even private ones.', 1 => 'Yes, allow viewing of classifieds.', 0 => 'No, do not allow classifieds to be viewed.'), 'value' => $this->isModerator() ? 2 : 1));
     if (!$this->isModerator()) {
         unset($this->view->options[2]);
     }
     if (!$this->isPublic()) {
         // Element: create
         $this->addElement('Radio', 'create', array('label' => 'Allow Creation of Classifieds?', 'description' => 'CLASSIFIED_FORM_ADMIN_LEVEL_CREATE_DESCRIPTION', 'multiOptions' => array(1 => 'Yes, allow creation of classifieds.', 0 => 'No, do not allow classifieds to be created.'), 'value' => 1));
         // Element: edit
         $this->addElement('Radio', 'edit', array('label' => 'Allow Editing of Classifieds?', 'description' => 'Do you want to let members edit classifieds? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow members to edit all classifieds.', 1 => 'Yes, allow members to edit their own classifieds.', 0 => 'No, do not allow members to edit their classifieds.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->edit->options[2]);
         }
         // Element: delete
         $this->addElement('Radio', 'delete', array('label' => 'Allow Deletion of Classifieds?', 'description' => 'Do you want to let members delete classifieds? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow members to delete all classifieds.', 1 => 'Yes, allow members to delete their own classifieds.', 0 => 'No, do not allow members to delete their classifieds.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->delete->options[2]);
         }
         // Element: comment
         $this->addElement('Radio', 'comment', array('label' => 'Allow Commenting on Classifieds?', 'description' => 'Do you want to let members of this level comment on classifieds?', 'multiOptions' => array(2 => 'Yes, allow members to comment on all classifieds, including private ones.', 1 => 'Yes, allow members to comment on classifieds.', 0 => 'No, do not allow members to comment on classifieds.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->comment->options[2]);
         }
         // Element: photo
         $this->addElement('Radio', 'photo', array('label' => 'Allow Uploading of Photos?', 'description' => 'Do you want to let members upload photos to a classified listing? If set to no, the option to upload photos will not appear.', 'multiOptions' => array(1 => 'Yes, allow photo uploading to classifieds.', 0 => 'No, do not allow photo uploading.'), 'value' => 1));
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Classifieds Listing Privacy', 'description' => 'CLASSIFIED_FORM_ADMIN_LEVEL_AUTHVIEW_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'All Registered Members', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Element: auth_comment
         $this->addElement('MultiCheckbox', 'auth_comment', array('label' => 'Classified Comment Options', 'description' => 'CLASSIFIED_FORM_ADMIN_LEVEL_AUTHCOMMENT_DESCRIPTION', 'description' => '', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'All Registered Members', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Element: max
         $this->addElement('Text', 'max', array('label' => 'Maximum Allowed Classifieds', 'description' => 'Enter the maximum number of allowed classifieds. The field must contain an integer, use zero for unlimited.', 'validators' => array(array('Int', true), new Engine_Validate_AtLeast(0))));
     }
 }
Ejemplo n.º 15
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription('These settings are applied on a per member level basis. Start by selecting the member level you want to modify, then adjust the settings for that level below.');
     // Element: view
     $this->addElement('Radio', 'view', array('label' => 'Allow Viewing of Videos?', 'description' => 'Do you want to let members view videos? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow viewing of all videos, even private ones.', 1 => 'Yes, allow viewing of videos.', 0 => 'No, do not allow videos to be viewed.'), 'value' => $this->isModerator() ? 2 : 1));
     if (!$this->isModerator()) {
         unset($this->view->options[2]);
     }
     if (!$this->isPublic()) {
         // Element: create
         $this->addElement('Radio', 'create', array('label' => 'Allow Creation of Videos?', 'description' => 'Do you want to let members create videos? If set to no, some other settings on this page may not apply. This is useful if you want members to be able to view videos, but only want certain levels to be able to create videos.', 'multiOptions' => array(1 => 'Yes, allow creation of videos.', 0 => 'No, do not allow video to be created.'), 'value' => 1));
         // Element: edit
         $this->addElement('Radio', 'edit', array('label' => 'Allow Editing of Videos?', 'description' => 'Do you want to let members edit videos? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow members to edit all videos.', 1 => 'Yes, allow members to edit their own videos.', 0 => 'No, do not allow members to edit their videos.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->edit->options[2]);
         }
         // Element: delete
         $this->addElement('Radio', 'delete', array('label' => 'Allow Deletion of Videos?', 'description' => 'Do you want to let members delete videos? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow members to delete all videos.', 1 => 'Yes, allow members to delete their own videos.', 0 => 'No, do not allow members to delete their videos.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->delete->options[2]);
         }
         // Element: comment
         $this->addElement('Radio', 'comment', array('label' => 'Allow Commenting on Videos?', 'description' => 'Do you want to let members of this level comment on videos?', 'multiOptions' => array(2 => 'Yes, allow members to comment on all videos, including private ones.', 1 => 'Yes, allow members to comment on videos.', 0 => 'No, do not allow members to comment on videos.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->comment->options[2]);
         }
         // Element: upload
         $this->addElement('Radio', 'upload', array('label' => 'Allow Video Upload?', 'description' => 'Do you want to let members to upload their own videos? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(1 => 'Yes, allow video uploads.', 0 => 'No, do not allow video uploads.'), 'value' => 1));
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Video Privacy', 'description' => 'Your members can choose from any of the options checked below when they decide who can see their video. If you do not check any options, settings will default to the last saved configuration. If you select only one option, members of this level will not have a choice.', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'All Registered Members', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Element: auth_comment
         $this->addElement('MultiCheckbox', 'auth_comment', array('label' => 'Video Comment Options', 'description' => 'Your members can choose from any of the options checked below when they decide who can post comments on their video. If you do not check any options, settings will default to the last saved configuration. If you select only one option, members of this level will not have a choice. ', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'All Registered Members', 'owner_network' => 'Friends and Networks', 'owner_member_member' => 'Friends of Friends', 'owner_member' => 'Friends Only', 'owner' => 'Just Me'), 'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner')));
         // Element: max
         $this->addElement('Text', 'max', array('label' => 'Maximum Allowed Videos', 'description' => 'Enter the maximum number of allowed videos. The field must contain an integer, use zero for unlimited.', 'validators' => array(array('Int', true), new Engine_Validate_AtLeast(0))));
     }
 }
Ejemplo n.º 16
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription('GROUP_FORM_ADMIN_LEVEL_DESCRIPTION');
     // Element: view
     $this->addElement('Radio', 'view', array('label' => 'Allow Viewing of Clubs?', 'description' => 'GROUP_FORM_ADMIN_LEVEL_VIEW_DESCRIPTION', 'multiOptions' => array(2 => 'Yes, allow members to view all clubs, even private ones.', 1 => 'Yes, allow viewing and subscription of clubs.', 0 => 'No, do not allow clubs to be viewed.'), 'value' => $this->isModerator() ? 2 : 1));
     if (!$this->isModerator()) {
         unset($this->view->options[2]);
     }
     if ($this->isModerator()) {
         $this->addElement('Radio', 'announcement', array('label' => 'Allow  to manage Announcements of Clubs?', 'description' => 'Do you want to allow this user level to manage announcements of all clubs?', 'multiOptions' => array(1 => 'Yes, allow to manage announcemnents of all clubs.', 0 => 'No, do not allow to manage announcemnents of any clubs.'), 'value' => 0));
     }
     if ($this->isModerator()) {
         $this->addElement('Radio', 'invitation', array('label' => 'Allow  to manage Invitations of Clubs?', 'description' => 'Do you want to allow this user level to manage invitations of all clubs?', 'multiOptions' => array(1 => 'Yes, allow to manage invitations of all clubs.', 0 => 'No, do not allow to manage invitations of any clubs.'), 'value' => 0));
     }
     if (!$this->isPublic()) {
         // Element: create
         $this->addElement('Radio', 'create', array('label' => 'Allow Creation of Clubs?', 'description' => 'GROUP_FORM_ADMIN_LEVEL_CREATE_DESCRIPTION', 'multiOptions' => array(1 => 'Yes, allow creation of clubs.', 0 => 'No, do not allow clubs to be created.'), 'value' => 1));
         $this->addElement('Text', 'numberSubgroup', array('label' => 'Number of Sub Clubs per Club', 'description' => 'How many sub clubs that an user can create in a club? (Enter a number between 1 and 10)', 'allowEmpty' => false, 'validators' => array(array('Int', true), array('Between', true, array(1, 10)))));
         // Element: edit
         $this->addElement('Radio', 'edit', array('label' => 'Allow Editing of Clubs?', 'description' => 'Do you want to let users edit clubs?', 'multiOptions' => array(2 => 'Yes, allow members to edit everyone\'s clubs.', 1 => 'Yes, allow  members to edit their own clubs.', 0 => 'No, do not allow clubs to be edited.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->edit->options[2]);
         }
         // Element: delete
         $this->addElement('Radio', 'delete', array('label' => 'Allow Deletion of Clubs?', 'description' => 'Do you want to let members delete clubs? If set to no, some other settings on this page may not apply.', 'multiOptions' => array(2 => 'Yes, allow members to delete all clubs.', 1 => 'Yes, allow members to delete their own clubs.', 0 => 'No, do not allow members to delete their clubs.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->delete->options[2]);
         }
         // Element: comment
         $this->addElement('Radio', 'comment', array('label' => 'Allow Commenting on Clubs?', 'description' => 'Do you want to let members of this level comment on clubs?', 'multiOptions' => array(2 => 'Yes, allow members to comment on all clubs, including private ones.', 1 => 'Yes, allow members to comment on clubs.', 0 => 'No, do not allow members to comment on clubs.'), 'value' => $this->isModerator() ? 2 : 1));
         if (!$this->isModerator()) {
             unset($this->comment->options[2]);
         }
         //Allow Upload photo
         $this->addElement('Radio', 'photo', array('label' => 'Allow Upload Photo on Clubs?', 'description' => 'Do you want to let members of this level upload photo on clubs?', 'multiOptions' => array(1 => 'Yes, allow members to upload photo on clubs.', 0 => 'No, do not allow members to upload photo on clubs.'), 'value' => 1));
         $this->addElement('Text', 'numberPhoto', array('label' => 'Number of Photos per Album', 'description' => 'How many Photos that a user can upload in an album? (Enter a number between 0 and 999, 0 means unlimited)', 'allowEmpty' => false, 'validators' => array(array('Int', true), array('Between', true, array(0, 999)))));
         //Allow Create Album
         $this->addElement('Radio', 'album', array('label' => 'Allow Create Photo Albums on Clubs?', 'description' => 'Do you want to let members of this level create photo albums on clubs?', 'multiOptions' => array(1 => 'Yes, allow members to create photo albums on clubs.', 0 => 'No, do not allow members to create photo albums on clubs.'), 'value' => 1));
         $this->addElement('Text', 'numberAlbum', array('label' => 'Number of Albums per Club', 'description' => 'How many Albums that a user can create in a club? (Enter a number between 0 and 999, 0 means unlimited)', 'allowEmpty' => false, 'validators' => array(array('Int', true), array('Between', true, array(0, 999)))));
         //Allow Create Poll
         $this->addElement('Radio', 'poll', array('label' => 'Allow Create Polls on Clubs?', 'description' => 'Do you want to let members of this level create polls on clubs?', 'multiOptions' => array(1 => 'Yes, allow members to create polls on clubs.', 0 => 'No, do not allow members to create polls on clubs.'), 'value' => 1));
         //Allow Create Sub Club
         $this->addElement('Radio', 'sub_group', array('label' => 'Allow Create Sub Clubs on Clubs?', 'description' => 'Do you want to let members of this level create sub clubs on clubs?', 'multiOptions' => array(1 => 'Yes, allow members to create sub clubs on clubs.', 0 => 'No, do not allow members to create sub clubs on clubs.'), 'value' => 1));
         //Allow Create Video
         $this->addElement('Radio', 'video', array('label' => 'Allow Create Videos on Clubs?', 'description' => 'Do you want to let members of this level create videos on clubs?', 'multiOptions' => array(1 => 'Yes, allow members to create videos on clubs.', 0 => 'No, do not allow members to create videos on clubs.'), 'value' => 1));
         //Allow Create Wiki Page
         $this->addElement('Radio', 'wiki', array('label' => 'Allow Create Wiki Pages on Clubs?', 'description' => 'Do you want to let members of this level create wiki pages on clubs?', 'multiOptions' => array(1 => 'Yes, allow members to create wiki pages on clubs.', 0 => 'No, do not allow members to create wiki pages on clubs.'), 'value' => 1));
         //Allow Create Music Page
         $this->addElement('Radio', 'music', array('label' => 'Allow Create Music Pages on Clubs?', 'description' => 'Do you want to let members of this level create music pages on clubs?', 'multiOptions' => array(1 => 'Yes, allow members to create music pages on clubs.', 0 => 'No, do not allow members to create music pages on clubs.'), 'value' => 1));
         //Allow Create Folder Page
         $this->addElement('Radio', 'folder', array('label' => 'Allow Create Folder Pages on Clubs?', 'description' => 'Do you want to let members of this level create folder pages on clubs?', 'multiOptions' => array(1 => 'Yes, allow members to create folder pages on clubs.', 0 => 'No, do not allow members to create folder pages on clubs.'), 'value' => 1));
         //Allow Create Listing Page
         $this->addElement('Radio', 'listing', array('label' => 'Allow Create Listing Pages on Clubs?', 'description' => 'Do you want to let members of this level create listing pages on clubs?', 'multiOptions' => array(1 => 'Yes, allow members to create listing pages on clubs.', 0 => 'No, do not allow members to create listing pages on clubs.'), 'value' => 1));
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Club Privacy', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHVIEW_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'registered' => 'Registered Members', 'member' => 'Members Only')));
         // Element: auth_comment
         $this->addElement('MultiCheckbox', 'auth_comment', array('label' => 'Club Posting Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHCOMMENT_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_photo
         $this->addElement('MultiCheckbox', 'auth_photo', array('label' => 'Photo Upload Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHPHOTO_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_event
         $this->addElement('MultiCheckbox', 'auth_event', array('label' => 'Event Creation Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHEVENT_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_poll
         $this->addElement('MultiCheckbox', 'auth_poll', array('label' => 'Poll Creation Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHPOLL_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_sub_Club
         $this->addElement('MultiCheckbox', 'auth_sub_group', array('label' => 'Sub Club Creation Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHSUBGROUP_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_video
         $this->addElement('MultiCheckbox', 'auth_video', array('label' => 'Video Creation Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHVIDEO_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_wiki
         $this->addElement('MultiCheckbox', 'auth_wiki', array('label' => 'Wiki Page Creation Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHWIKI_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_music
         $this->addElement('MultiCheckbox', 'auth_music', array('label' => 'Music Page Creation Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHMUSIC_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_folder
         $this->addElement('MultiCheckbox', 'auth_folder', array('label' => 'Folder Page Creation Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHFILE_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_file_upload
         $this->addElement('MultiCheckbox', 'auth_file_upload', array('label' => 'File Upload Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHUPLOAD_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_file_down
         $this->addElement('MultiCheckbox', 'auth_file_down', array('label' => 'File Download Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHDOWNLOAD_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: auth_listing
         $this->addElement('MultiCheckbox', 'auth_listing', array('label' => 'Listing Page Creation Options', 'description' => 'GROUP_FORM_ADMIN_LEVEL_AUTHLISTING_DESCRIPTION', 'multiOptions' => array('registered' => 'Registered Members', 'member' => 'All Members', 'officer' => 'Officers and Owner Only')));
         // Element: style
         $this->addElement('Radio', 'style', array('label' => 'Allow Club Style', 'required' => true, 'multiOptions' => array(1 => 'Yes, allow custom club styles.', 0 => 'No, do not allow custom club styles.'), 'value' => 1));
     }
 }
Ejemplo n.º 17
0
    public function init() {
        parent::init();

        // My stuff
        $this->setTitle('Member Level Settings')
                ->setDescription('These settings are applied on a per member level basis. Start by selecting the member level you want to modify, then adjust the settings for that level below.');

        // Element: view
        $this->addElement('Radio', 'video_view', array(
            'label' => 'Allow Viewing of Videos?',
            'description' => 'Do you want to let members view videos? If set to no, some other settings on this page may not apply.',
            'multiOptions' => array(
                2 => 'Yes, allow viewing of all videos, even private ones.',
                1 => 'Yes, allow viewing of videos.',
                0 => 'No, do not allow videos to be viewed.',
            ),
            'value' => ( $this->isModerator() ? 2 : 1 ),
        ));
        if (!$this->isModerator()) {
            unset($this->video_view->options[2]);
        }

        if (!$this->isPublic()) {
			
			// Element: video_add_ratings
            $this->addElement('Radio', 'video_addratings', array(
                'label' => 'Allow to Add Professional Ratings to Videos?',
                'description' => 'Do you want to let members to add professional ratings?',
                'multiOptions' => array(
                    1 => 'Yes, allow to add of professional ratings.',
                    0 => 'No, do not allow to add of professional ratings.'
                ),
                'value' => 1,
            ));
			
            // Element: create
            $this->addElement('Radio', 'video_create', array(
                'label' => 'Allow Creation of Videos?',
                'description' => 'Do you want to let members create videos? If set to no, some other settings on this page may not apply. This is useful if you want members to be able to view videos, but only want certain levels to be able to create videos.',
                'multiOptions' => array(
                    1 => 'Yes, allow creation of videos.',
                    0 => 'No, do not allow video to be created.'
                ),
                'value' => 1,
            ));

            // Element: edit
            $this->addElement('Radio', 'video_edit', array(
                'label' => 'Allow Editing of Videos?',
                'description' => 'Do you want to let members edit videos? If set to no, some other settings on this page may not apply.',
                'multiOptions' => array(
                    2 => 'Yes, allow members to edit all videos.',
                    1 => 'Yes, allow members to edit their own videos.',
                    0 => 'No, do not allow members to edit their videos.',
                ),
                'value' => ( $this->isModerator() ? 2 : 1 ),
            ));
            if (!$this->isModerator()) {
                unset($this->video_edit->options[2]);
            }

            // Element: delete
            $this->addElement('Radio', 'video_delete', array(
                'label' => 'Allow Deletion of Videos?',
                'description' => 'Do you want to let members delete videos? If set to no, some other settings on this page may not apply.',
                'multiOptions' => array(
                    2 => 'Yes, allow members to delete all videos.',
                    1 => 'Yes, allow members to delete their own videos.',
                    0 => 'No, do not allow members to delete their videos.',
                ),
                'value' => ( $this->isModerator() ? 2 : 1 ),
            ));
            if (!$this->isModerator()) {
                unset($this->video_delete->options[2]);
            }

            // Element: comment
            $this->addElement('Radio', 'video_comment', array(
                'label' => 'Allow Comment/Like/Unsure/Dislike on Videos?',
                'description' => 'Do you want to let members of this level comment on videos?',
                'multiOptions' => array(
                    2 => 'Yes, allow members to comment/like/unsure/dislike on all videos, including private ones.',
                    1 => 'Yes, allow members to comment/like/unsure/dislike on videos.',
                    0 => 'No, do not allow members to comment/like/unsure/dislike on videos.',
                ),
                'value' => ( $this->isModerator() ? 2 : 1 ),
            ));
            if (!$this->isModerator()) {
                unset($this->video_comment->options[2]);
            }

            // Element: upload
            $this->addElement('Radio', 'video_upload', array(
                'label' => 'Allow Video Upload?',
                'description' => 'Do you want to let members to upload their own videos? If set to no, some other settings on this page may not apply.',
                'multiOptions' => array(
                    1 => 'Yes, allow video uploads.',
                    0 => 'No, do not allow video uploads.',
                ),
                'value' => 1,
            ));

            // Element: auth_view
            $this->addElement('MultiCheckbox', 'video_auth_view', array(
                'label' => 'Video Privacy',
                'description' => 'Your members can choose from any of the options checked below when they decide who can see their video. If you do not check any options, everyone will be allowed to view videos.',
                'multiOptions' => array(
                    'everyone' => 'Everyone',
                    'registered' => 'All Registered Members',
                    'owner_network' => 'Followers and Networks (user videos only)',
                    'owner_member_member' => 'Followers of Followers (user videos only)',
                    'owner_member' => 'Followers Only (user videos only)',
                    'parent_member' => 'Club Members (club videos only)',
                    'owner' => 'Just Me',
                ),
                'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'parent_member','owner'),
            ));

            // Element: auth_comment
            $this->addElement('MultiCheckbox', 'video_auth_comment', array(
                'label' => 'Video Comment Options',
                'description' => 'Your members can choose from any of the options checked below when they decide who can post comments on their video. If you do not check any options, everyone will be allowed to post comments on media.',
                'multiOptions' => array(
                    'everyone' => 'Everyone',
                    'registered' => 'All Registered Members',
                    'owner_network' => 'Followers and Networks (user videos only)',
                    'owner_member_member' => 'Followers of Followers (user videos only)',
                    'owner_member' => 'Followers Only (user videos only)',
                    'parent_member' => 'Club Members (club videos only)',
                    'owner' => 'Just Me',
                ),
                'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'parent_member','owner'),
            ));

            // Element: max
            $this->addElement('Text', 'video_max', array(
                'label' => 'Maximum Allowed Videos',
                'description' => 'Enter the maximum number of allowed videos. The field must contain an integer, use zero for unlimited.',
                'validators' => array(
                    array('Int', true),
                    new Engine_Validate_AtLeast(0),
                ),
            ));
            
            // Playlist privacy

            // Element: view
            $this->addElement('Radio', "playlist_view", array(
                'label' => 'Allow Viewing of Video Playlists?',
                'description' => 'Do you want to let members view video playlists? If set to no, some other settings on this page may not apply.',
                'multiOptions' => array(
                    2 => 'Yes, allow viewing of all video playlists, even private ones.',
                    1 => 'Yes, allow viewing of video playlists.',
                    0 => 'No, do not allow video playlists to be viewed.',
                ),
                'value' => ( $this->isModerator() ? 2 : 1 ),
            ));
            if (!$this->isModerator()) {
                unset($this->playlist_view->options[2]);
            }

            if (!$this->isPublic()) {

                // Element: create
                $this->addElement('Radio', 'playlist_create', array(
                    'label' => 'Allow Creation of Video Playlists?',
                    'description' => 'Do you want to let members create video playlists? If set to no, some other settings on this page may not apply. This is useful if you want members to be able to view videos, but only want certain levels to be able to create video playlists.',
                    'multiOptions' => array(
                        1 => 'Yes, allow creation of video playlists.',
                        0 => 'No, do not allow video playlist to be created.'
                    ),
                    'value' => 1,
                ));

                // Element: edit
                $this->addElement('Radio', 'playlist_edit', array(
                    'label' => 'Allow Editing of Video Playlists?',
                    'description' => 'Do you want to let members edit video playlists? If set to no, some other settings on this page may not apply.',
                    'multiOptions' => array(
                        2 => 'Yes, allow members to edit all video playlists.',
                        1 => 'Yes, allow members to edit their own video playlists.',
                        0 => 'No, do not allow members to edit their video playlists.',
                    ),
                    'value' => ( $this->isModerator() ? 2 : 1 ),
                ));
                if (!$this->isModerator()) {
                    unset($this->playlist_edit->options[2]);
                }

                // Element: delete
                $this->addElement('Radio', 'playlist_delete', array(
                    'label' => 'Allow Deletion of Video Playlists?',
                    'description' => 'Do you want to let members delete video playlists? If set to no, some other settings on this page may not apply.',
                    'multiOptions' => array(
                        2 => 'Yes, allow members to delete all video playlists.',
                        1 => 'Yes, allow members to delete their own video playlists.',
                        0 => 'No, do not allow members to delete their video playlists.',
                    ),
                    'value' => ( $this->isModerator() ? 2 : 1 ),
                ));
                if (!$this->isModerator()) {
                    unset($this->playlist_delete->options[2]);
                }

                // Element: comment
                $this->addElement('Radio', 'playlist_comment', array(
                    'label' => 'Allow Comment/Like/Unsure/Dislike on Video Playlists?',
                    'description' => 'Do you want to let members of this level Comment/Like/Unsure/Dislike on video playlists?',
                    'multiOptions' => array(
                        2 => 'Yes, allow members to Comment/Like/Unsure/Dislike on all video playlists, including private ones.',
                        1 => 'Yes, allow members to Comment/Like/Unsure/Dislike on video playlists.',
                        0 => 'No, do not allow members to Comment/Like/Unsure/Dislike on video playlists.',
                    ),
                    'value' => ( $this->isModerator() ? 2 : 1 ),
                ));
                if (!$this->isModerator()) {
                    unset($this->playlist_comment->options[2]);
                }
            }
            
            // Element: auth_view
            $this->addElement('MultiCheckbox', 'playlist_auth_view', array(
                'label' => 'Video Playlist Privacy',
                'description' => 'Your members can choose from any of the options checked below when they decide who can see their video. If you do not check any options, everyone will be allowed to view video playlists.',
                'multiOptions' => array(
                    'everyone' => 'Everyone',
                    'registered' => 'All Registered Members',
                    'owner_network' => 'Followers and Networks',
                    'owner_member_member' => 'Followers of Followers',
                    'owner_member' => 'Followers Only',
                    'owner' => 'Just Me',
                ),
                'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner'),
            ));

            // Element: auth_comment
            $this->addElement('MultiCheckbox', 'playlist_auth_comment', array(
                'label' => 'Video Playlist Comment Options',
                'description' => 'Your members can choose from any of the options checked below when they decide who can post comments on their video. If you do not check any options, everyone will be allowed to post comments on the playlist.',
                'multiOptions' => array(
                    'everyone' => 'Everyone',
                    'registered' => 'All Registered Members',
                    'owner_network' => 'Followers and Networks',
                    'owner_member_member' => 'Followers of Followers',
                    'owner_member' => 'Followers Only',
                    'owner' => 'Just Me',
                ),
                'value' => array('everyone', 'owner_network', 'owner_member_member', 'owner_member', 'owner'),
            ));
        }
    }
Ejemplo n.º 18
0
 public function init()
 {
     parent::init();
     // My stuff
     $this->setTitle('Member Level Settings')->setDescription("AUTHORIZATION_FORM_ADMIN_LEVEL_EDIT_DESCRIPTION");
     $this->addElement('Text', 'title', array('label' => 'Title', 'allowEmpty' => false, 'required' => true));
     $this->addElement('Textarea', 'description', array('label' => 'Description', 'allowEmpty' => true, 'required' => false));
     if (!$this->isPublic()) {
         // Show Professional Account Badge
         $this->addElement('Radio', 'show_badge', array('label' => 'Show Professional Account Badge?', 'description' => 'Allow to see professional member badge on your profile picture', 'multiOptions' => array(1 => 'Yes', 0 => 'No')));
         // Get available files
         $badgeOptions = array('' => '(No badge)');
         $imageExtensions = array('gif', 'jpg', 'jpeg', 'png');
         $it = new DirectoryIterator(APPLICATION_PATH . '/public/admin/');
         foreach ($it as $file) {
             if ($file->isDot() || !$file->isFile()) {
                 continue;
             }
             $basename = basename($file->getFilename());
             if (!($pos = strrpos($basename, '.'))) {
                 continue;
             }
             $ext = strtolower(ltrim(substr($basename, $pos), '.'));
             if (!in_array($ext, $imageExtensions)) {
                 continue;
             }
             $badgeOptions['public/admin/' . $basename] = $basename;
         }
         $this->addElement('Select', 'badge', array('label' => 'Badge Icon', 'description' => 'Badge icons are uploaded via the File Media Manager.', 'multiOptions' => $badgeOptions));
         $this->badge->getDecorator('Description')->setOption('placement', 'append');
         // Element: edit
         if ($this->isModerator()) {
             $this->addElement('Radio', 'edit', array('label' => 'Allow Profile Moderation', 'required' => true, 'multiOptions' => array(2 => 'Yes, allow members in this level to edit other profiles and settings.', 1 => 'No, do not allow moderation.'), 'value' => 0));
         }
         // Element: style
         $this->addElement('Radio', 'style', array('label' => 'Allow Profile Style', 'required' => true, 'multiOptions' => array(2 => 'Yes, allow members in this level to edit other custom profile styles.', 1 => 'Yes, allow custom profile styles.', 0 => 'No, do not allow custom profile styles.'), 'value' => 1));
         if (!$this->isModerator()) {
             unset($this->getElement('style')->options[2]);
         }
         // Element: delete
         $this->addElement('Radio', 'delete', array('label' => 'Allow Account Deletion?', 'multiOptions' => array(2 => 'Yes, allow members in this level to delete other users.', 1 => 'Yes, allow members to delete their account.', 0 => 'No, do not allow account deletion.'), 'value' => 1));
         if (!$this->isModerator()) {
             unset($this->getElement('delete')->options[2]);
         }
         $this->delete->getDecorator('Description')->setOption('placement', 'PREPEND');
         // Element: activity
         if ($this->isModerator()) {
             $this->addElement('Radio', 'activity', array('label' => 'Allow Activity Feed Moderation', 'required' => true, 'multiOptions' => array(1 => 'Yes, allow members in this level to delete any feed item.', 0 => 'No, do not allow moderation.'), 'value' => 0));
         }
         // Element: block
         $this->addElement('Radio', 'block', array('label' => 'Allow Blocking?', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_BLOCK_DESCRIPTION', 'multiOptions' => array(1 => 'Yes', 0 => 'No')));
         $this->block->getDecorator('Description')->setOption('placement', 'PREPEND');
         // Element: auth_view
         $this->addElement('MultiCheckbox', 'auth_view', array('label' => 'Profile Viewing Options', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_AUTHVIEW_DESCRIPTION', 'multiOptions' => array('everyone' => 'Everyone', 'network' => 'My Network', 'member' => 'My Followers', 'owner' => 'Only Me')));
         $this->auth_view->getDecorator('Description')->setOption('placement', 'PREPEND');
         // Element: auth_comment
         $this->addElement('MultiCheckbox', 'auth_comment', array('label' => 'Profile Commenting Options', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_AUTHCOMMENT_DESCRIPTION', 'multiOptions' => array('network' => 'My Network', 'member' => 'My Followers', 'owner' => 'Only Me')));
         $this->auth_comment->getDecorator('Description')->setOption('placement', 'PREPEND');
         // Element: search
         $this->addElement('Radio', 'search', array('label' => 'Search Privacy Options', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_SEARCH_DESCRIPTION', 'multiOptions' => array(1 => 'Yes', 0 => 'No')));
         $this->search->getDecorator('Description')->setOption('placement', 'PREPEND');
         // Element: status
         $this->addElement('Radio', 'status', array('label' => 'Allow status messages?', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_STATUS_DESCRIPTION', 'multiOptions' => array(1 => 'Yes', 0 => 'No')));
         // Element: username
         $this->addElement('Radio', 'username', array('label' => 'Allow username changes?', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_USERNAME_DESCRIPTION', 'multiOptions' => array(1 => 'Yes', 0 => 'No')));
         $this->username->getDecorator('Description')->setOption('placement', 'PREPEND');
         // Element: quota
         $this->addElement('Select', 'quota', array('label' => 'Storage Quota', 'required' => true, 'multiOptions' => Engine_Api::_()->getItemTable('storage_file')->getStorageLimits(), 'value' => 0, 'description' => 'CORE_FORM_ADMIN_SETTINGS_GENERAL_QUOTA_DESCRIPTION'));
         // Element: commenthtml
         $this->addElement('Text', 'commenthtml', array('label' => 'Allow HTML in Comments?', 'description' => 'CORE_FORM_ADMIN_SETTINGS_GENERAL_COMMENTHTML_DESCRIPTION'));
         $this->addElement('Radio', 'messages_auth', array('label' => 'Allow messaging?', 'description' => 'Allow member to send message to friends', 'multiOptions' => array('friends' => 'Yes', 'none' => 'No')));
         // Element: messages_editor
         $this->addElement('Radio', 'messages_editor', array('label' => 'Use editor for messaging?', 'description' => 'USER_FORM_ADMIN_SETTINGS_LEVEL_MESSAGEEDITOR_DESCRIPTION', 'multiOptions' => array('editor' => 'Editor', 'plaintext' => 'Plain Text')));
         $this->addElement('Radio', 'mail_auth', array('label' => 'Allow send email?', 'description' => 'Allow member to send email to non-friends', 'multiOptions' => array(1 => 'Yes', 0 => 'No'), 'value' => 1));
         $this->addElement('Integer', 'mess_day', array('label' => 'Maximum messages user can send per day', 'description' => 'Set 0 is unlimited', 'required' => true, 'validators' => array(new Engine_Validate_AtLeast(0)), 'value' => 0));
         $this->addElement('Integer', 'mess_month', array('label' => 'Maximum messages user can send per month', 'description' => 'Set 0 is unlimited', 'required' => true, 'validators' => array(new Engine_Validate_AtLeast(0)), 'value' => 0));
         $this->addElement('Integer', 'mail_day', array('label' => 'Maximum emails user can send per day', 'description' => 'Set 0 is unlimited', 'required' => true, 'validators' => array(new Engine_Validate_AtLeast(0)), 'value' => 0));
         $this->addElement('Integer', 'mail_month', array('label' => 'Maximum emails user can send per month', 'description' => 'Set 0 is unlimited', 'required' => true, 'validators' => array(new Engine_Validate_AtLeast(0)), 'value' => 0));
         $this->messages_auth->getDecorator('Description')->setOption('placement', 'PREPEND');
     }
 }