$Table->display_body_start();
echo $ChapterCache->recurse($callbacks, $subset_ID, NULL, 0, 0, array('sorted' => true));
$Table->display_body_end();
$Table->display_list_end();
echo $Table->params['content_end'];
echo $results_params['after'];
/* fp> TODO: maybe... (a general group move of posts would be more useful actually)
echo '<p class="note">'.T_('<strong>Note:</strong> Deleting a category does not delete posts from that category. It will just assign them to the parent category. When deleting a root category, posts will be assigned to the oldest remaining category in the same collection (smallest category number).').'</p>';
*/
global $Settings, $dispatcher;
// Use a wrapper div to have margin around the form
echo '<div id="form_wrapper" style="margin: 2ex auto 1ex">';
$Form = new Form(NULL, 'cat_order_checkchanges', 'post', 'compact');
$Form->begin_form('fform', T_('Category order') . get_manual_link('categories_order'));
$Form->add_crumb('collection');
$Form->hidden('ctrl', 'coll_settings');
$Form->hidden('action', 'update');
$Form->hidden('blog', $Blog->ID);
$Form->hidden('tab', 'chapters');
$Form->radio_input('category_ordering', $Blog->get_setting('category_ordering'), array(array('value' => 'alpha', 'label' => T_('Alphabetically')), array('value' => 'manual', 'label' => T_('Manually'))), T_('Sort categories'), array('note' => '(' . T_('Note: can be overridden for sub-categories') . ')'));
$Form->end_form(array(array('submit', 'submit', T_('Save Changes!'), 'SaveButton')));
echo '</div>';
// form wrapper end
if (!$Settings->get('allow_moving_chapters')) {
    // TODO: check perm
    echo '<p class="alert alert-info">' . sprintf(T_('<strong>Note:</strong> Moving categories across blogs is currently disabled in the %sblogs settings%s.'), '<a href="' . $dispatcher . '?ctrl=collections&tab=blog_settings#fieldset_wrapper_categories">', '</a>') . '</p> ';
}
//Flush fadeout
$Session->delete('fadeout_array');
// Print JS to edit order of the chapters inline
echo_editable_column_js(array('column_selector' => '.cat_order_edit', 'ajax_url' => get_secure_htsrv_url() . 'async.php?action=cat_order_edit&blogid=' . $Blog->ID . '&' . url_crumb('catorder'), 'new_field_name' => 'new_cat_order', 'ID_value' => 'jQuery( this ).attr( "rel" )', 'ID_name' => 'cat_ID', 'field_type' => 'text'));
Example #2
0
$Form->hidden('action', 'update');
// --------------------------------------------
if ($current_User->check_perm('users', 'edit')) {
    $Form->begin_fieldset(T_('Locking down b2evolution for maintenance, upgrade or server switching...'));
    $Form->checkbox_input('system_lock', $Settings->get('system_lock'), T_('Lock system'), array('note' => T_('check this to prevent login (except for admins) and sending comments/messages. This prevents the DB from receiving updates (other than logging)') . '<br />' . T_('Note: for a more complete lock down, rename the file /conf/_maintenance.html to /conf/maintenance.html (complete lock) or /conf/imaintenance.html (gives access to /install)')));
    $Form->end_fieldset();
}
// --------------------------------------------
$Form->begin_fieldset(T_('Caching'));
$Form->checkbox_input('general_cache_enabled', $Settings->get('general_cache_enabled'), T_('Enable general cache'), array('note' => T_('Cache rendered pages that are not controlled by a skin. See Blog Settings for skin output caching.')));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Online Help') . get_manual_link('online help'));
$Form->checkbox_input('webhelp_enabled', $Settings->get('webhelp_enabled'), T_('Online Help links'), array('note' => T_('Online help links provide context sensitive help to certain features.')));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Hit & session logging') . get_manual_link('hit_logging'));
$Form->checklist(array(array('log_public_hits', 1, T_('on every public page'), $Settings->get('log_public_hits')), array('log_admin_hits', 1, T_('on every admin page'), $Settings->get('log_admin_hits'))), 'log_hits', T_('Log hits'));
// TODO: draw a warning sign if set to off
$Form->radio_input('auto_prune_stats_mode', $Settings->get('auto_prune_stats_mode'), array(array('value' => 'off', 'label' => T_('Off'), 'note' => T_('Not recommended! Your database will grow very large!'), 'onclick' => 'jQuery("#auto_prune_stats_container").hide();'), array('value' => 'page', 'label' => T_('On every page'), 'note' => T_('This is guaranteed to work but uses extra resources with every page displayed.'), 'onclick' => 'jQuery("#auto_prune_stats_container").show();'), array('value' => 'cron', 'label' => T_('With a scheduled job'), 'note' => T_('Recommended if you have your scheduled jobs properly set up.'), 'onclick' => 'jQuery("#auto_prune_stats_container").show();')), T_('Auto pruning'), array('note' => T_('Note: Even if you don\'t log hits, you still need to prune sessions!'), 'lines' => true));
echo '<div id="auto_prune_stats_container">';
$Form->text_input('auto_prune_stats', $Settings->get('auto_prune_stats'), 5, T_('Prune after'), T_('days. How many days of hits & sessions do you want to keep in the database for stats?'));
echo '</div>';
if ($Settings->get('auto_prune_stats_mode') == 'off') {
    // hide the "days" input field, if mode set to off:
    echo '<script type="text/javascript">jQuery("#auto_prune_stats_container").hide();</script>';
}
$Form->end_fieldset();
if ($current_User->check_perm('options', 'edit')) {
    $Form->end_form(array(array('submit', 'submit', T_('Save !'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
}
Example #3
0
// Determine if we are creating or updating...
$creating = is_create_action($action);
$Form = new Form(NULL, 'form');
$close_url = get_chapter_redirect_url(get_param('redirect_page'), $edited_Chapter->parent_ID, $edited_Chapter->ID);
$Form->global_icon(T_('Cancel editing!'), 'close', $close_url);
$Form->begin_form('fform', $creating ? T_('New category') : T_('Category'));
$Form->add_crumb('element');
$Form->hidden('action', $creating ? 'create' : 'update');
$Form->hiddens_by_key(get_memorized('action'));
$Form->begin_fieldset(T_('Properties') . get_manual_link('categories-tab'));
// We're essentially double checking here...
$edited_Blog =& $edited_Chapter->get_Blog();
$move = '';
if ($Settings->get('allow_moving_chapters') && !$creating) {
    // If moving cats between blogs is allowed:
    $move = ' ' . action_icon(T_('Move to a different blog...'), 'file_move', regenerate_url('action,cat_ID', 'cat_ID=' . $edited_Chapter->ID . '&amp;action=move'), T_('Move'));
}
$Form->info(T_('Collection'), $edited_Blog->get_maxlen_name() . $move);
$Form->select_input_options('cat_parent_ID', $ChapterCache->recurse_select($edited_Chapter->parent_ID, $subset_ID, true, NULL, 0, array($edited_Chapter->ID)), T_('Parent category'));
$Form->text_input('cat_name', $edited_Chapter->name, 40, T_('Name'), '', array('required' => true, 'maxlength' => 255));
$Form->text_input('cat_urlname', $edited_Chapter->urlname, 40, T_('URL "slug"'), T_('Used for clean URLs. Must be unique.'), array('maxlength' => 255));
$Form->text_input('cat_description', $edited_Chapter->description, 40, T_('Description'), T_('May be used as a title tag and/or meta description.'), array('maxlength' => 255));
$parent_cat_order = $edited_Chapter->get_parent_subcat_ordering();
if ($parent_cat_order == 'manual') {
    $Form->text_input('cat_order', $edited_Chapter->order, 5, T_('Order'), T_('For manual ordering of the categories.'), array('maxlength' => 11));
}
$Form->radio_input('cat_subcat_ordering', $edited_Chapter->get('subcat_ordering'), array(array('value' => 'parent', 'label' => T_('Same as parent')), array('value' => 'alpha', 'label' => T_('Alphabetically')), array('value' => 'manual', 'label' => T_('Manually'))), T_('Sort sub-categories'));
$Form->checkbox_input('cat_meta', $edited_Chapter->meta, T_('Meta category'), array('note' => T_('If you check this box you will not be able to put any posts into this category.')));
$Form->checkbox_input('cat_lock', $edited_Chapter->lock, T_('Locked category'), array('note' => T_('Check this to lock all posts under this category. (Note: for posts with multiple categories, the post is only locked if *all* its categories are locked.)')));
$Form->end_fieldset();
$Form->end_form(array(array('submit', 'submit', $creating ? T_('Record') : T_('Save Changes!'), 'SaveButton')));
Example #4
0
 * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.
 *
 * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
 *
 * @package admin
 *
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author fplanque: Francois PLANQUE.
 *
 * @version $Id: _wpxml_file.view.php 505 2011-12-09 20:54:21Z fplanque $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $dispatcher;
$Form = new Form(NULL, '', 'post', NULL, 'multipart/form-data');
$Form->begin_form('fform', T_('WordPress XML Importer'));
$Form->add_crumb('wpxml');
$Form->hidden_ctrl();
$Form->hidden('action', 'import');
$Form->begin_fieldset(T_('Select XML file'));
$Form->text_input('wp_file', '', 20, T_('WordPress XML File'), '', array('type' => 'file', 'required' => true));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Select a blog for import'));
$BlogCache =& get_BlogCache();
$BlogCache->none_option_text = '&nbsp;';
$Form->select_input_object('wp_blog_ID', param('wp_blog_ID', 'integer', 0), $BlogCache, T_('Blog for import'), array('note' => T_('This blog will be used for import.') . ' <a href="' . $dispatcher . '?ctrl=collections&action=new">' . T_('Create new blog') . ' &raquo;</a>', 'allow_none' => true, 'required' => true));
$Form->radio_input('import_type', param('import_type', 'string', 'replace'), array(array('value' => 'replace', 'label' => T_('Replace existing contents'), 'note' => T_('WARNING: this option will permanently remove existing Posts, comments, categories and tags from the selected blog.')), array('value' => 'append', 'label' => T_('Append to existing contents'))), '', array('lines' => true));
$Form->end_fieldset();
$Form->buttons(array(array('submit', 'submit', T_('Continue !'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
$Form->end_form();
Example #5
0
$Form->text_input($dummy_fields['email'], $email, 50, T_('Email'), '<br />' . T_('We respect your privacy. Your email will remain strictly confidential.'), array('placeholder' => $params['register_use_placeholders'] ? T_('Email address') : '', 'maxlength' => 255, 'class' => 'input_text wide_input', 'required' => true));
$registration_require_country = (bool) $Settings->get('registration_require_country');
if ($registration_require_country) {
    // country required
    $CountryCache =& get_CountryCache();
    $Form->select_country('country', param('country', 'integer', 0), $CountryCache, T_('Country'), array('allow_none' => true, 'required' => true));
}
$registration_require_firstname = (bool) $Settings->get('registration_require_firstname');
if ($registration_require_firstname) {
    // firstname required
    $Form->text_input('firstname', $firstname, 18, T_('First name'), T_('Your real first name.'), array('maxlength' => 50, 'class' => 'input_text', 'required' => true));
}
$registration_require_gender = $Settings->get('registration_require_gender');
if ($registration_require_gender != 'hidden') {
    // Display a gender field if it is not hidden
    $Form->radio_input('gender', $gender, array(array('value' => 'M', 'label' => T_('A man')), array('value' => 'F', 'label' => T_('A woman'))), T_('I am'), array('required' => $registration_require_gender == 'required'));
}
if ($Settings->get('registration_ask_locale')) {
    // ask user language
    $locale = 'en_US';
    $Form->select('locale', $locale, 'locale_options_return', T_('Locale'), T_('Preferred language'));
}
// Plugin fields
$Plugins->trigger_event('DisplayRegisterFormFieldset', array('Form' => &$Form, 'inskin' => true, 'use_placeholders' => $params['register_use_placeholders']));
// Submit button:
$submit_button = array(array('name' => 'register', 'value' => T_('Register my account now!'), 'class' => 'search btn-primary btn-lg'));
$Form->buttons_input($submit_button);
$Form->end_form();
echo $params['skin_form_after'];
echo '<div class="evo_form__login_links"' . $params['register_links_attrs'] . '>';
echo '<a href="' . get_login_url($source, $redirect_to) . '">&laquo; ' . T_('Already have an account... ?') . '</a>';
Example #6
0
if (extension_loaded('imap')) {
    $imap_extenssion_status = T_('(INSTALLED)');
} else {
    $imap_extenssion_status = '<b class="red">' . T_('(NOT INSTALLED)') . '</b>';
}
$Form->checkbox_input('eblog_enabled', $Settings->get('eblog_enabled'), T_('Enable Post by email'), array('note' => sprintf(T_('Note: This feature needs the php_imap extension %s.'), $imap_extenssion_status)));
$eblog_test_mode_value = isset($eblog_saved_test_mode_value) ? $eblog_saved_test_mode_value : $Settings->get('eblog_test_mode');
$Form->checkbox_input('eblog_test_mode', $eblog_test_mode_value, T_('Test Mode'), array('note' => T_('Check to run Post by Email in test mode. Nothing will be posted to the database nor will your inbox be altered.')));
$Form->text_input('eblog_server_host', $Settings->get('eblog_server_host'), 25, T_('Mail Server'), T_('Hostname or IP address of your incoming mail server.'), array('maxlength' => 255));
$Form->radio('eblog_method', $Settings->get('eblog_method'), array(array('pop3', T_('POP3')), array('imap', T_('IMAP'))), T_('Retrieval method'));
$Form->radio('eblog_encrypt', $Settings->get('eblog_encrypt'), array(array('none', T_('None')), array('ssl', T_('SSL')), array('tls', T_('TLS'))), T_('Encryption method'));
$eblog_novalidatecert_params = array('lines' => true);
if ($Settings->get('eblog_encrypt') == 'none') {
    $eblog_novalidatecert_params['disabled'] = 'disabled';
}
$Form->radio_input('eblog_novalidatecert', $Settings->get('eblog_novalidatecert'), array(array('value' => 0, 'label' => T_('Do not validate the certificate from the TLS/SSL server. Check this if you are using a self-signed certificate.')), array('value' => 1, 'label' => T_('Validate that the certificate from the TLS/SSL server can be trusted. Use this if you have a correctly signed certificate.'))), T_('Certificate validation'), $eblog_novalidatecert_params);
$Form->text_input('eblog_server_port', $Settings->get('eblog_server_port'), 5, T_('Port Number'), T_('Port number of your incoming mail server (Defaults: POP3: 110, IMAP: 143, SSL/TLS: 993).'), array('maxlength' => 6));
$Form->text_input('eblog_username', $Settings->get('eblog_username'), 25, T_('Account Name'), T_('User name for authenticating on your mail server. Usually it\'s your email address or a part before the @ sign.'), array('maxlength' => 255));
$Form->password_input('eblog_password', $Settings->get('eblog_password'), 25, T_('Password'), array('maxlength' => 255, 'note' => T_('Password for authenticating on your mail server.')));
$Form->checkbox('eblog_delete_emails', $Settings->get('eblog_delete_emails'), T_('Delete processed emails'), T_('Check this if you want processed messages to be deleted form server after successful processing.'));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Posting settings') . get_manual_link('post-by-email-posting-settings'));
// TODO: provide a list of categories to choose from
$Form->text_input('eblog_default_category', $Settings->get('eblog_default_category'), 5, T_('Default Category ID'), sprintf(T_('This is a default category for your posts.') . '<br />' . T_('You can use the following code in message body to define categories: %s. In this example 2 will be main category and 5, 47 extra categories.'), '<b>&lt;category&gt;2, 5, 47&lt;/category&gt;</b>'), array('maxlength' => 6));
$Form->text_input('eblog_default_title', $Settings->get('eblog_default_title'), 50, T_('Default title'), sprintf(T_('This is a default title for your posts.') . '<br />' . T_('You can use the following code in message body to define post title: %s.'), '<b>&lt;title&gt;Post title here&lt;/title&gt;</b>'), array('maxlength' => 255));
$Form->checkbox('eblog_add_imgtag', $Settings->get('eblog_add_imgtag'), T_('Add &lt;img&gt; tags'), T_('Display image attachments using &lt;img&gt; tags (instead of linking them through file manager).'));
$Form->text_input('eblog_subject_prefix', $Settings->get('eblog_subject_prefix'), 15, T_('Subject Prefix'), T_('Email subject must start with this prefix to be imported, messages that don\'t have this tag will be skipped.'), array('maxlength' => 255));
$Form->text_input('eblog_body_terminator', $Settings->get('eblog_body_terminator'), 15, T_('Body Terminator'), T_('Starting from this string, everything will be ignored, including this string.') . '<br />' . T_('You can use this to remove signature from message body.'), array('maxlength' => 255));
/* Automatically select a blog from where get plugins collection settings ( current_User should be able to create post on the selected blog )*/
$autoselect_blog = autoselect_blog('blog_post_statuses', 'edit');
$BlogCache =& get_BlogCache();
$Form->global_icon(T_('Cancel deleting!'), 'close', '?ctrl=comments&blog=' . $Blog->ID . '&tab3=' . $tab3, T_('cancel'), 4, 1);
$Form->begin_form('fform');
$Form->add_crumb('comment');
$Form->hidden('ctrl', 'comments');
$Form->begin_fieldset(T_('Mass deleting'));
$mass_type_value = 'delete';
$mass_types = array();
if (!$CommentList->is_trashfilter(false)) {
    // Don't display this option if trashed comments are also displayed
    $mass_types[] = array('value' => 'recycle', 'label' => T_('Move to Recycle bin'));
    $mass_type_value = 'recycle';
}
$mass_types[] = array('value' => 'delete', 'label' => T_('Delete permanently'));
$Form->labelstart = '<b>';
$Form->labelend = '</b>';
$Form->radio_input('mass_type', $mass_type_value, $mass_types, sprintf(T_('Are you sure you want to mass delete %s comments?'), $CommentList->total_rows), array('lines' => true));
$Form->submit_input(array('id' => 'mass_submit', 'name' => 'actionArray[mass_delete]', 'value' => $mass_type_value == 'recycle' ? T_('Recycle Now!') : T_('Delete Now!'), 'style' => 'margin-left:25%'));
$Form->end_fieldset();
$Form->end_form();
?>
<script type="text/javascript">
jQuery( 'input[name=mass_type]' ).click( function()
{
	if( jQuery( this ).val() == 'delete' )
	{
		jQuery( '#mass_submit' ).val( '<?php 
echo TS_('Delete Now!');
?>
' );
	}
	else
 * @var UserSettings
 */
global $UserSettings;
$Form = new Form(NULL, 'file_displaysettings_checkchanges');
$Form->global_icon(T_('Close settings!'), 'close', regenerate_url());
$Form->begin_form('fform', T_('Display settings') . get_manual_link('file-manager-display-settings'));
$Form->add_crumb('file');
$Form->hidden_ctrl();
$Form->hiddens_by_key(get_memorized());
$Form->begin_fieldset(T_('Images'));
$Form->checkbox('option_imglistpreview', $UserSettings->get('fm_imglistpreview'), T_('Thumbnails'), T_('Check to display thumbnails instead of icons for image files'));
$Form->checkbox('option_getimagesizes', $UserSettings->get('fm_getimagesizes'), T_('Dimensions'), T_('Check to display the pixel dimensions of image files'));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Columns'));
$Form->checkbox('option_showtypes', $UserSettings->get('fm_showtypes'), T_('File type'), T_('Based on file extension'));
$Form->radio_input('option_showdate', $UserSettings->get('fm_showdate'), array(array('value' => 'no', 'label' => T_('No')), array('value' => 'compact', 'label' => T_('Compact format')), array('value' => 'long', 'label' => T_('Long format'))), T_('Last change'));
$Form->checkbox('option_showfsperms', $UserSettings->get('fm_showfsperms'), T_('File permissions'), T_('Unix file permissions'));
$Form->checkbox('option_permlikelsl', $UserSettings->get('fm_permlikelsl'), '', T_('Check to display file permissions like "rwxr-xr-x" rather than short form'));
$Form->checkbox('option_showfsowner', $UserSettings->get('fm_showfsowner'), T_('File Owner'), T_('Unix file owner'));
$Form->checkbox('option_showfsgroup', $UserSettings->get('fm_showfsgroup'), T_('File Group'), T_('Unix file group'));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Options'));
$Form->checkbox('option_showhidden', $UserSettings->get('fm_showhidden'), T_('Hidden files'), T_('Check this to show system hidden files. System hidden files start with a dot (.)'));
$Form->checkbox('option_showevocache', $UserSettings->get('fm_showevocache'), '', T_('Check this to show _evocache folders (not recommended)'));
$Form->checkbox('option_dirsattop', !$UserSettings->get('fm_dirsnotattop'), T_('Folders first'), T_('Check to always display folders before files'));
$Form->checkbox('option_recursivedirsize', $UserSettings->get('fm_recursivedirsize'), T_('Folder sizes'), T_('Check to compute recursive size of folders'));
$Form->radio_input('option_allowfiltering', $UserSettings->get('fm_allowfiltering'), array(array('value' => 'no', 'label' => T_('Don\'t show')), array('value' => 'simple', 'label' => T_('Simple')), array('value' => 'regexp', 'label' => T_('With regular expressions'))), T_('Filter box'));
$Form->end_fieldset();
if ($current_User->check_perm('options', 'edit', false)) {
    // TODO: better perm check
    echo '<p class="note">' . T_('See also:') . ' ';
Example #9
0
$Form->begin_form('fform', $creating ? T_('New user field') : T_('User field'));
$Form->add_crumb('userfield');
$Form->hiddens_by_key(get_memorized('action'));
// (this allows to come back to the right list order & page)
$Form->select_input_array('ufdf_ufgp_ID', $edited_Userfield->group_ID, $edited_Userfield->get_groups(), T_('Group'), '', array('required' => true, 'force_keys_as_values' => true));
$Form->text_input('ufdf_name', $edited_Userfield->name, 50, T_('Field name'), '', array('maxlength' => 255, 'required' => true));
$Form->select_input_array('ufdf_type', $edited_Userfield->type, $edited_Userfield->get_types(), T_('Field type'), '', array('required' => true));
// Show this textarea only for field type with "Option list"
echo '<div id="div_ufdf_options"' . ($edited_Userfield->type != 'list' ? ' style="display:none"' : '') . '>';
$Form->textarea_input('ufdf_options', $edited_Userfield->options, 10, T_('Options'), array('required' => true, 'note' => T_('Enter one option per line')));
echo '</div>';
// Suggest values only for field type with "Single word"
echo '<div id="div_ufdf_suggest"' . ($edited_Userfield->type != 'word' ? ' style="display:none"' : '') . '>';
$Form->checkbox_input('ufdf_suggest', $edited_Userfield->suggest, T_('Suggest values'));
echo '</div>';
$Form->radio_input('ufdf_duplicated', $edited_Userfield->duplicated, $edited_Userfield->get_duplicateds(), T_('Multiple values'), array('required' => true, 'lines' => true));
$Form->radio_input('ufdf_required', $edited_Userfield->required, $edited_Userfield->get_requireds(), T_('Required?'), array('required' => true));
$Form->textarea_input('ufdf_bubbletip', $edited_Userfield->bubbletip, 5, T_('Bubbletip text'));
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[update]', T_('Update'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
}
?>
<script type="text/javascript">
	jQuery( '#ufdf_type' ).change( function()
	{	// Show textarea input only for field type with "Option list"
		if( jQuery( this ).val() == 'list' )
		{
			jQuery( '#div_ufdf_options' ).show();
		}
 * @global Filelist
 */
global $selected_Filelist;
global $more_than_one_selected_file, $perms_read_readonly, $field_options_read_readonly;
$Form = new Form(NULL, 'fm_perms_checkchanges');
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url());
$Form->begin_form('fform', T_('Change permissions'));
$Form->add_crumb('file');
$Form->hidden_ctrl();
$Form->hiddens_by_key(get_memorized());
$Form->hidden('action', 'edit_perms');
if ($more_than_one_selected_file) {
    // more than one file, provide default
    $Form->begin_fieldset(T_('Default'));
    if ($perms_read_readonly) {
        $Form->radio_input('edit_perms_default', $edit_perms_default, $field_options_read_readonly, T_('Default permissions'));
    } else {
        $Form->text_input('edit_perms_default', $edit_perms_default, 3, T_('Default permissions'));
    }
    $Form->info_field('', '<a id="checkallspan_edit_perms_set" href="#" onclick="toggleCheckboxes(\'fm_perms_checkchanges\', \'use_default_perms[]\', \'edit_perms_set\'); return false;">' . T_('check all') . '</a>');
    $Form->end_fieldset();
}
if ($more_than_one_selected_file) {
    // generate checkbox input to use with every file
    $Form->output = false;
    $Form->switch_layout('none');
    $use_default_perms_checkbox = $Form->checkbox_input('use_default_perms[]', $checked = 0, T_('Use default value'), array('value' => '%file_ID%', 'id' => 'use_default_perms_%file_ID%'));
    $Form->switch_layout(NULL);
    $Form->output = true;
}
$selected_Filelist->restart();
        if ($post_counter == 1) {
            // Add new option to select a category from previous post
            $categories = array_merge(array(array('value' => 'same', 'label' => T_('Same as above') . '<br />')), $categories);
        }
        // Use the same category for all others after first
        $selected_category_ID = 'same';
    } else {
        // First post, Use a default category as selected on load form
        global $Blog;
        $selected_category_ID = isset($Blog) ? $Blog->get_default_cat_ID() : 1;
    }
    if ($user_has_cat_perms) {
        // Field to create a new category if current user has the rights
        $categories[] = array('value' => 'new', 'label' => T_('New') . ':', 'suffix' => '<input type="text" id="new_categories[' . $post_counter . ']" name="new_categories[' . $post_counter . ']" class="form_text_input" maxlength="255" size="25" />');
    }
    $Form->radio_input('category[' . $post_counter . ']', $selected_category_ID, $categories, T_('Category'), array('suffix' => '<br />'));
    // Clear last option to create a new for next item with other $post_counter
    array_pop($categories);
    $Form->info(T_('Post content'), '<img src="' . $fm_FileRoot->ads_url . urldecode($item) . '" width="200" />');
    $Form->end_fieldset();
    $post_counter++;
}
$edited_Item = NULL;
$visibility_statuses = get_visibility_statuses('notes-string', array(), true, $blog);
if (empty($visibility_statuses)) {
    $visibility_statuses = get_visibility_statuses('notes-string');
    if (isset($visibility_statuses[$Blog->get_setting('default_post_status')])) {
        // Current user can create a post only with default status
        $Form->info(T_('Status of new posts'), $visibility_statuses[$Blog->get_setting('default_post_status')]);
    }
} else {
$Form->hidden('tab', 'blog_settings');
$Form->hidden('action', 'update_settings_blog');
// --------------------------------------------
$Form->begin_fieldset(T_('Display options') . get_manual_link('collections-display-options'));
$Form->select_input_options('blogs_order_by', array_to_option_list(get_coll_sort_options(), $Settings->get('blogs_order_by')), T_('Order blogs by'), T_('Select blog list order.'));
$Form->select_input_options('blogs_order_dir', array_to_option_list(array('ASC' => T_('Ascending'), 'DESC' => T_('Descending')), $Settings->get('blogs_order_dir')), T_('Order direction'), T_('Select default blog list order direction.'));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Caching') . get_manual_link('collections-caching-settings'));
$Form->checkbox_input('general_cache_enabled', $Settings->get('general_cache_enabled'), get_icon('page_cache_on') . ' ' . T_('Enable general cache'), array('note' => T_('Cache rendered pages that are not controlled by a skin. See Blog Settings for skin output caching.')));
$cache_note = '(' . T_('See Blog Settings for existing') . ')';
$Form->checklist(array(array('newblog_cache_enabled', 1, T_('Enable page cache for NEW blogs'), $Settings->get('newblog_cache_enabled'), false, $cache_note), array('newblog_cache_enabled_widget', 1, T_('Enable widget cache for NEW blogs'), $Settings->get('newblog_cache_enabled_widget'), false, $cache_note)), 'new_blogs_cahe', T_('Enable for new blogs'));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('After each new post or comment...') . get_manual_link('after_each_post_settings'));
$Form->radio_input('outbound_notifications_mode', $Settings->get('outbound_notifications_mode'), array(array('value' => 'off', 'label' => T_('Off'), 'note' => T_('No notification about your new content will be sent out.')), array('value' => 'immediate', 'label' => T_('Immediate'), 'note' => T_('This is guaranteed to work but may create an annoying delay after each post or comment publication.')), array('value' => 'cron', 'label' => T_('Asynchronous'), 'note' => T_('Recommended if you have your scheduled jobs properly set up.'))), T_('Outbound pings & email notifications'), array('lines' => true));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Categories') . get_manual_link('categories_global_settings'), array('id' => 'categories'));
$Form->checkbox_input('allow_moving_chapters', $Settings->get('allow_moving_chapters'), T_('Allow moving categories'), array('note' => T_('Check to allow moving categories accross blogs. (Caution: can break pre-existing permalinks!)')));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Cross posting') . get_manual_link('collections-cross-posting-settings'));
$Form->checklist(array(array('cross_posting', 1, T_('Allow cross-posting posts to several blogs'), $Settings->get('cross_posting'), false, T_('(Extra cats in different blogs)')), array('cross_posting_blogs', 1, T_('Allow moving posts between different blogs'), $Settings->get('cross_posting_blogs'), false, T_('(Main cat can move to different blog)'))), 'allow_cross_posting', T_('Cross Posting'));
$Form->checkbox_input('redirect_moved_posts', $Settings->get('redirect_moved_posts'), T_('Redirect if post has moved'), array('note' => T_('check to allow redirects to the correct blog when a post was found in a different blog.')));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Subscribing to new blogs') . get_manual_link('collections-subscription-settings'));
$Form->radio_input('subscribe_new_blogs', $Settings->get('subscribe_new_blogs'), array(array('value' => 'page', 'label' => T_('From blog page only')), array('value' => 'public', 'label' => T_('Show a list of all <b>Public</b> blogs allowing subscriptions')), array('value' => 'all', 'label' => T_('Show a list of <b>All</b> blogs allowing subsciptions'))), T_('Subscribing to new blogs'), array('lines' => true));
$Form->end_fieldset();
// --------------------------------------------
    $Form->begin_form('inskin');
    $Form->add_crumb('closeaccountform');
    $Form->hidden('redirect_to', url_add_param($Blog->gen_blogurl(), 'disp=closeaccount', '&'));
    $Form->hidden('action', 'closeaccount');
    // Display intro message
    echo '<p>' . nl2br($Settings->get('account_close_intro')) . '</p>' . "\n";
    // Display the reasons
    $reasons = trim($Settings->get('account_close_reasons'));
    if (!empty($reasons)) {
        $reasons = explode("\n", str_replace(array("\r\n", "\n\n"), "\n", $reasons));
        $reasons[] = NT_('Other') . ':';
        $reasons_options = array();
        foreach ($reasons as $reason) {
            $reasons_options[] = array('value' => $reason, 'label' => $reason);
        }
        $Form->radio_input('account_close_type', '', $reasons_options, '<b>' . T_('Reason') . '</b>', array('lines' => true));
    }
    $Form->textarea_input('account_close_reason', '', 6, NULL, array('cols' => 40, 'maxlength' => 255));
    echo '<div id="character_counter" class="section_requires_javascript">';
    echo '<div id="characters_left_block"></div>';
    ?>
	<script type="text/javascript">
		<?php 
    echo 'var counter_text = "' . T_('%s characters left') . '";';
    ?>
		jQuery("#characters_left_block").html( counter_text.replace( "%s", 255 ) );
		jQuery("#account_close_reason").bind( "keyup", function(event)
		{
			var char_left = 255 - this.value.length;
			if( char_left < 0 )
			{
$Form->begin_fieldset(T_('Advanced options'), array('id' => 'ffset_fileadvanced', 'class' => 'additional_file_settings'));
$Form->text_input('fm_default_chmod_dir', $Settings->get('fm_default_chmod_dir'), 4, T_('Default folder permissions'), T_('Default CHMOD (UNIX permissions) for new directories created by the file manager.'));
// fp> Does the following also applu to *uploaded* files? (It should)
$Form->text_input('fm_default_chmod_file', $Settings->get('fm_default_chmod_file'), 4, T_('Default file permissions'), T_('Default CHMOD (UNIX permissions) for new files created by the file manager.'));
if (empty($force_regexp_filename) || empty($force_regexp_dirname)) {
    // At least one of these strings can be configured in the UI:
    // Do not display regexp for filename if the force_regexp_filename var is set
    if (empty($force_regexp_filename)) {
        $Form->text('regexp_filename', $Settings->get('regexp_filename'), 40, T_('Valid filename'), T_('Regular expression'), 255);
    }
    // Do not display regexp for dirname if the force_regexp_dirname var is set
    if (empty($force_regexp_dirname)) {
        $Form->text('regexp_dirname', $Settings->get('regexp_dirname'), 40, T_('Valid dirname'), T_('Regular expression'), 255);
    }
}
$Form->radio_input('evocache_foldername', $Settings->get('evocache_foldername'), array(array('value' => '.evocache', 'label' => T_('Use .evocache folders (system hidden folders)')), array('value' => '_evocache', 'label' => T_('Use _evocache folders (compatible with all webservers)'))), T_('Cache folder names'), array('lines' => 2));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Image options') . get_manual_link('image-options'));
$Form->checkbox('exif_orientation', $Settings->get('exif_orientation'), T_('Use EXIF info in photos'), T_('Use orientation tag to automatically rotate thumbnails to upright position.'));
$resize_input_suffix = ' ' . T_('Fit to') . ' ';
$resize_input_suffix .= '<input type="text" id="fm_resize_width" name="fm_resize_width" class="form_text_input" size="4" maxlength="4" value="' . $Settings->get('fm_resize_width') . '" />';
$resize_input_suffix .= ' x ';
$resize_input_suffix .= '<input type="text" id="fm_resize_height" name="fm_resize_height" class="form_text_input" size="4" maxlength="4" value="' . $Settings->get('fm_resize_height') . '" />';
$resize_input_suffix .= ' ' . T_('pixels') . ' ';
$resize_input_suffix .= '<input type="text" id="fm_resize_quality" name="fm_resize_quality" class="form_text_input" size="3" maxlength="3" style="margin-left:10px" value="' . $Settings->get('fm_resize_quality') . '" />';
$resize_input_suffix .= ' % ' . T_('quality') . ' ';
$Form->checkbox_input('fm_resize_enable', $Settings->get('fm_resize_enable'), T_('Resize large images after upload'), array('input_suffix' => $resize_input_suffix));
$Form->end_fieldset();
if ($current_User->check_perm('options', 'edit', false)) {
    // We have permission to modify:
    $Form->buttons(array(array('submit', 'submit[update]', T_('Save Changes!'), 'SaveButton'), array('submit', 'submit[restore_defaults]', T_('Restore defaults'), 'ResetButton')));
Example #15
0
 * @package admin
 *
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author evfy-asimo: Attila Simo.
 *
 * @version $Id: _slug.form.php 4828 2013-09-20 17:48:05Z manuel $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Slug
 */
global $edited_Slug;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'slug_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', $creating ? T_('New Slug') . get_manual_link('slug-form') : T_('Slug') . get_manual_link('slug-form'));
$Form->add_crumb('slug');
$Form->hidden('action', $creating ? 'create' : 'update');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',slug_ID' : '')));
$Form->text_input('slug_title', $edited_Slug->get('title'), 50, T_('Slug'), '', array('maxlength' => 255, 'required' => true));
$Form->radio_input('slug_type', $creating ? 'item' : $edited_Slug->get('type'), array(array('value' => 'item', 'label' => T_('Item')), array('value' => 'help', 'label' => T_('Help'))), T_('Type'), array('lines' => 1));
$Form->text_input('slug_object_ID', $edited_Slug->get('itm_ID'), 50, T_('Object ID'), '', array('maxlength' => 11, 'required' => false));
if ($creating) {
    $Form->end_form(array(array('submit', 'submit', T_('Record'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
} else {
    $Form->end_form(array(array('submit', 'submit', T_('Update'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
}