[ Index ]
 

Code source de b2evolution 2.1.0-beta

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/blogs/inc/collections/views/ -> _coll_general.form.php (source)

   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-2007 by Francois PLANQUE - {@link http://fplanque.net/}

   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,v 1.2 2007/11/02 02:38:29 fplanque Exp $

  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;
  32  
  33  $Form = new Form();
  34  
  35  $Form->begin_form( 'fform' );
  36  
  37  $Form->hidden_ctrl();
  38  $Form->hidden( 'action', $next_action );
  39  $Form->hidden( 'tab', $tab );
  40  if( $next_action == 'create' )
  41  {
  42      $Form->hidden( 'kind', get_param('kind') );
  43      $Form->hidden( 'skin_ID', get_param('skin_ID') );
  44  }
  45  else
  46  {
  47      $Form->hidden( 'blog', $blog );
  48  }
  49  
  50  $Form->begin_fieldset( T_('General parameters'), array( 'class'=>'fieldset clear' ) );
  51  
  52      $Form->text( 'blog_name', $edited_Blog->get( 'name' ), 50, T_('Full Name'), T_('Will be displayed on top of the blog.') );
  53  
  54      $Form->text( 'blog_shortname', $edited_Blog->get( 'shortname', 'formvalue' ), 12, T_('Short Name'), T_('Will be used in selection menus and throughout the admin interface.') );
  55  
  56      if( $current_User->check_perm( 'blog_admin', 'edit', false, $edited_Blog->ID ) )
  57      {    // Permission to edit advanced admin settings
  58      }
  59  
  60      $owner_User = & $edited_Blog->get_owner_User();
  61      if( $current_User->check_perm( 'blog_admin', 'edit', false, $edited_Blog->ID ) )
  62      {    // Permission to edit advanced admin settings
  63  
  64          $Form->text( 'blog_urlname', $edited_Blog->get( 'urlname' ), 20, T_('URL Name'), T_('Used to uniquely identify this blog. Appears in URLs and gets used as default for the media location (see the advanced tab).'), 255 );
  65  
  66          // fp> Note: There are 2 reasons why we don't provide a select here:

  67          // 1. If there are 1000 users, it's a pain.

  68          // 2. A single blog owner is not necessarily allowed to see all other users.

  69          $Form->text( 'owner_login', $owner_User->login, 20, T_('Owner'), T_('Login of this blog\'s owner.') );
  70      }
  71      else
  72      {
  73          $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 */ );
  74  
  75          $Form->info( T_('Owner'), $owner_User->login, $owner_User->dget('fullname') );
  76      }
  77  
  78      $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.') );
  79  
  80      $Form->end_fieldset();
  81  
  82  
  83  $Form->begin_fieldset( T_('Content / Posts') );
  84      $Form->select_input_array( 'orderby', $edited_Blog->get_setting('orderby'), array(
  85                                                  'datestart' => T_('Date issued (Default)'),
  86                                                  //'datedeadline' => T_('Deadline'),

  87                                                  'title'     => T_('Title'),
  88                                                  'datecreated' => T_('Date created'),
  89                                                  'datemodified' => T_('Date last modified'),
  90                                                  'urltitle'     => T_('URL Title'),
  91                                                  'priority'     => T_('Priority'),
  92                                              ), T_('Order by'), T_('Default ordering of posts.') );
  93      $Form->select_input_array( 'orderdir', $edited_Blog->get_setting('orderdir'), array(
  94                                                  'ASC'  => T_('Ascending'),
  95                                                  'DESC' => T_('Descending'), ), T_('Direction') );
  96      $Form->radio( 'what_to_show', $edited_Blog->get_setting('what_to_show'),
  97                                  array(  array( 'days', T_('days') ),
  98                                                  array( 'posts', T_('posts') ),
  99                                              ), T_('Display unit'), false,  T_('Do you want to restrict on the number of days or the number of posts?') );
 100      $Form->text( 'posts_per_page', $edited_Blog->get_setting('posts_per_page'), 4, T_('Posts/Days per page'), T_('How many days or posts fo you want to display on the home page?'), 4 );
 101      $Form->radio( 'archive_mode',  $edited_Blog->get_setting('archive_mode'),
 102                              array(  array( 'monthly', T_('monthly') ),
 103                                              array( 'weekly', T_('weekly') ),
 104                                              array( 'daily', T_('daily') ),
 105                                              array( 'postbypost', T_('post by post') )
 106                                          ), T_('Archive grouping'), false,  T_('How do you want to browse the post archives? May also apply to permalinks.') );
 107  $Form->end_fieldset();
 108  
 109  
 110  $Form->begin_fieldset( T_('Description') );
 111      $Form->text( 'blog_tagline', $edited_Blog->get( 'tagline' ), 50, T_('Tagline'), T_('This is diplayed under the blog name on the blog template.'), 250 );
 112      $Form->textarea( 'blog_longdesc', $edited_Blog->get( 'longdesc' ), 5, T_('Long Description'), T_('This is displayed on the blog template.'), 50, 'large' );
 113  $Form->end_fieldset();
 114  
 115  
 116  $Form->buttons( array( array( 'submit', 'submit', T_('Save !'), 'SaveButton' ),
 117                                                      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
 118  
 119  $Form->end_form();
 120  
 121  /*

 122   * $Log: _coll_general.form.php,v $

 123   * Revision 1.2  2007/11/02 02:38:29  fplanque

 124   * refactored blog settings / UI

 125   *

 126   * Revision 1.1  2007/06/25 10:59:36  fplanque

 127   * MODULES (refactored MVC)

 128   *

 129   * Revision 1.25  2007/05/31 03:02:23  fplanque

 130   * Advanced perms now disabled by default (simpler interface).

 131   * Except when upgrading.

 132   * Enable advanced perms in blog settings -> features

 133   *

 134   * Revision 1.24  2007/05/29 01:17:20  fplanque

 135   * advanced admin blog settings are now restricted by a special permission

 136   *

 137   * Revision 1.23  2007/05/08 19:36:06  fplanque

 138   * automatic install of public blog list widget on new blogs

 139   *

 140   * Revision 1.22  2007/05/08 00:54:31  fplanque

 141   * public blog list as a widget

 142   *

 143   * Revision 1.21  2007/04/26 00:11:05  fplanque

 144   * (c) 2007

 145   *

 146   * Revision 1.20  2007/03/25 13:20:52  fplanque

 147   * cleaned up blog base urls

 148   * needs extensive testing...

 149   *

 150   * Revision 1.19  2007/01/23 08:57:35  fplanque

 151   * decrap!

 152   *

 153   * Revision 1.18  2007/01/23 04:19:50  fplanque

 154   * handling of blog owners

 155   *

 156   * Revision 1.17  2007/01/15 03:54:36  fplanque

 157   * pepped up new blog creation a little more

 158   *

 159   * Revision 1.16  2007/01/15 00:38:05  fplanque

 160   * pepped up "new blog" creation a little. To be continued.

 161   *

 162   */
 163  ?>


Généré le : Thu Nov 29 23:58:50 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics