<?php /** * This file display the form to create sample users for testing * * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}. * See also {@link https://github.com/b2evolution/b2evolution}. * * @license GNU GPL v2 - {@link http://b2evolution.net/about/gnu-gpl-license} * * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}. * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}. * * @package admin */ if (!defined('EVO_MAIN_INIT')) { die('Please, do not access this page directly.'); } global $Settings, $GroupCache; $Form = new Form(NULL, 'create_users', 'user', 'compact'); $Form->global_icon(T_('Cancel!'), 'close', regenerate_url('action')); $Form->begin_form('fform', T_('Create sample users')); $Form->add_crumb('tools'); $Form->hidden('ctrl', 'tools'); $Form->hidden('action', 'create_sample_users'); $Form->hidden('tab3', get_param('tab3')); $Form->select_object('group_ID', $Settings->get('newusers_grp_ID'), $GroupCache, T_('Group for new users')); $Form->text_input('num_users', 10, 11, T_('How many users'), '', array('maxlength' => 10, 'required' => true)); $Form->end_form(array(array('submit', 'submit', T_('Create'), 'SaveButton')));
echo '<strong>' . T_('Language') . ':</strong></td>'; echo '<td width="1%" class="select">'; $Form->select_options('post_locale', $locale_options, ''); echo '</td>'; } // -- Language chooser END -- echo '</tr></table>'; echo '<table cellspacing="0" class="compose_layout"><tr>'; echo '<td width="1%"><strong>' . T_('Link to url') . ':</strong></td>'; echo '<td class="input">'; $Form->text_input('post_url', $edited_Item->get('url'), 20, '', '', array('maxlength' => 255, 'style' => 'width: 100%;')); echo '</td>'; echo '<td width="1%"> <strong>' . T_('Type') . ':</strong></td>'; echo '<td width="1%" class="select">'; $ItemTypeCache =& get_ItemTypeCache(); $Form->select_object('item_typ_ID', $edited_Item->ptyp_ID, $ItemTypeCache, '', '', false, '', 'get_option_list_usable_only'); echo '</td>'; echo '</tr></table>'; $Form->switch_layout(NULL); // --------------------------- TOOLBARS ------------------------------------ echo '<div class="edit_toolbars">'; // CALL PLUGINS NOW: $Plugins->trigger_event('AdminDisplayToolbar', array('target_type' => 'Item', 'edit_layout' => 'expert', 'Item' => $edited_Item)); echo '</div>'; // ---------------------------- TEXTAREA ------------------------------------- $Form->fieldstart = '<div class="edit_area">'; $Form->fieldend = "</div>\n"; $Form->textarea_input('content', $item_content, 16, '', array('cols' => 40, 'id' => 'itemform_post_content')); $Form->fieldstart = '<div class="tile">'; $Form->fieldend = '</div>'; ?>
$Form->info('', sprintf(T_('Feedbacks with a spam karma between these two thresholds will get the default status of the blog ("%s").'), T_('New feedback status'))); $Form->end_fieldset(); $Form->begin_fieldset(T_('Misc') . get_manual_link('antispam-settings-misc')); $Form->checkbox('antispam_block_spam_referers', $Settings->get('antispam_block_spam_referers'), T_('Block spam referers'), T_('If a referrer has been detected as spam, should we block the request with a "403 Forbidden" page?')); $Form->checkbox('antispam_report_to_central', $Settings->get('antispam_report_to_central'), T_('Report to central blacklist'), T_('When banning a keyword, offer an option to report to the central blacklist.') . ' [<a href="http://b2evolution.net/about/terms.html">' . T_('Terms of service') . '</a>]'); $Form->end_fieldset(); $Form->begin_fieldset(T_('Spam detection relevance weight') . get_manual_link('antispam-settings-detection-relevance-weight')); echo '<p>' . T_('This defines the weight of the plugin, in relation to the others.') . '</p>'; $karma_plugins = $Plugins->get_list_by_events(array('GetSpamKarmaForComment')); if (empty($karma_plugins)) { echo '<p>' . T_('There are no spam karma plugins enabled.') . '</p>'; } else { foreach ($karma_plugins as $loop_Plugin) { $Form->text('antispam_plugin_spam_weight[' . $loop_Plugin->ID . ']', $Plugins->index_ID_rows[$loop_Plugin->ID]['plug_spam_weight'], 2, $loop_Plugin->name); } } $Form->end_fieldset(); $Form->begin_fieldset(T_('Suspect users') . get_manual_link('antispam-settings-suspect-users')); $GroupCache =& get_GroupCache(true, NT_('Don\'t move suspect users')); $Form->select_object('antispam_suspicious_group', $Settings->get('antispam_suspicious_group'), $GroupCache, T_('Move suspect users to'), '', true); $trust_groups = $Settings->get('antispam_trust_groups') != '' ? explode(',', $Settings->get('antispam_trust_groups')) : array(); $groups_options = array(); $groups = $GroupCache->get_option_array(); foreach ($groups as $group_ID => $group_name) { $groups_options[] = array('antispam_trust_groups[]', $group_ID, $group_name, in_array($group_ID, $trust_groups)); } $Form->checklist($groups_options, 'antispam_trust_groups', T_('Never touch users from these groups')); $Form->end_fieldset(); if ($current_User->check_perm('options', 'edit')) { $Form->end_form(array(array('submit', 'submit', T_('Save Changes!'), 'SaveButton'), array('submit', 'submit[restore_defaults]', T_('Restore defaults'), 'ResetButton'))); }
*/ global $Settings; global $dispatcher; global $collections_Module; 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')); $Form->checkbox('newusers_canregister', $Settings->get('newusers_canregister'), T_('New users can register'), T_('Check to allow new users to register themselves.')); $GroupCache =& get_GroupCache(); $Form->select_object('newusers_grp_ID', $Settings->get('newusers_grp_ID'), $GroupCache, T_('Group for new users'), T_('Groups determine user roles and permissions.')); $Form->text_input('newusers_level', $Settings->get('newusers_level'), 1, T_('Level for new users'), T_('Levels determine hierarchy of users in blogs.'), array('maxlength' => 1, 'required' => true)); $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')); } $Form->checklist($messaging_options, 'default_user_msgform', T_('Other users can send me')); $notify_options = array(array('notify_messages', 1, T_('I receive a private message.'), $Settings->get('def_notify_messages')), array('notify_unread_messages', 1, T_('I have unread private messages for more than 24 hours.'), $Settings->get('def_notify_unread_messages'), false, T_('This notification is sent only once every 3 days.')), array('notify_published_comments', 1, T_('a comment is published on one of <strong>my</strong> posts.'), $Settings->get('def_notify_published_comments')), array('notify_comment_moderation', 1, T_('a comment is posted and I have permissions to moderate it.'), $Settings->get('def_notify_comment_moderation')), array('notify_post_moderation', 1, T_('a post is created and I have permissions to moderate it.'), $Settings->get('def_notify_post_moderation'))); $Form->checklist($notify_options, 'default_user_notification', T_('Notify me by email whenever')); $newsletter_options = array(array('newsletter_news', 1, T_('Send me news about this site.') . ' <span class="note">' . T_('Each message contains an easy 1 click unsubscribe link.') . '</span>', $Settings->get('def_newsletter_news')), array('newsletter_ads', 1, T_('I want to receive ADs that may be relevant to my interests.'), $Settings->get('def_newsletter_ads'))); $Form->checklist($newsletter_options, 'default_user_newsletter', T_('Newsletter')); $Form->text_input('notification_email_limit', $Settings->get('def_notification_email_limit'), 3, T_('Limit notification emails to'), T_('emails per day'), array('maxlength' => 3, 'required' => true)); $Form->text_input('newsletter_limit', $Settings->get('def_newsletter_limit'), 3, T_('Limit newsletters to'), T_('emails per day'), array('maxlength' => 3, 'required' => true));