| [ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This file implements the UI view for the Advanced blog 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 * Parts of this file are copyright (c)2004-2005 by Daniel HAHLER - {@link http://thequod.de/contact}. 10 * 11 * @license http://b2evolution.net/about/license.html GNU General Public License (GPL) 12 * 13 * {@internal Open Source relicensing agreement: 14 * Daniel HAHLER grants Francois PLANQUE the right to license 15 * Daniel HAHLER's contributions to this file and the b2evolution project 16 * under any OSI approved OSS license (http://www.opensource.org/licenses/). 17 * }} 18 * 19 * {@internal Below is a list of authors who have contributed to design/coding of this file: }} 20 * @author gorgeb: Bertrand GORGE / EPISTEMA 21 * @author blueyed: Daniel HAHLER 22 * 23 * @package admin 24 * 25 * 26 * @version $Id: _coll_advanced.form.php,v 1.2 2007/10/08 08:31:59 fplanque Exp $ 27 */ 28 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); 29 30 /** 31 * @var Blog 32 */ 33 global $edited_Blog; 34 35 global $Plugins; 36 37 global $basepath; 38 39 $Form = & new Form( NULL, 'blogadvanced_checkchanges' ); 40 41 $Form->begin_form( 'fform' ); 42 43 $Form->hidden_ctrl(); 44 $Form->hidden( 'action', 'update' ); 45 $Form->hidden( 'tab', 'advanced' ); 46 $Form->hidden( 'blog', $edited_Blog->ID ); 47 48 49 $Form->begin_fieldset( T_('After each new post...') ); 50 $ping_plugins = preg_split( '~\s*,\s*~', $edited_Blog->get_setting('ping_plugins'), -1, PREG_SPLIT_NO_EMPTY); 51 52 $available_ping_plugins = $Plugins->get_list_by_event('ItemSendPing'); 53 $displayed_ping_plugin = false; 54 if( $available_ping_plugins ) 55 { 56 foreach( $available_ping_plugins as $loop_Plugin ) 57 { 58 if( empty($loop_Plugin->code) ) 59 { // Ping plugin needs a code 60 continue; 61 } 62 $displayed_ping_plugin = true; 63 64 $checked = in_array( $loop_Plugin->code, $ping_plugins ); 65 $Form->checkbox_input( 'blog_ping_plugins[]', $checked, /* TRANS: verb */ T_('Ping ').$loop_Plugin->ping_service_name, array('value'=>$loop_Plugin->code, 'note'=>$loop_Plugin->ping_service_note) ); 66 67 while( ($key = array_search($loop_Plugin->code, $ping_plugins)) !== false ) 68 { 69 unset($ping_plugins[$key]); 70 } 71 } 72 } 73 if( ! $displayed_ping_plugin ) 74 { 75 echo '<p>'.T_('There are no ping plugins activated.').'</p>'; 76 } 77 78 // Provide previous ping services as hidden fields, in case the plugin is temporarily disabled: 79 foreach( $ping_plugins as $ping_plugin_code ) 80 { 81 $Form->hidden( 'blog_ping_plugins[]', $ping_plugin_code ); 82 } 83 $Form->end_fieldset(); 84 85 86 if( $current_User->check_perm( 'blog_admin', 'edit', false, $edited_Blog->ID ) ) 87 { // Permission to edit advanced admin settings 88 89 $Form->begin_fieldset( T_('Aggregation').' ['.T_('Admin').']' ); 90 $Form->text( 'aggregate_coll_IDs', $edited_Blog->get_setting( 'aggregate_coll_IDs' ), 30, T_('Blogs to aggregate'), T_('List blog IDs separated by ,'), 255 ); 91 $Form->end_fieldset(); 92 93 94 $Form->begin_fieldset( T_('Static file generation').' ['.T_('Admin').']' ); 95 $Form->text_input( 'source_file', $edited_Blog->get_setting( 'source_file' ), 30, T_('Source file'), 96 T_('This is the source .php (stub) file used to generate the static homepage.'), 97 array( 'input_prefix' => "<code>$basepath</code>", 'maxlength' => 255 ) ); 98 $Form->text_input( 'static_file', $edited_Blog->get_setting( 'static_file' ), 30, T_('Static file'), 99 T_('This is the .html file that will be created.'), 100 array( 'input_prefix' => "<code>$basepath</code>", 'maxlength' => 255 ) ); 101 if( $current_User->check_perm( 'blog_genstatic', 'any', false, $edited_Blog->ID ) ) 102 { 103 $Form->info( T_('Static page'), '<a href="admin.php?ctrl=collections&action=GenStatic&blog='.$edited_Blog->ID.'&redir_after_genstatic='.rawurlencode(regenerate_url( '', '', '', '&' )).'">'.T_('Generate now!').'</a>' ); 104 } 105 $Form->end_fieldset(); 106 107 108 $Form->begin_fieldset( T_('Media library').' ['.T_('Admin').']' ); 109 global $basepath, $media_subdir; 110 $Form->radio( 'blog_media_location', $edited_Blog->get( 'media_location' ), 111 array( 112 array( 'none', T_('None') ), 113 array( 'default', T_('Default'), 114 sprintf( T_('subdirectory "%s" (URL blog name) of %s'), $edited_Blog->urlname, $basepath.$media_subdir ) ), 115 array( 'subdir', T_('Subdirectory of media folder').':', 116 '', 117 ' <span class="nobr"><code>'.$basepath.$media_subdir.'</code><input 118 type="text" name="blog_media_subdir" class="form_text_input" size="20" maxlength="255" 119 class="'.( param_has_error('blog_media_subdir') ? 'field_error' : '' ).'" 120 value="'.$edited_Blog->dget( 'media_subdir', 'formvalue' ).'" /></span>', '' ), 121 array( 'custom', 122 T_('Custom location').':', 123 '', 124 '<fieldset>' 125 .'<div class="label">'.T_('directory').':</div><div class="input"><input 126 type="text" class="form_text_input" name="blog_media_fullpath" size="50" maxlength="255" 127 class="'.( param_has_error('blog_media_fullpath') ? 'field_error' : '' ).'" 128 value="'.$edited_Blog->dget( 'media_fullpath', 'formvalue' ).'" /></div>' 129 .'<div class="label">'.T_('URL').':</div><div class="input"><input 130 type="text" class="form_text_input" name="blog_media_url" size="50" maxlength="255" 131 class="'.( param_has_error('blog_media_url') ? 'field_error' : '' ).'" 132 value="'.$edited_Blog->dget( 'media_url', 'formvalue' ).'" /></div></fieldset>' ) 133 ), T_('Media dir location'), true 134 ); 135 $Form->end_fieldset(); 136 137 } 138 139 $Form->begin_fieldset( T_('Meta data') ); 140 $Form->text( 'blog_description', $edited_Blog->get( 'description' ), 60, T_('Short Description'), T_('This is is used in meta tag description and RSS feeds. NO HTML!'), 250, 'large' ); 141 $Form->text( 'blog_keywords', $edited_Blog->get( 'keywords' ), 60, T_('Keywords'), T_('This is is used in meta tag keywords. NO HTML!'), 250, 'large' ); 142 $Form->textarea( 'blog_notes', $edited_Blog->get( 'notes' ), 5, T_('Notes'), T_('Additional info. Appears in the backoffice.'), 50, 'large' ); 143 $Form->end_fieldset(); 144 145 146 $Form->end_form( array( 147 array( 'submit', 'submit', T_('Save !'), 'SaveButton' ), 148 array( 'reset', '', T_('Reset'), 'ResetButton' ) ) ); 149 150 151 /* 152 * $Log: _coll_advanced.form.php,v $ 153 * Revision 1.2 2007/10/08 08:31:59 fplanque 154 * nicer forms 155 * 156 * Revision 1.1 2007/06/25 10:59:34 fplanque 157 * MODULES (refactored MVC) 158 * 159 * Revision 1.20 2007/05/29 01:17:20 fplanque 160 * advanced admin blog settings are now restricted by a special permission 161 * 162 * Revision 1.19 2007/05/28 01:35:23 fplanque 163 * fixed static page generation 164 * 165 * Revision 1.18 2007/04/26 00:11:05 fplanque 166 * (c) 2007 167 * 168 * Revision 1.17 2006/12/17 23:42:38 fplanque 169 * Removed special behavior of blog #1. Any blog can now aggregate any other combination of blogs. 170 * Look into Advanced Settings for the aggregating blog. 171 * There may be side effects and new bugs created by this. Please report them :] 172 * 173 * Revision 1.16 2006/12/17 02:42:21 fplanque 174 * streamlined access to blog settings 175 * 176 * Revision 1.15 2006/12/16 01:30:47 fplanque 177 * Setting to allow/disable email subscriptions on a per blog basis 178 * 179 */ 180 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
|