b2evolution PHP Cross Reference Blogging Systems

Source: /inc/users/views/_display.form.php - 148 lines - 5897 bytes - Text - Print

Description: This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**
   3   * This file is part of the evoCore framework - {@link http://evocore.net/}
   4   * See also {@link http://sourceforge.net/projects/evocms/}.
   5   *
   6   * @copyright (c)2009-2014 by Francois PLANQUE - {@link http://fplanque.net/}
   7   * Parts of this file are copyright (c)2009 by The Evo Factory - {@link http://www.evofactory.com/}.
   8   *
   9   * {@internal License choice
  10   * - If you have received this file as part of a package, please find the license.txt file in
  11   *   the same folder or the closest folder above for complete license terms.
  12   * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
  13   *   then you must choose one of the following licenses before using the file:
  14   *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  15   *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
  16   * }}
  17   *
  18   * {@internal Open Source relicensing agreement:
  19   * The Evo Factory grants Francois PLANQUE the right to license
  20   * The Evo Factory's contributions to this file and the b2evolution project
  21   * under any OSI approved OSS license (http://www.opensource.org/licenses/).
  22   * }}
  23   *
  24   * @package evocore
  25  
  26   *
  27   * @version $Id: _display.form.php 6136 2014-03-08 07:59:48Z manuel $
  28   */
  29  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  30  
  31  /**
  32   * @var User
  33   */
  34  global $current_User;
  35  /**
  36   * @var GeneralSettings
  37   */
  38  global $Settings;
  39  
  40  global $dispatcher;
  41  
  42  global $collections_Module;
  43  
  44  $Form = new Form( NULL, 'settings_checkchanges' );
  45  $Form->begin_form( 'fform', '',
  46      // enable all form elements on submit (so values get sent):
  47      array( 'onsubmit'=>'var es=this.elements; for( var i=0; i < es.length; i++ ) { es[i].disabled=false; };' ) );
  48  
  49      $Form->add_crumb( 'display' );
  50      $Form->hidden( 'ctrl', 'display' );
  51      $Form->hidden( 'action', 'update' );
  52      $Form->hidden( 'tab', 'display' );
  53  
  54      if( isset($GLOBALS['files_Module']) )
  55      {
  56          load_funcs( 'files/model/_image.funcs.php' );
  57          $params['force_keys_as_values'] = true;
  58      }
  59  
  60  // --------------------------------------------
  61  
  62  $Form->begin_fieldset( T_('Profile pictures').get_manual_link('profile-picture-settings') );
  63  
  64      $Form->checkbox_input( 'use_gravatar', $Settings->get('use_gravatar'), T_('Use gravatar'), array( 'note' => T_('Fall back to Gravatar if a user has not uploaded a profile picture.') ) );
  65  
  66      global $default_avatar;
  67      $Form->radio( 'default_gravatar', $Settings->get('default_gravatar'),
  68          array( array( 'b2evo', T_('Default image'), $default_avatar ),
  69                      array( '', 'Gravatar' ),
  70                      array( 'identicon', 'Identicon' ),
  71                      array( 'monsterid', 'Monsterid' ),
  72                      array( 'wavatar', 'Wavatar' ),
  73                      array( 'retro', 'Retro' ),
  74          ), T_('Default gravatars'), true, T_('Gravatar users can choose to set up a unique icon for themselves, and if they don\'t, they will be assigned a default image.') );
  75  
  76  $Form->end_fieldset();
  77  
  78  // --------------------------------------------
  79  
  80  $Form->begin_fieldset( T_('Back-office display options').get_manual_link('user-backoffice-display-settings') );
  81  
  82          $Form->checkbox_input( 'gender_colored', $Settings->get('gender_colored'), T_('Display gender'), array( 'note'=>T_('Use colored usernames to differentiate men & women.') ) );
  83  
  84  $Form->end_fieldset();
  85  
  86  // --------------------------------------------
  87  
  88  $Form->begin_fieldset( T_('Bubble tips in back-office').get_manual_link('user-bubble-tips-settings')  );
  89  
  90      $Form->checkbox_input( 'bubbletip', $Settings->get('bubbletip'), T_('Username bubble tips'), array( 'note'=>T_('Check to enable bubble tips on usernames') ) );
  91  
  92      if( isset($GLOBALS['files_Module']) )
  93      {
  94          $Form->select_input_array( 'bubbletip_size_admin', $Settings->get('bubbletip_size_admin') , get_available_thumb_sizes(), T_('Bubble tip image format'), '', $params );
  95      }
  96  
  97  $Form->end_fieldset();
  98  
  99  // --------------------------------------------
 100  
 101  $Form->begin_fieldset( T_('Bubble tips in front-office for logged in users').get_manual_link('user-bubble-tips-settings') );
 102  
 103      $Form->info( T_('Note'), T_('Enable bubble tips in each skin\'s settings.') );
 104  
 105      if( isset($GLOBALS['files_Module']) )
 106      {
 107          $Form->select_input_array( 'bubbletip_size_front', $Settings->get('bubbletip_size_front') , get_available_thumb_sizes(), T_('Bubble tip image format'), '', $params );
 108      }
 109  
 110  $Form->end_fieldset();
 111  
 112  // --------------------------------------------
 113  
 114  $Form->begin_fieldset( T_('Bubble tips for anonymous users').get_manual_link('user-bubble-tips-settings') );
 115  
 116      $Form->info( T_('Note'), T_('Enable bubble tips in each skin\'s settings.') );
 117  
 118      $Form->checkbox_input( 'bubbletip_anonymous', $Settings->get('bubbletip_anonymous'), T_('Allow to see bubbletips'), array( 'note'=>T_('Check to enable bubble tips on usernames') ) );
 119  
 120      if( isset($GLOBALS['files_Module']) )
 121      {
 122          $Form->select_input_array( 'bubbletip_size_anonymous', $Settings->get('bubbletip_size_anonymous') , get_available_thumb_sizes(), T_('Bubble tip image format'), '', $params );
 123      }
 124  
 125      $Form->textarea( 'bubbletip_overlay', $Settings->get( 'bubbletip_overlay' ), 5, T_('Image overlay text'), '', 20 );
 126  
 127  $Form->end_fieldset();
 128  
 129  
 130  // --------------------------------------------
 131  
 132  $Form->begin_fieldset( T_('Other permissions for anonymous users').get_manual_link('anonymous-users-permissions') );
 133  
 134      $Form->checkbox_input( 'allow_anonymous_user_list', $Settings->get('allow_anonymous_user_list'), T_('Allow to see user list') );
 135      // Allow anonymous users to see the user display ( disp=user )
 136      $Form->checkbox_input( 'allow_anonymous_user_profiles', $Settings->get('allow_anonymous_user_profiles'), T_('Allow to see user profiles') );
 137  
 138  $Form->end_fieldset();
 139  
 140  // --------------------------------------------
 141  
 142  if( $current_User->check_perm( 'users', 'edit' ) )
 143  {
 144      $Form->end_form( array( array( 'submit', 'submit', T_('Save !'), 'SaveButton' ),
 145                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
 146  }
 147  
 148  ?>

title

Description

title

Description

title

Description

title

title

Body