b2evolution PHP Cross Reference Blogging Systems

Source: /inc/messaging/views/_msg_settings.form.php - 73 lines - 2786 bytes - Text - Print

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

   1  <?php
   2  /**
   3   * This file is part of b2evolution - {@link http://b2evolution.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   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  10   *
  11   * {@internal Open Source relicensing agreement:
  12   * The Evo Factory grants Francois PLANQUE the right to license
  13   * The Evo Factory's contributions to this file and the b2evolution project
  14   * under any OSI approved OSS license (http://www.opensource.org/licenses/).
  15   * }}
  16   *
  17   * @package messaging
  18   *
  19   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  20   * @author efy-asimo: Attila Simo.
  21   *
  22   * @version $Id: _msg_settings.form.php 6136 2014-03-08 07:59:48Z manuel $
  23   */
  24  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  25  
  26  $current_User->check_perm( 'options', 'edit', true );
  27  
  28  global $Settings;
  29  
  30  $BlogCache = & get_BlogCache();
  31  
  32  $Form = new Form( NULL, 'msg_settings' );
  33  
  34  $Form->begin_form( 'fform', '' );
  35  
  36      $Form->add_crumb( 'msgsettings' );
  37      $Form->hidden( 'ctrl', 'msgsettings' );
  38      $Form->hidden( 'action', 'update' );
  39  
  40  $Form->begin_fieldset( T_( 'General settings' ) );
  41  
  42  // set link to options 
  43  $messages_link_to = $Settings->get( 'messages_link_to' );
  44  $admin_selected = ( $messages_link_to == 'admin' ) ? 'selected="selected"' : '';
  45  $link_to_options = '<option value="admin" '.$admin_selected.'>admin</option>';
  46  $link_to_options .= $BlogCache->get_option_list( $messages_link_to );
  47  $Form->select_input_options( 'messages_link_to', $link_to_options, T_( 'Messaging emails link to' ) );
  48  
  49  $Form->end_fieldset();
  50  
  51  $Form->begin_fieldset( T_( 'Welcome message after account activation' ) );
  52  
  53      $Form->checkbox_input( 'welcomepm_enabled', $Settings->get( 'welcomepm_enabled' ), T_('Send Welcome PM'), array( 'note' => T_('Check to automatically send a welcome message to users when they activate their account.' ) ) );
  54  
  55      $UserCache = & get_UserCache();
  56      $User = $UserCache->get_by_login( $Settings->get( 'welcomepm_from' ) );
  57      if( !$User )
  58      {    // Use login of the current user if user login is incorrect
  59          $User = $current_User;
  60      }
  61      $Form->username( 'welcomepm_from', $User, T_('From'), T_('User login.') );
  62  
  63      $Form->text_input( 'welcomepm_title', $Settings->get( 'welcomepm_title' ), 58, T_('Title'), '', array( 'maxlength' => 5000 ) );
  64  
  65      $Form->textarea_input( 'welcomepm_message', $Settings->get( 'welcomepm_message' ), 15, T_('Message'), array( 'cols' => 45 ) );
  66  
  67  $Form->end_fieldset();
  68  
  69  $Form->buttons( array( array( 'submit', 'submit', T_('Save !'), 'SaveButton' ) ) );
  70  
  71  $Form->end_form();
  72  
  73  ?>

title

Description

title

Description

title

Description

title

title

Body