[ 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_features.form.php (source)

   1  <?php
   2  /**

   3   * This file implements the UI view for the Collection features properties.

   4   *

   5   * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.

   6   * See also {@link http://sourceforge.net/projects/evocms/}.

   7   *

   8   * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}.

   9   *

  10   * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)

  11   *

  12   * {@internal Open Source relicensing agreement:

  13   * }}

  14   *

  15   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}

  16   *

  17   * @package admin

  18   *

  19   * @version $Id: _coll_features.form.php,v 1.2 2007/11/02 01:49:16 fplanque Exp $

  20   */
  21  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  22  
  23  /**

  24   * @var Blog

  25   */
  26  global $edited_Blog;
  27  
  28  ?>
  29  <script type="text/javascript">
  30      <!--
  31  	function show_hide_feedback_details(ob)
  32      {
  33          var fldset = document.getElementById( 'feedback_details_container' );
  34          if( ob.value == 'never' )
  35          {
  36              fldset.style.display = 'none';
  37          }
  38          else
  39          {
  40              fldset.style.display = '';
  41          }
  42      }
  43      //-->

  44  </script>
  45  <?php
  46  
  47  $Form = & new Form( NULL, 'coll_features_checkchanges' );
  48  
  49  $Form->begin_form( 'fform' );
  50  
  51  $Form->hidden_ctrl();
  52  $Form->hidden( 'action', 'update' );
  53  $Form->hidden( 'tab', 'features' );
  54  $Form->hidden( 'blog', $edited_Blog->ID );
  55  
  56  $Form->begin_fieldset( T_('Feedback options') );
  57      $Form->radio( 'blog_allowcomments', $edited_Blog->get( 'allowcomments' ),
  58                          array(  array( 'always', T_('Always on all posts'), T_('Always allow comments on every post'),
  59                                          '', 'onclick="show_hide_feedback_details(this);"'),
  60                          array( 'post_by_post', T_('Can be disabled on a per post basis'),  T_('Comments can be disabled on each post separatly'),
  61                                          '', 'onclick="show_hide_feedback_details(this);"'),
  62                          array( 'never', T_('No comments are allowed in this blog'), T_('Never allow any comments in this blog'),
  63                                          '', 'onclick="show_hide_feedback_details(this);"'),
  64                      ), T_('Allow comments'), true );
  65  
  66      echo '<div id="feedback_details_container">';
  67  
  68      $Form->radio( 'allow_rating', $edited_Blog->get_setting( 'allow_rating' ),
  69                          array(  array( 'always', T_('Always') ),
  70                                          array( 'never', T_('Never') ),
  71                      ), T_('Allow rating'), true );
  72  
  73      $status_options = array(
  74              'draft'      => T_('Draft'),
  75              'published'  => T_('Published'),
  76              'deprecated' => T_('Deprecated')
  77          );
  78      $Form->select_input_array( 'new_feedback_status', $edited_Blog->get_setting('new_feedback_status'), $status_options,
  79                  T_('New feedback status'), T_('This status will be assigned to any new comment/trackback (unless overriden by plugins).') );
  80  
  81      $Form->checkbox( 'blog_allowtrackbacks', $edited_Blog->get( 'allowtrackbacks' ), T_('Allow trackbacks'), T_("Allow other bloggers to send trackbacks to this blog, letting you know when they refer to it. This will also let you send trackbacks to other blogs.") );
  82  
  83      echo '</div>';
  84  
  85      if( $edited_Blog->get( 'allowcomments' ) == 'never' )
  86      { ?>
  87      <script type="text/javascript">
  88          <!--
  89          var fldset = document.getElementById( 'feedback_details_container' );
  90          fldset.style.display = 'none';
  91          //-->

  92      </script>
  93      <?php
  94      }
  95  
  96  $Form->end_fieldset();
  97  
  98  
  99  $Form->begin_fieldset( T_('XML Feeds (RSS, Atom)') );
 100      $Form->radio( 'feed_content', $edited_Blog->get_setting('feed_content'),
 101                                  array(  array( 'none', T_('No feeds') ),
 102                                                  array( 'title', T_('Titles only') ),
 103                                                  array( 'excerpt', T_('Post excerpts') ),
 104                                                  array( 'normal', T_('Post contents (stopping at "&lt;!-- more -->")') ),
 105                                              ), T_('Feed contents'), false, T_('How much content do you want to make available in feeds?') );
 106      $Form->text( 'posts_per_feed', $edited_Blog->get_setting('posts_per_feed'), 4, T_('Posts in RSS/Atom feeds'),  T_('How many of the latest posts do you want to include in RSS & Atom feeds?'), 4 );
 107  $Form->end_fieldset();
 108  
 109  $Form->begin_fieldset( T_('Subscriptions') );
 110      $Form->checkbox( 'allow_subscriptions', $edited_Blog->get_setting( 'allow_subscriptions' ), T_('Allow email subscriptions'), T_('Allow users to subscribe and receive email notifications for each new post and/or comment.') );
 111      // TODO: checkbox 'Enable RSS/Atom feeds'

 112      // TODO2: which feeds (skins)?

 113  $Form->end_fieldset();
 114  
 115  $Form->begin_fieldset( T_('List of public blogs') );
 116      $Form->checkbox( 'blog_in_bloglist', $edited_Blog->get( 'in_bloglist' ), T_('Include in public blog list'), T_('Check this if you want this blog to be advertised in the list of all public blogs on this system.') );
 117  $Form->end_fieldset();
 118  
 119  $Form->begin_fieldset( T_('Link blog / Blogroll') );
 120      $BlogCache = & get_Cache( 'BlogCache' );
 121      $Form->select_object( 'blog_links_blog_ID', $edited_Blog->get( 'links_blog_ID' ), $BlogCache, T_('Default linkblog'), T_('Will be displayed next to this blog (if your skin supports this).'), true );
 122  $Form->end_fieldset();
 123  
 124  if( $current_User->check_perm( 'blog_admin', 'edit', false, $edited_Blog->ID ) )
 125  {    // Permission to edit advanced admin settings
 126  
 127      $Form->begin_fieldset( T_('Skin and style').' ['.T_('Admin').']' );
 128  
 129          $SkinCache = & get_Cache( 'SkinCache' );
 130          $SkinCache->load_all();
 131          $Form->select_input_object( 'blog_skin_ID', $edited_Blog->skin_ID, $SkinCache, T_('Skin') );
 132          $Form->checkbox( 'blog_allowblogcss', $edited_Blog->get( 'allowblogcss' ), T_('Allow customized blog CSS file'), T_('You will be able to customize the blog\'s skin stylesheet with a file named style.css in the blog\'s media file folder.') );
 133          $Form->checkbox( 'blog_allowusercss', $edited_Blog->get( 'allowusercss' ), T_('Allow user customized CSS file for this blog'), T_('Users will be able to customize the blog and skin stylesheets with a file named style.css in their personal file folder.') );
 134      $Form->end_fieldset();
 135  
 136  }
 137  
 138  $Form->begin_fieldset( T_('Multiple authors') );
 139      $Form->checkbox( 'advanced_perms', $edited_Blog->get( 'advanced_perms' ), T_('Use advanced perms'), T_('This will turn on the advanced User and Group permissions tabs for this blog.') );
 140      $Form->checkbox( 'blog_use_workflow', $edited_Blog->get_setting( 'use_workflow' ), T_('Use workflow'), T_('This will notably turn on the Tracker tab in the Posts view.') );
 141  $Form->end_fieldset();
 142  
 143  
 144  $Form->end_form( array(
 145      array( 'submit', 'submit', T_('Save !'), 'SaveButton' ),
 146      array( 'reset', '', T_('Reset'), 'ResetButton' ) ) );
 147  
 148  
 149  /*

 150   * $Log: _coll_features.form.php,v $

 151   * Revision 1.2  2007/11/02 01:49:16  fplanque

 152   * comment ratings

 153   *

 154   * Revision 1.1  2007/06/25 10:59:35  fplanque

 155   * MODULES (refactored MVC)

 156   *

 157   * Revision 1.4  2007/05/31 03:02:23  fplanque

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

 159   * Except when upgrading.

 160   * Enable advanced perms in blog settings -> features

 161   *

 162   * Revision 1.3  2007/05/13 22:53:31  fplanque

 163   * allow feeds restricted to post excerpts

 164   *

 165   * Revision 1.2  2007/04/26 00:11:05  fplanque

 166   * (c) 2007

 167   *

 168   * Revision 1.1  2006/12/16 01:30:47  fplanque

 169   * Setting to allow/disable email subscriptions on a per blog basis

 170   *

 171   */
 172  ?>


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