b2evolution PHP Cross Reference Blogging Systems

Source: /inc/skins/views/_coll_skin_settings.form.php - 73 lines - 2975 bytes - Text - Print

Description: This file implements the Skin properties form. 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 implements the Skin properties form.
   4   *
   5   * This file is part of the evoCore framework - {@link http://evocore.net/}
   6   * See also {@link http://sourceforge.net/projects/evocms/}.
   7   *
   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}
   9   *
  10   * {@internal License choice
  11   * - If you have received this file as part of a package, please find the license.txt file in
  12   *   the same folder or the closest folder above for complete license terms.
  13   * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
  14   *   then you must choose one of the following licenses before using the file:
  15   *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  16   *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
  17   * }}
  18   *
  19   * {@internal Open Source relicensing agreement:
  20   * }}
  21   *
  22   * @package admin
  23   *
  24   * @author fplanque: Francois PLANQUE.
  25   *
  26   * @version $Id: _coll_skin_settings.form.php 6136 2014-03-08 07:59:48Z manuel $
  27   */
  28  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  29  
  30  /**
  31   * @var Skin
  32   */
  33  
  34  global $Blog, $current_User;
  35  
  36  $Form = new Form( NULL, 'skin_settings_checkchanges' );
  37  
  38  $Form->begin_form( 'fform' );
  39  
  40      $Form->add_crumb( 'collection' );
  41      $Form->hidden_ctrl();
  42      $Form->hidden( 'tab', 'skin' );
  43      $Form->hidden( 'action', 'update' );
  44      $Form->hidden( 'blog', $Blog->ID );
  45  
  46      $skin_type_params = array(
  47          'normal' => array(
  48              'skin_ID' => $Blog->get_setting( 'normal_skin_ID' ),
  49              'fieldset_title' => T_('Default skin'),
  50          ),
  51          'mobile' => array(
  52              'skin_ID' => $Blog->get_setting( 'mobile_skin_ID', true ),
  53              'fieldset_title' => T_('Default mobile phone skin'),
  54          ),
  55          'tablet' => array(
  56              'skin_ID' => $Blog->get_setting( 'tablet_skin_ID', true ),
  57              'fieldset_title' => T_('Default tablet skin'),
  58          ),
  59      );
  60  
  61      foreach( $skin_type_params as $type => $params )
  62      {
  63          $fieldset_title_links = '<span class="floatright">&nbsp;'.action_icon( T_('Select another skin...'), 'edit', regenerate_url( 'action', 'ctrl=coll_settings&amp;skinpage=selection&amp;skin_type='.$type ), T_('Use a different skin').' &raquo;', 3, 4 ).'</span>';
  64          if( $current_User->check_perm( 'options', 'view' ) && ( $params[ 'skin_ID' ] ) )
  65          { // display Reset params only when skin ID has a real value ( when skin_ID = 0 means it must be the same as the normal skin value )
  66              $fieldset_title_links .= ' <span class="floatright">'.action_icon( T_('Reset params'), 'reload', regenerate_url( 'action', 'ctrl=skins&amp;skin_ID='.$params[ 'skin_ID' ].'&amp;blog='.$Blog->ID.'&amp;action=reset&amp;'.url_crumb('skin') ), ' '.T_('Reset params'), 3, 4 ).'&nbsp;</span>';
  67          }
  68          display_skin_fieldset( $Form, $params[ 'skin_ID' ], array( 'fieldset_title' => $params[ 'fieldset_title' ], 'fieldset_links' => $fieldset_title_links ) );
  69      }
  70  
  71  $Form->end_form( array( array( 'submit', 'submit', T_('Save changes'), 'SaveButton' ) ) );
  72  
  73  ?>

title

Description

title

Description

title

Description

title

title

Body