b2evolution PHP Cross Reference Blogging Systems

Source: /inc/collections/views/_coll_general.form.php - 113 lines - 4498 bytes - Text - Print

Description: This file implements the UI view for the General blog properties. b2evolution - {@link http://b2evolution.net/} Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}

   1  <?php
   2  /**
   3   * This file implements the UI view for the General blog properties.
   4   *
   5   * b2evolution - {@link http://b2evolution.net/}
   6   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
   7   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}
   8   * Parts of this file are copyright (c)2004-2005 by Daniel HAHLER - {@link http://thequod.de/contact}.
   9   *
  10   * {@internal Open Source relicensing agreement:
  11   * Daniel HAHLER grants Francois PLANQUE the right to license
  12   * Daniel HAHLER's contributions to this file and the b2evolution project
  13   * under any OSI approved OSS license (http://www.opensource.org/licenses/).
  14   * }}
  15   *
  16   * @package admin
  17   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  18   * @author blueyed: Daniel HAHLER
  19   * @author fplanque: Francois PLANQUE.
  20   *
  21   * @version $Id: _coll_general.form.php 6136 2014-03-08 07:59:48Z manuel $
  22   */
  23  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  24  
  25  /**
  26   * @var Blog
  27   */
  28  global $edited_Blog;
  29  
  30  
  31  global $action, $next_action, $blogtemplate, $blog, $tab, $admin_url;
  32  
  33  $Form = new Form();
  34  
  35  $Form->begin_form( 'fform' );
  36  
  37  $Form->add_crumb( 'collection' );
  38  $Form->hidden_ctrl();
  39  $Form->hidden( 'action', $next_action );
  40  $Form->hidden( 'tab', $tab );
  41  if( $next_action == 'create' )
  42  {
  43      $Form->hidden( 'kind', get_param('kind') );
  44      $Form->hidden( 'skin_ID', get_param('skin_ID') );
  45  }
  46  else
  47  {
  48      $Form->hidden( 'blog', $blog );
  49  }
  50  
  51  
  52  $Form->begin_fieldset( T_('Collection type').get_manual_link('collection-type') );
  53      $collection_kinds = get_collection_kinds();
  54      if( isset( $collection_kinds[ $edited_Blog->get( 'type' ) ] ) )
  55      {    // Display type of this blog
  56          echo '<p>'
  57              .sprintf( T_('This is %s &ndash; '), $collection_kinds[ $edited_Blog->get( 'type' ) ]['name'] )
  58              .$collection_kinds[ $edited_Blog->get( 'type' ) ]['desc']
  59          .'</p>'
  60          .'<p><a href="'.$admin_url.'?ctrl=coll_settings&tab=general&action=type&blog='.$edited_Blog->ID.'">'
  61                  .T_('Change collection type / Reset &raquo;')
  62          .'</a></p>';
  63      }
  64  $Form->end_fieldset();
  65  
  66  
  67  $Form->begin_fieldset( T_('General parameters').get_manual_link('blogs_general_parameters'), array( 'class'=>'fieldset clear' ) );
  68  
  69      $Form->text( 'blog_name', $edited_Blog->get( 'name' ), 50, T_('Title'), T_('Will be displayed on top of the blog.'), 255 );
  70  
  71      $Form->text( 'blog_shortname', $edited_Blog->get( 'shortname', 'formvalue' ), 15, T_('Short name'), T_('Will be used in selection menus and throughout the admin interface.'), 255 );
  72  
  73      if( $current_User->check_perm( 'blog_admin', 'edit', false, $edited_Blog->ID ) )
  74      {    // Permission to edit advanced admin settings
  75      }
  76  
  77      $owner_User = & $edited_Blog->get_owner_User();
  78      if( $current_User->check_perm( 'blog_admin', 'edit', false, $edited_Blog->ID ) )
  79      {    // Permission to edit advanced admin settings
  80  
  81          $Form->text( 'blog_urlname', $edited_Blog->get( 'urlname' ), 20, T_('URL "filename"'),
  82                  sprintf( T_('"slug" used to uniquely identify this blog in URLs. Also used as <a %s>default media folder</a>.'),
  83                      'href="?ctrl=coll_settings&tab=advanced&blog='.$blog.'"'), 255 );
  84  
  85          // fp> Note: There are 2 reasons why we don't provide a select here:
  86          // 1. If there are 1000 users, it's a pain.
  87          // 2. A single blog owner is not necessarily allowed to see all other users.
  88          $Form->username( 'owner_login', $owner_User, T_('Owner'), T_('Login of this blog\'s owner.') );
  89      }
  90      else
  91      {
  92          $Form->info( T_('URL Name'), $edited_Blog->get( 'urlname' ), T_('Used to uniquely identify this blog in URLs.') /* Note: message voluntarily shorter than admin message */ );
  93  
  94          $Form->info( T_('Owner'), $owner_User->login, $owner_User->dget('fullname') );
  95      }
  96  
  97      $Form->select( 'blog_locale', $edited_Blog->get( 'locale' ), 'locale_options_return', T_('Main Locale'), T_('Determines the language of the navigation links on the blog.') );
  98  
  99  $Form->end_fieldset();
 100  
 101  
 102  $Form->begin_fieldset( T_('Description').get_manual_link('collection-description') );
 103      $Form->text( 'blog_tagline', $edited_Blog->get( 'tagline' ), 50, T_('Tagline'), T_('This is displayed under the blog name on the blog template.'), 250 );
 104      $Form->textarea( 'blog_longdesc', $edited_Blog->get( 'longdesc' ), 5, T_('Long Description'), T_('This is displayed on the blog template.'), 50, 'large' );
 105  $Form->end_fieldset();
 106  
 107  
 108  $Form->buttons( array( array( 'submit', 'submit', T_('Save !'), 'SaveButton' ),
 109                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
 110  
 111  $Form->end_form();
 112  
 113  ?>

title

Description

title

Description

title

Description

title

title

Body