Example #1
0
if (!empty($eblog_test_output)) {
    echo '<div style="margin-top:25px"></div>';
    if ($action == 'test_2') {
        echo '<div class="red center">' . T_('This is just a test run. Nothing will be posted to the database nor will your inbox be altered') . '</div>';
    }
    // Display scrollable div
    echo '<div style="padding: 6px; margin:5px; border: 1px solid #CCC; overflow:scroll; height: 350px">' . $eblog_test_output . '</div>';
}
$Form->end_fieldset();
$Form->begin_fieldset(T_('General settings') . get_manual_link('post-by-email-general-settings'));
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();
 */
global $Settings;
$Form = new Form(NULL, 'settings_checkchanges');
$Form->begin_form('fform');
$Form->add_crumb('emailsettings');
$Form->hidden('ctrl', 'email');
$Form->hidden('tab', get_param('tab'));
$Form->hidden('tab3', get_param('tab3'));
$Form->hidden('action', 'settings');
$Form->begin_fieldset(T_('Settings to decode the returned emails') . get_manual_link('return-path-configuration'));
if (extension_loaded('imap')) {
    $imap_extenssion_status = T_('(currently loaded)');
} else {
    $imap_extenssion_status = '<b class="red">' . T_('(currently NOT loaded)') . '</b>';
}
$Form->checkbox_input('repath_enabled', $Settings->get('repath_enabled'), T_('Enabled'), array('note' => sprintf(T_('Note: This feature needs the php_imap extension %s.'), $imap_extenssion_status)));
$Form->text_input('repath_server_host', $Settings->get('repath_server_host'), 25, T_('Mail Server'), T_('Hostname or IP address of your incoming mail server.'), array('maxlength' => 255));
$Form->radio('repath_method', $Settings->get('repath_method'), array(array('pop3', T_('POP3')), array('imap', T_('IMAP'))), T_('Retrieval method'));
$Form->radio('repath_encrypt', $Settings->get('repath_encrypt'), array(array('none', T_('None')), array('ssl', T_('SSL')), array('tls', T_('TLS'))), T_('Encryption method'));
$repath_novalidatecert_params = array('lines' => true);
if ($Settings->get('repath_encrypt') == 'none') {
    $repath_novalidatecert_params['disabled'] = 'disabled';
}
$Form->radio_input('repath_novalidatecert', $Settings->get('repath_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'), $repath_novalidatecert_params);
$Form->text_input('repath_server_port', $Settings->get('repath_server_port'), 5, T_('Port Number'), T_('Port number of your incoming mail server (Defaults: IMAP4/SSL: 993, IMAP4 with or without TLS: 143, POP3/SSL: 995, POP3 with or without TLS: 110).'), array('maxlength' => 6));
$Form->text_input('repath_username', $Settings->get('repath_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, 'autocomplete' => 'off'));
if ($current_User->check_perm('emails', 'edit')) {
    // Disply this fake hidden password field before real because Chrome ignores attribute autocomplete="off"
    echo '<input type="password" name="password" value="" style="display:none" />';
    // Real password field:
    $Form->password_input('repath_password', $Settings->get('repath_password'), 25, T_('Password'), array('maxlength' => 255, 'note' => T_('Password for authenticating on your mail server.'), 'autocomplete' => 'off'));
Example #3
0
$Form = new Form(NULL, 'usersettings_checkchanges');
$Form->begin_form('fform', '');
$Form->add_crumb('usersettings');
$Form->hidden('ctrl', 'usersettings');
$Form->hidden('action', 'update');
$Form->begin_fieldset(T_('Session Settings') . get_manual_link('session-settings'));
$Form->text_input('redirect_to_after_login', $Settings->get('redirect_to_after_login'), 60, T_('After login, redirect to'), T_('Users will be redirected there upon successful login, unless they are in process of doing something.'), array('maxlength' => NULL));
// fp>TODO: enhance UI with a general Form method for Days:Hours:Minutes:Seconds
$Form->duration_input('timeout_sessions', $Settings->get('timeout_sessions'), T_('Session timeout'), 'months', 'seconds', array('minutes_step' => 1, 'required' => true, 'note' => T_('If the user stays inactive for this long, he will have to log in again.')));
// $Form->text_input( 'timeout_sessions', $Settings->get('timeout_sessions'), 9, T_('Session timeout'), T_('seconds. How long can a user stay inactive before automatic logout?'), array( 'required'=>true) );
// fp>TODO: It may make sense to have a different (smaller) timeout for sessions with no logged user.
// fp>This might reduce the size of the Sessions table. But this needs to be checked against the hit logging feature.
$Form->duration_input('timeout_online', $Settings->get('timeout_online'), T_('Online/Offline timeout'), 'hours', 'seconds', array('minutes_step' => 1, 'required' => true, 'note' => T_('If the user stays inactive for this long, we will no longer display him as "online" and we will start sending him email notifications when things happen while he is away.')));
$Form->end_fieldset();
$Form->begin_fieldset(T_('User latitude') . get_manual_link('user-profile-latitude-settings'));
$Form->checkbox_input('allow_avatars', $Settings->get('allow_avatars', true), T_('Allow profile pictures'), array('note' => T_('Allow users to upload profile pictures.')));
$Form->text_input('uset_min_picture_size', $Settings->get('min_picture_size'), 5, T_('Minimum picture size'), '', array('note' => T_('pixels (width and height)')));
$name_editing_options = array(array('edited-user', T_('Can be edited by user')), array('edited-user-required', T_('Can be edited by user + required')), array('edited-admin', T_('Can be edited by admins only')), array('hidden', T_('Hidden')));
$Form->radio('uset_nickname_editing', $Settings->get('nickname_editing'), $name_editing_options, T_('Nickname'), true);
$Form->radio('uset_firstname_editing', $Settings->get('firstname_editing'), $name_editing_options, T_('Firstname'), true);
$Form->radio('uset_lastname_editing', $Settings->get('lastname_editing'), $name_editing_options, T_('Lastname'), true);
$location_options = array(array('optional', T_('Optional')), array('required', T_('Required')), array('hidden', T_('Hidden')));
$Form->radio('uset_location_country', $Settings->get('location_country'), $location_options, T_('Country'));
$Form->radio('uset_location_region', $Settings->get('location_region'), $location_options, T_('Region'));
$Form->radio('uset_location_subregion', $Settings->get('location_subregion'), $location_options, T_('Sub-region'));
$Form->radio('uset_location_city', $Settings->get('location_city'), $location_options, T_('City'));
$Form->text_input('uset_minimum_age', $Settings->get('minimum_age'), 3, T_('Minimum age'), '', array('input_suffix' => ' ' . T_('years old.')));
$Form->radio('uset_multiple_sessions', $Settings->get('multiple_sessions'), array(array('never', T_('Never allow')), array('adminset_default_no', T_('Let admins decide for each user, default to "no" for new users')), array('userset_default_no', T_('Let users decide, default to "no" for new users')), array('userset_default_yes', T_('Let users decide, default to "yes" for new users')), array('adminset_default_yes', T_('Let admins decide for each user, default to "yes" for new users')), array('always', T_('Always allow'))), T_('Multiple sessions'), true);
$Form->radio('uset_emails_msgform', $Settings->get('emails_msgform'), array(array('never', T_('Never allow')), array('adminset', T_('Let admins decide for each user, default set on Registration tab')), array('userset', T_('Let users decide, default set on Registration tab'))), T_('Receiving emails through a message form'), true);
$Form->end_fieldset();
if ($current_User->check_perm('users', 'edit')) {
 * @var Plugins
 */
global $Plugins;
$current_User->check_perm('options', 'edit', true);
global $Settings;
$BlogCache =& get_BlogCache();
$Form = new Form(NULL, 'msg_settings');
$Form->begin_form('fform', '');
$Form->add_crumb('msgsettings');
$Form->hidden('ctrl', 'msgsettings');
$Form->hidden('action', 'update');
$Form->begin_fieldset(T_('General settings') . get_manual_link('messages-general-settings'));
$Form->checkbox('allow_html_message', $Settings->get('allow_html_message'), T_('Allow HTML'), T_('Check to allow HTML in messages.') . ' (' . T_('HTML code will pass several sanitization filters.') . ')');
$Form->end_fieldset();
$Form->begin_fieldset(T_('Welcome message after account activation') . get_manual_link('messages-welcome-after-account-activation'));
$Form->checkbox_input('welcomepm_enabled', $Settings->get('welcomepm_enabled'), T_('Send Welcome PM'), array('note' => T_('Check to automatically send a welcome message to users when they activate their account.')));
$UserCache =& get_UserCache();
$User = $UserCache->get_by_login($Settings->get('welcomepm_from'));
if (!$User) {
    // Use login of the current user if user login is incorrect
    $User = $current_User;
}
$Form->username('welcomepm_from', $User, T_('From'), T_('User login.'));
$Form->text_input('welcomepm_title', $Settings->get('welcomepm_title'), 58, T_('Title'), '', array('maxlength' => 5000));
$Form->textarea_input('welcomepm_message', $Settings->get('welcomepm_message'), 15, T_('Message'), array('cols' => 45));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Info message to reporters after account deletion') . get_manual_link('messages-info-reporters-after-deletion'));
$Form->checkbox_input('reportpm_enabled', $Settings->get('reportpm_enabled'), T_('Send delete notification'), array('note' => T_('Check to allow sending a message to users who have reported an account whenever that account is deleted by a moderator.')));
$UserCache =& get_UserCache();
$User = $UserCache->get_by_login($Settings->get('reportpm_from'));
if (!$User) {
Example #5
0
        evo_flush();
    }
}
// BODY END / TABLE END:
$Table->display_body_end();
$Table->display_list_end();
if (!empty($import_files)) {
    $Form->begin_fieldset(T_('Select a blog for import'));
    $BlogCache =& get_BlogCache();
    $BlogCache->load_all('shortname,name', 'ASC');
    $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="' . $admin_url . '?ctrl=collections&action=new">' . T_('Create new blog') . ' &raquo;</a>', 'allow_none' => true, 'required' => true, 'loop_object_method' => 'get_extended_name'));
    $import_type = param('import_type', 'string', 'replace');
    $Form->radio_input('import_type', $import_type, 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.'), 'id' => 'import_type_replace')), '', array('lines' => true));
    echo '<div id="checkbox_delete_files"' . ($import_type == 'replace' ? '' : ' style="display:none"') . '>';
    $Form->checkbox_input('delete_files', param('delete_files', 'integer', 0), '', array('input_suffix' => '<label for="delete_files">' . T_(' Also delete files that will no longer be referenced in the target blog after replacing its contents') . '</label>', 'input_prefix' => '<span style="margin-left:25px"></span>'));
    echo '</div>';
    $Form->radio_input('import_type', $import_type, array(array('value' => 'append', 'label' => T_('Append to existing contents'), 'id' => 'import_type_append')), '', array('lines' => true));
    $Form->end_fieldset();
    $Form->buttons(array(array('submit', 'submit', T_('Continue!'), 'SaveButton')));
}
$Form->end_form();
?>
<script type="text/javascript">
jQuery( '.table_scroll td' ).click( function()
{
	jQuery( this ).parent().find( 'input[type=radio]' ).attr( 'checked', 'checked' );
} );
<?php 
if ($import_perm_view) {
    // Current user must has access to the import dir
Example #6
0
 *
 * @package admin
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author fplanque: Francois PLANQUE.
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Blog
 */
global $edited_Blog;
global $action, $next_action, $blogtemplate, $blog, $tab, $admin_url;
$Form = new Form();
$Form->begin_form('fform');
$Form->add_crumb('collection');
$Form->hidden_ctrl();
$Form->hidden('action', 'update_type');
$Form->hidden('tab', $tab);
$Form->hidden('blog', $blog);
$Form->begin_fieldset(T_('Collection type') . get_manual_link('collection-change-type'));
$collection_kinds = get_collection_kinds();
$radio_options = array();
foreach ($collection_kinds as $kind_value => $kind) {
    $radio_options[] = array($kind_value, $kind['name'], $kind['desc']);
}
$Form->radio('type', $edited_Blog->get('type'), $radio_options, T_('Type'), true);
$Form->checkbox_input('reset', 0, T_('Reset'), array('input_suffix' => ' ' . T_('Reset all parameters as for a new collection.'), 'note' => T_('(Only keep collection name, owner, URL, categories and content).')));
$Form->end_fieldset();
$Form->buttons(array(array('submit', 'submit', T_('Save Changes!'), 'SaveButton')));
$Form->end_form();
Example #7
0
            // Upgrade DB to UTF-8
            db_upgrade_to_utf8_ascii();
            break;
    }
    $block_item_Widget->disp_template_raw('block_end');
}
if ($current_User->check_perm('users', 'edit')) {
    // Setting to lock system
    global $Settings;
    $Form = new Form(NULL, 'settings_checkchanges');
    $Form->begin_form('fform');
    $Form->add_crumb('tools');
    $Form->hidden('ctrl', 'tools');
    $Form->hidden('action', 'update_tools');
    $Form->begin_fieldset(T_('Locking down b2evolution for maintenance, upgrade or server switching...') . get_manual_link('system-lock'));
    $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)')));
    if ($current_User->check_perm('options', 'edit')) {
        $Form->buttons(array(array('submit', 'submit', T_('Save Changes!'), 'SaveButton')));
    }
    $Form->end_fieldset();
    $Form->end_form();
}
// TODO: dh> this should really be a separate permission.. ("tools", "exec") or similar!
if ($current_User->check_perm('options', 'edit')) {
    // default admin actions:
    global $Settings;
    $block_item_Widget->title = T_('Cache management');
    // dh> TODO: add link to delete all caches at once?
    $block_item_Widget->disp_template_replaced('block_start');
    echo '<ul>';
    echo '<li><a href="' . regenerate_url('action', 'action=del_itemprecache&amp;' . url_crumb('tools')) . '">' . T_('Clear pre-rendered item cache (DB)') . '</a></li>';
Example #8
0
$Form->hidden('ctrl', 'email');
$Form->hidden('tab', 'settings');
$Form->hidden('tab3', get_param('tab3'));
$Form->hidden('action', 'settings');
if ($current_User->check_perm('emails', 'edit')) {
    $Form->begin_fieldset(T_('Test saved settings') . get_manual_link('smtp-gateway-settings'));
    $url = '?ctrl=email&amp;tab=settings&amp;tab3=smtp&amp;' . url_crumb('emailsettings') . '&amp;action=';
    $Form->info_field(T_('Perform tests'), '<a href="' . $url . 'test_smtp">[' . T_('server connection') . ']</a>&nbsp;&nbsp;');
    if (!empty($smtp_test_output)) {
        echo '<div style="margin-top:25px"></div>';
        // Display scrollable div
        echo '<div style="padding: 6px; margin:5px; border: 1px solid #CCC; overflow:scroll; height: 350px">' . $smtp_test_output . '</div>';
    }
    $Form->end_fieldset();
}
$Form->begin_fieldset(T_('SMTP Server connection settings') . get_manual_link('smtp-gateway-settings'));
$Form->checkbox_input('smtp_enabled', $Settings->get('smtp_enabled'), T_('Enabled'), array('note' => sprintf(T_('Note: This feature needs PHP version 5.2 or higher ( Currently installed: %s )'), phpversion())));
$Form->text_input('smtp_server_host', $Settings->get('smtp_server_host'), 25, T_('SMTP Host'), T_('Hostname or IP address of your SMTP server.'), array('maxlength' => 255));
$Form->text_input('smtp_server_port', $Settings->get('smtp_server_port'), 5, T_('Port Number'), T_('Port number of your SMTP server (Defaults: SSL: 443, TLS: 587).'), array('maxlength' => 6));
$Form->radio('smtp_server_security', $Settings->get('smtp_server_security'), array(array('none', T_('None')), array('ssl', T_('SSL')), array('tls', T_('TLS'))), T_('Encryption Method'));
$Form->text_input('smtp_server_username', $Settings->get('smtp_server_username'), 25, T_('SMTP Username'), T_('User name for authenticating on your SMTP server.'), array('maxlength' => 255, 'autocomplete' => 'off'));
if ($current_User->check_perm('emails', 'edit')) {
    // Disply this fake hidden password field before real because Chrome ignores attribute autocomplete="off"
    echo '<input type="password" name="password" value="" style="display:none" />';
    // Real password field:
    $Form->password_input('smtp_server_password', $Settings->get('smtp_server_password'), 25, T_('SMTP Password'), array('maxlength' => 255, 'note' => T_('Password for authenticating on your SMTP server.'), 'autocomplete' => 'off'));
}
$Form->end_fieldset();
if ($current_User->check_perm('emails', 'edit')) {
    $Form->end_form(array(array('submit', '', T_('Save Changes!'), 'SaveButton')));
}
 */
global $Settings;
$Form = new Form(NULL, 'settings_checkchanges');
$Form->begin_form('fform', '', array('onsubmit' => 'var es=this.elements; for( var i=0; i < es.length; i++ ) { es[i].disabled=false; };'));
$Form->add_crumb('collectionsettings');
$Form->hidden('ctrl', 'collections');
$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.')));
    echo '<p class="center orange">' . T_('This collection is for logged in users only.') . ' ' . T_('It is recommended to keep pings disabled.') . '</p>';
} elseif ($edited_Blog->get_setting('allow_access') == 'members') {
    echo '<p class="center orange">' . T_('This collection is for members only.') . ' ' . T_('It is recommended to keep pings disabled.') . '</p>';
}
$ping_plugins = preg_split('~\\s*,\\s*~', $edited_Blog->get_setting('ping_plugins'), -1, PREG_SPLIT_NO_EMPTY);
$available_ping_plugins = $Plugins->get_list_by_event('ItemSendPing');
$displayed_ping_plugin = false;
if ($available_ping_plugins) {
    foreach ($available_ping_plugins as $loop_Plugin) {
        if (empty($loop_Plugin->code)) {
            // Ping plugin needs a code
            continue;
        }
        $displayed_ping_plugin = true;
        $checked = in_array($loop_Plugin->code, $ping_plugins);
        $Form->checkbox_input('blog_ping_plugins[]', $checked, sprintf(T_('Ping %s'), $loop_Plugin->ping_service_name), array('value' => $loop_Plugin->code, 'note' => $loop_Plugin->ping_service_note));
        while (($key = array_search($loop_Plugin->code, $ping_plugins)) !== false) {
            unset($ping_plugins[$key]);
        }
    }
}
if (!$displayed_ping_plugin) {
    echo '<p>' . T_('There are no ping plugins activated.') . '</p>';
}
// Provide previous ping services as hidden fields, in case the plugin is temporarily disabled:
foreach ($ping_plugins as $ping_plugin_code) {
    $Form->hidden('blog_ping_plugins[]', $ping_plugin_code);
}
$Form->end_fieldset();
$Form->begin_fieldset(T_('External Feeds') . get_manual_link('external_feeds'));
$Form->text_input('atom_redirect', $edited_Blog->get_setting('atom_redirect'), 50, T_('Atom Feed URL'), T_('Example: Your Feedburner Atom URL which should replace the original feed URL.') . '<br />' . sprintf(T_('Note: the original URL was: %s'), url_add_param($edited_Blog->get_item_feed_url('_atom'), 'redir=no')), array('maxlength' => 255, 'class' => 'large'));
Example #11
0
 * @package admin
 *
 * @version $Id: _xmlrpc.form.php 3328 2013-03-26 11:44:11Z yura $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var User
 */
global $current_User;
/**
 * @var GeneralSettings
 */
global $Settings;
global $baseurl;
$Form = new Form(NULL, 'remotepublish_checkchanges');
$Form->begin_form('fform');
$Form->add_crumb('globalsettings');
$Form->hidden('ctrl', 'remotepublish');
$Form->hidden('tab', 'xmlrpc');
$Form->hidden('action', 'update');
// fp> TODO: it would be awesome to be able to enable the different APIs individually
// that way you minimalize security/spam risks by enable just what you need.
$Form->begin_fieldset(T_('Remote publishing') . get_manual_link('remote_publishing'));
$Form->checkbox_input('general_xmlrpc', $Settings->get('general_xmlrpc'), T_('Enable XML-RPC'), array('note' => T_('Enable the Movable Type, MetaWeblog, WordPress, Blogger and B2 XML-RPC publishing protocols.')));
$Form->text_input('xmlrpc_default_title', $Settings->get('xmlrpc_default_title'), 50, T_('Default title'), '<br />' . T_('Default title for items created with a XML-RPC API that doesn\'t send a post title (e. g. the Blogger API).'), array('maxlength' => 255));
$Form->end_fieldset();
if ($current_User->check_perm('options', 'edit')) {
    $Form->end_form(array(array('submit', '', T_('Update'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
}
$Form = new Form(NULL, 'files_checkchanges');
$Form->begin_form('fform', T_('File manager settings'));
$Form->add_crumb('file');
$Form->hidden('ctrl', 'fileset');
$Form->hidden('action', 'update');
$Form->begin_fieldset(T_('Accessible file roots') . get_manual_link('accessible_file_roots'), array('id' => 'ffset_fileroots', 'class' => 'additional_file_settings'));
$Form->checkbox('fm_enable_roots_blog', $Settings->get('fm_enable_roots_blog'), T_('Enable blog directories'), T_('Check to enable root directories for blogs.'));
$Form->checkbox('fm_enable_roots_user', $Settings->get('fm_enable_roots_user'), T_('Enable user directories'), T_('Check to enable root directories for users.'));
$Form->checkbox('fm_enable_roots_shared', $Settings->get('fm_enable_roots_shared'), T_('Enable shared directory'), T_('Check to enable shared root directory.'));
$Form->checkbox('fm_enable_roots_skins', $Settings->get('fm_enable_roots_skins'), T_('Enable skins directory'), T_('Check to enable root directory for skins.'));
// fp> note: meaning may change to 1 dir per (installed) skin
$Form->end_fieldset();
$Form->begin_fieldset(T_('File creation options'), array('id' => 'ffset_filecreate', 'class' => 'additional_file_settings'));
$Form->checkbox('fm_enable_create_dir', $Settings->get('fm_enable_create_dir'), T_('Enable creation of folders'), T_('Check to enable creation of directories.'));
$Form->checkbox('fm_enable_create_file', $Settings->get('fm_enable_create_file'), T_('Enable creation of files'), T_('Check to enable creation of files.'));
$Form->checkbox_input('upload_enabled', $Settings->get('upload_enabled', true), T_('Enable upload of files'), array('note' => T_('Check to allow uploading files in general.'), 'onclick' => JS_showhide_ffield_on_this('upload_maxkb')));
$Form->text_input('upload_maxkb', $Settings->get('upload_maxkb'), 6, T_('Maximum upload filesize'), sprintf(T_('KB. This cannot be higher than your PHP/Webserver setting (PHP: %s) and the limit of %s (in %s), which is currently %s!'), ini_get('upload_max_filesize') . '/' . ini_get('post_max_size') . ' (upload_max_filesize/post_max_size)', '$upload_maxmaxkb', '/conf/_advanced.php', $upload_maxmaxkb . ' ' . T_('KB')), array('maxlength' => 7, 'required' => true));
// Javascript to init hidden/shown state:
echo JS_showhide_ffield_on_checkbox('upload_maxkb', 'upload_enabled');
$Form->end_fieldset();
$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
Example #13
0
global $Settings;
global $dispatcher;
global $collections_Module;
$Form = new Form(NULL, 'settings_checkchanges');
$Form->begin_form('fform', '', array('onsubmit' => 'var es=this.elements; for( var i=0; i < es.length; i++ ) { es[i].disabled=false; };'));
$Form->add_crumb('display');
$Form->hidden('ctrl', 'display');
$Form->hidden('action', 'update');
$Form->hidden('tab', 'display');
if (isset($GLOBALS['files_Module'])) {
    load_funcs('files/model/_image.funcs.php');
    $params['force_keys_as_values'] = true;
}
// --------------------------------------------
$Form->begin_fieldset(T_('Profile pictures') . get_manual_link('profile-picture-settings'));
$Form->checkbox_input('use_gravatar', $Settings->get('use_gravatar'), T_('Use gravatar'), array('note' => T_('Fall back to Gravatar if a user has not uploaded a profile picture.')));
$default_avatar_unknown = get_default_avatar_url();
$default_avatar_men = get_default_avatar_url('M');
$default_avatar_women = get_default_avatar_url('F');
$default_images_info = '<br />' . T_('For unknown gender') . ': <a href="' . $default_avatar_unknown . '" target="_blank">' . $default_avatar_unknown . '</a>';
$default_images_info .= '<br />' . T_('For men') . ': <a href="' . $default_avatar_men . '" target="_blank">' . $default_avatar_men . '</a>';
$default_images_info .= '<br />' . T_('For women') . ': <a href="' . $default_avatar_women . '" target="_blank">' . $default_avatar_women . '</a>';
$Form->radio('default_gravatar', $Settings->get('default_gravatar'), array(array('b2evo', T_('Default image'), $default_images_info), array('', 'Gravatar'), array('identicon', 'Identicon'), array('monsterid', 'Monsterid'), array('wavatar', 'Wavatar'), array('retro', 'Retro')), T_('Default gravatars'), true, T_('Gravatar users can choose to set up a unique icon for themselves, and if they don\'t, they will be assigned a default image.'));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Username display options') . get_manual_link('user-username-display-options'));
$Form->radio('username_display', $Settings->get('username_display'), array(array('login', T_('Usernames/Logins'), T_('Secure options')), array('name', T_('Friendly names (Nickname or Firstname if available)'), T_('WARNING: this may allow users to fake their identity'))), T_('What to display'), true);
$Form->checkbox_input('gender_colored', $Settings->get('gender_colored'), T_('Display gender in back-office'), array('note' => T_('Use colored usernames to differentiate men & women.')));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Username display in back-office') . get_manual_link('user-bubble-tips-settings'));
$Form->hidden('action', 'update_settings');
// --------------------------------------------
if (isset($collections_Module)) {
    $Form->begin_fieldset(T_('Display options') . get_manual_link('collections-display-options'));
    $BlogCache =& get_BlogCache();
    $Form->select_input_object('default_blog_ID', $Settings->get('default_blog_ID'), $BlogCache, T_('Default blog to display'), array('note' => T_('This blog will be displayed on index.php.') . ' <a href="' . $dispatcher . '?ctrl=collections&action=new">' . T_('Create new blog') . ' &raquo;</a>', 'allow_none' => true, 'class' => '', 'loop_object_method' => 'get_maxlen_name', 'onchange' => ''));
    $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_('Timeouts') . get_manual_link('collections-timeouts'));
$Form->duration_input('reloadpage_timeout', (int) $Settings->get('reloadpage_timeout'), T_('Reload-page timeout'), 'minutes', 'seconds', array('minutes_step' => 1, 'required' => true));
// $Form->text_input( 'reloadpage_timeout', (int)$Settings->get('reloadpage_timeout'), 5,
// T_('Reload-page timeout'), T_('Time (in seconds) that must pass before a request to the same URI from the same IP and useragent is considered as a new hit.'), array( 'maxlength'=>5, 'required'=>true ) );
$Form->checkbox_input('smart_view_count', $Settings->get('smart_view_count'), T_('Smart view counting'), array('note' => T_('Check this to count post views only once per session and ignore reloads.') . get_manual_link('post_views_counting')));
$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'), 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->radio_input('chapter_ordering', $Settings->get('chapter_ordering'), array(array('value' => 'alpha', 'label' => T_('Alphabetical')), array('value' => 'manual', 'label' => T_('Manual '))), T_('Ordering of categories'));
Example #15
0
}
$current_User->check_perm('options', 'edit', true);
global $Settings;
$BlogCache =& get_BlogCache();
$Form = new Form(NULL, 'msg_settings');
$Form->begin_form('fform', '');
$Form->add_crumb('msgsettings');
$Form->hidden('ctrl', 'msgsettings');
$Form->hidden('action', 'update');
$Form->begin_fieldset(T_('General settings'));
// set link to options
$messages_link_to = $Settings->get('messages_link_to');
$admin_selected = $messages_link_to == 'admin' ? 'selected="selected"' : '';
$link_to_options = '<option value="admin" ' . $admin_selected . '>admin</option>';
$link_to_options .= $BlogCache->get_option_list($messages_link_to);
$Form->select_input_options('messages_link_to', $link_to_options, T_('Messaging emails link to'));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Welcome message after account activation'));
$Form->checkbox_input('welcomepm_enabled', $Settings->get('welcomepm_enabled'), T_('Send Welcome PM'), array('note' => T_('Check to automatically send a welcome message to users when they activate their account.')));
$UserCache =& get_UserCache();
$User = $UserCache->get_by_login($Settings->get('welcomepm_from'));
if (!$User) {
    // Use login of the current user if user login is incorrect
    $User = $current_User;
}
$Form->username('welcomepm_from', $User, T_('From'), T_('User login.'));
$Form->text_input('welcomepm_title', $Settings->get('welcomepm_title'), 58, T_('Title'), '', array('maxlength' => 5000));
$Form->textarea_input('welcomepm_message', $Settings->get('welcomepm_message'), 15, T_('Message'), array('cols' => 45));
$Form->end_fieldset();
$Form->buttons(array(array('submit', 'submit', T_('Save !'), 'SaveButton')));
$Form->end_form();
Example #16
0
$Form->global_icon(T_('Delete this userfield!'), 'delete', regenerate_url('action', 'action=delete&amp;' . url_crumb('userfield')));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$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' )
		{
 * @var GeneralSettings
 */
global $Settings;
global $admin_url;
global $collections_Module;
global $instance_name;
$Form = new Form(NULL, 'settings_checkchanges');
$Form->begin_form('fform', '', array('onsubmit' => 'var es=this.elements; for( var i=0; i < es.length; i++ ) { es[i].disabled=false; };'));
$Form->add_crumb('collectionsettings');
$Form->hidden('ctrl', 'collections');
$Form->hidden('tab', get_param('tab'));
$Form->hidden('action', 'update_settings_site');
// --------------------------------------------
if ($current_User->check_perm('users', 'edit')) {
    $Form->begin_fieldset(T_('Locking down b2evolution for maintenance, upgrade or server switching...') . get_manual_link('system-lock'));
    $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_('Global Site Settings') . get_manual_link('global-site-settings'));
$Form->text_input('site_code', $Settings->get('site_code'), 10, T_('Site code'), '$instance_name = ' . $instance_name, array('maxlength' => 20));
$Form->color_input('site_color', $Settings->get('site_color'), T_('Site color'), T_('E-g: #ff0000 for red'));
$Form->text_input('notification_short_name', $Settings->get('notification_short_name'), 50, T_('Short site name'), T_('Shared with email settings'), array('maxlength' => 127, 'required' => true));
$Form->text_input('notification_long_name', $Settings->get('notification_long_name'), 50, T_('Long site name'), T_('Shared with email settings'), array('maxlength' => 255));
$Form->text_input('notification_logo', $Settings->get('notification_logo'), 50, T_('Small site logo (URL)'), T_('Shared with email settings'), array('maxlength' => 5000));
$Form->text_input('notification_logo_large', $Settings->get('notification_logo_large'), 50, T_('Large site logo (URL)'), '', array('maxlength' => 5000));
$Form->text_input('site_footer_text', $Settings->get('site_footer_text'), 50, T_('Site footer text'), '', array('maxlength' => 5000));
$Form->checkbox_input('site_skins_enabled', $Settings->get('site_skins_enabled'), T_('Enable site skins'), array('note' => T_('Enables a sitewide header and footer')));
$Form->text_input('site_terms', $Settings->get('site_terms'), 7, T_('Terms & Conditions'), T_('Enter ID of the page containing the terms & conditions.'), array('maxlength' => 11));
$Form->end_fieldset();
// --------------------------------------------
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();
$Form->begin_fieldset();
while ($l_File =& $selected_Filelist->get_next()) {
    if ($perms_read_readonly) {
        // readonly/write only (WINDOWS): display radio inputs to change readonly/write
        $field_options = $field_options_read_readonly;
        $field_params = array();
        if (!empty($use_default_perms_checkbox)) {
            $field_params['field_suffix'] = str_replace('%file_ID%', $l_File->get_md5_ID(), $use_default_perms_checkbox);
        }
        $l_perms = $l_File->get_perms('octal');
        if ($l_perms == 555) {
Example #19
0
$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'));
// 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_('Blog'), $edited_Blog->get_maxlen_name() . $move);
$Form->select_input_options('cat_parent_ID', $GenericCategoryCache->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));
if ($Settings->get('chapter_ordering') == 'manual') {
    $Form->text_input('cat_order', $edited_Chapter->order, 5, T_('Order'), T_('For manual ordering of the categories.'), array('maxlength' => 11));
}
$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();
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')));
}
 * @package evocore
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var User
 */
global $current_User;
/**
 * @var GeneralSettings
 */
global $Settings;
global $dispatcher;
global $collections_Module;
$Form = new Form(NULL, 'closing_checkchanges');
$Form->begin_form('fform', '', array('onsubmit' => 'var es=this.elements; for( var i=0; i < es.length; i++ ) { es[i].disabled=false; };'));
$Form->add_crumb('accountclose');
$Form->hidden('ctrl', 'accountclose');
$Form->hidden('action', 'update');
// --------------------------------------------
$Form->begin_fieldset(T_('Account closing') . get_manual_link('account-closing-settings'));
$Form->checkbox_input('account_close_enabled', $Settings->get('account_close_enabled'), T_('Allow closing'), array('note' => T_('check to allow users to close their account themselves.')));
$Form->textarea('account_close_intro', $Settings->get('account_close_intro'), 5, T_('Intro text'), T_('Enter a message to display to users who want to close their account.'), 60);
$Form->textarea('account_close_reasons', $Settings->get('account_close_reasons'), 5, T_('Closing reasons'), T_('Enter one possible reason per line. There will always be an "Other" reason added at the end.'), 60);
$Form->textarea('account_close_byemsg', $Settings->get('account_close_byemsg'), 5, T_('Good-bye message'), T_('Enter a text to display after closing the account.'), 60);
$Form->end_fieldset();
// --------------------------------------------
if ($current_User->check_perm('users', 'edit')) {
    $Form->end_form(array(array('submit', 'submit', T_('Save Changes!'), 'SaveButton')));
}
Example #21
0
global $current_User;
/**
 * @var GeneralSettings
 */
global $Settings;
global $dispatcher;
global $collections_Module;
$Form = new Form(NULL, 'settings_checkchanges');
$Form->begin_form('fform', '', array('onsubmit' => 'var es=this.elements; for( var i=0; i < es.length; i++ ) { es[i].disabled=false; };'));
$Form->add_crumb('globalsettings');
$Form->hidden('ctrl', 'gensettings');
$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));
global $baseurl;
$Form = new Form(NULL, 'settings_checkchanges');
$Form->begin_form('fform', '', array('onsubmit' => 'var es=this.elements; for( var i=0; i < es.length; i++ ) { es[i].disabled=false; };'));
$Form->add_crumb('registration');
$Form->hidden('ctrl', 'registration');
$Form->hidden('action', 'update');
$Form->hidden('tab', 'registration');
// --------------------------------------------
$Form->begin_fieldset(T_('Default user permissions') . get_manual_link('default-user-permissions-settings'));
$Form->radio('newusers_canregister', $Settings->get('newusers_canregister'), array(array('no', T_('No (Only admins can create new users)')), array('invite', T_('Users can register only with an Invitation code/link')), array('yes', T_('Users can register themselves freely'))), T_('New users can register'), true);
$disabled_param_links = array();
if ($Settings->get('newusers_canregister') == 'no') {
    // Disable the field below when registration is not allowed
    $disabled_param_links['disabled'] = 'disabled';
}
$Form->checkbox_input('registration_is_public', $Settings->get('registration_is_public'), T_('Registration links'), array_merge(array('note' => T_('Check to show self-registration links to the public.')), $disabled_param_links));
$disabled_param_grouplevel = array();
if ($Settings->get('newusers_canregister') != 'yes') {
    // Disable group and level fields below when registration is not allowed freely
    $disabled_param_grouplevel['disabled'] = 'disabled';
}
$Form->checkbox_input('quick_registration', $Settings->get('quick_registration'), T_('Quick registration'), array_merge(array('note' => T_('Check to allow registering with email only (no username, no password) using the quick registration widget.')), $disabled_param_grouplevel));
$GroupCache =& get_GroupCache();
$Form->select_input_object('newusers_grp_ID', $Settings->get('newusers_grp_ID'), $GroupCache, T_('Group for new users'), array_merge(array('note' => T_('Groups determine user roles and permissions.')), $disabled_param_grouplevel));
$Form->text_input('newusers_level', $Settings->get('newusers_level'), 1, T_('Level for new users'), T_('Levels determine hierarchy of users in blogs.'), array_merge(array('maxlength' => 1, 'required' => true), $disabled_param_grouplevel));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Default user settings') . get_manual_link('default-user-settings'));
$messaging_options = array(array('enable_PM', 1, T_('private messages on this site.'), $Settings->get('def_enable_PM')));
if ($Settings->get('emails_msgform') != 'never') {
    $messaging_options[] = array('enable_email', 1, T_('emails through a message form that will NOT reveal my email address.'), $Settings->get('def_enable_email'));