Example #1
0
 if ($edit_Plugin->status == 'broken') {
     break;
 }
 // Display plugin info:
 load_funcs('plugins/_plugin.funcs.php');
 $Form = new Form($pagenow);
 if ($edit_Plugin->ID > 0 && $current_User->check_perm('options', 'edit', false)) {
     // Edit settings button (if installed):
     $Form->global_icon(T_('Edit plugin settings!'), 'edit', $admin_url . '?ctrl=plugins&action=edit_settings&plugin_ID=' . $edit_Plugin->ID);
 }
 // Close button:
 $Form->global_icon(T_('Close info!'), 'close', regenerate_url());
 $Form->begin_form('fform', ' ');
 $Form->hidden('ctrl', 'plugins');
 $Form->begin_fieldset('Plugin info', array('class' => 'fieldset'));
 $Form->info_field(T_('Name'), $edit_Plugin->name);
 $Form->info_field(T_('Code'), empty($edit_Plugin->code) ? ' - ' : $edit_Plugin->code, array('note' => T_('This 8-32 character code identifies the plugin when it needs to be called directly and specifically. This is especially useful for renderer plugins and widgets (SkinTags).')));
 $Form->info_field(T_('Short desc'), $edit_Plugin->short_desc);
 $Form->info_field(T_('Long desc'), $edit_Plugin->long_desc);
 if ($edit_Plugin->ID > 0) {
     // do not display ID for non registered Plugins
     $Form->info_field(T_('ID'), $edit_Plugin->ID);
 }
 $Form->info_field(T_('Version'), $edit_Plugin->version);
 $Form->info_field(T_('Classname'), $edit_Plugin->classname);
 $Form->info_field(T_('Class file'), rel_path_to_base($edit_Plugin->classfile_path));
 // Help icons (to homepage and README.html), if available:
 $help_icons = array();
 if ($help_www = $edit_Plugin->get_help_link('$help_url')) {
     $help_icons[] = $help_www;
 }
 $Form->switch_template_parts($params['form_params']);
 $Form->begin_form('bComment', '', array('target' => '_self'));
 // TODO: dh> a plugin hook would be useful here to add something to the top of the Form.
 //           Actually, the best would be, if the $Form object could be changed by a plugin
 //           before display!
 $Form->add_crumb('comment');
 $Form->hidden('comment_post_ID', $Item->ID);
 if (!empty($comment_reply_ID)) {
     $Form->hidden('reply_ID', $comment_reply_ID);
     // Link to scroll back up to replying comment
     echo '<a href="' . url_add_param($Item->get_permanent_url(), 'reply_ID=' . $comment_reply_ID . '&amp;redir=no') . '#c' . $comment_reply_ID . '" class="comment_reply_current" rel="' . $comment_reply_ID . '">' . T_('You are currently replying to a specific comment') . '</a>';
 }
 $Form->hidden('redirect_to', $Item->get_feedback_url($disp == 'feedback-popup', '&'));
 if (check_user_status('is_validated')) {
     // User is logged in and activated:
     $Form->info_field(T_('User'), '<strong>' . $current_User->get_identity_link(array('link_text' => $params['author_link_text'])) . '</strong> ' . get_user_profile_link(' [', ']', T_('Edit profile')));
 } else {
     // User is not logged in or not activated:
     if (is_logged_in() && empty($comment_author) && empty($comment_author_email)) {
         $comment_author = $current_User->login;
         $comment_author_email = $current_User->email;
     }
     // Note: we use funky field names to defeat the most basic guestbook spam bots
     $Form->text($dummy_fields['name'], $comment_author, 40, T_('Name'), '', 100, 'bComment');
     $Form->text($dummy_fields['email'], $comment_author_email, 40, T_('Email'), '<br />' . T_('Your email address will <strong>not</strong> be revealed on this site.'), 100, 'bComment');
     $Item->load_Blog();
     if ($Item->Blog->get_setting('allow_anon_url')) {
         $Form->text($dummy_fields['url'], $comment_author_url, 40, T_('Website'), '<br />' . T_('Your URL will be displayed.'), 100, 'bComment');
     }
 }
 if ($Item->can_rate()) {
Example #3
0
global $current_User;
/**
 * @var GeneralSettings
 */
global $Settings;
global $Plugins, $baseurl, $eblog_test_output, $eblog_saved_test_mode_value, $comment_allowed_tags;
$Form = new Form(NULL, 'remotepublish_checkchanges');
$Form->begin_form('fform');
$Form->add_crumb('globalsettings');
$Form->hidden('ctrl', 'remotepublish');
$Form->hidden('tab', 'eblog');
$Form->hidden('action', 'update');
$Form->begin_fieldset(T_('Test saved settings') . get_manual_link('post-by-email'));
$url = '?ctrl=remotepublish&amp;tab=eblog&amp;' . url_crumb('globalsettings') . '&amp;action=';
$Form->info_field(T_('Perform tests'), '<a href="' . $url . 'test_1">[' . T_('server connection') . ']</a>&nbsp;&nbsp;
				<a href="' . $url . 'test_2">[' . T_('simulate posting') . ']</a>&nbsp;&nbsp;
				<a href="' . $url . 'test_3">[' . T_('create one post') . ']</a>');
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->switch_template_parts($params['form_params']);
 $Form->begin_form('evo_form evo_form__comment', '', array('target' => '_self'));
 // TODO: dh> a plugin hook would be useful here to add something to the top of the Form.
 //           Actually, the best would be, if the $Form object could be changed by a plugin
 //           before display!
 $Form->add_crumb('comment');
 $Form->hidden('comment_item_ID', $Item->ID);
 if (!empty($comment_reply_ID)) {
     $Form->hidden('reply_ID', $comment_reply_ID);
     // Link to scroll back up to replying comment
     echo '<a href="' . url_add_param($Item->get_permanent_url(), 'reply_ID=' . $comment_reply_ID . '&amp;redir=no') . '#c' . $comment_reply_ID . '" class="comment_reply_current" rel="' . $comment_reply_ID . '">' . T_('You are currently replying to a specific comment') . '</a>';
 }
 $Form->hidden('redirect_to', $params['form_comment_redirect_to']);
 if (check_user_status('is_validated')) {
     // User is logged in and activated:
     $Form->info_field(T_('User'), '<strong>' . $current_User->get_identity_link(array('link_text' => $params['author_link_text'])) . '</strong>');
 } else {
     // User is not logged in or not activated:
     if (is_logged_in() && empty($comment_author) && empty($comment_author_email)) {
         $comment_author = $current_User->login;
         $comment_author_email = $current_User->email;
     }
     // Note: we use funky field names to defeat the most basic guestbook spam bots
     $Form->text($dummy_fields['name'], $comment_author, 40, T_('Name'), '', 100, 'evo_comment_field');
     $Form->text($dummy_fields['email'], $comment_author_email, 40, T_('Email'), '<br />' . T_('Your email address will <strong>not</strong> be revealed on this site.'), 255, 'evo_comment_field');
     $Item->load_Blog();
     if ($Item->Blog->get_setting('allow_anon_url')) {
         $Form->text($dummy_fields['url'], $comment_author_url, 40, T_('Website'), '<br />' . T_('Your URL will be displayed.'), 255, 'evo_comment_field');
     }
 }
 if ($Item->can_rate()) {
Example #5
0
 if ($edit_Plugin->status == 'broken') {
     break;
 }
 // Display plugin info:
 load_funcs('plugins/_plugin.funcs.php');
 $Form = new Form($pagenow);
 if ($edit_Plugin->ID > 0 && $current_User->check_perm('options', 'edit', false)) {
     // Edit settings button (if installed):
     $Form->global_icon(T_('Edit plugin settings!'), 'edit', $admin_url . '?ctrl=plugins&amp;action=edit_settings&amp;plugin_ID=' . $edit_Plugin->ID);
 }
 // Close button:
 $Form->global_icon(T_('Close info!'), 'close', regenerate_url());
 $Form->begin_form('fform', '&nbsp;');
 $Form->hidden('ctrl', 'plugins');
 $Form->begin_fieldset('Plugin info', array('class' => 'fieldset'));
 $Form->info_field(T_('Name'), $edit_Plugin->name);
 $Form->info_field(T_('Code'), empty($edit_Plugin->code) ? ' - ' : $edit_Plugin->code, array('note' => T_('This 32 character code uniquely identifies the functionality of this plugin. It is only necessary to call the plugin by code (SkinTag) or when using it as a Renderer.')));
 $Form->info_field(T_('Short desc'), $edit_Plugin->short_desc);
 $Form->info_field(T_('Long desc'), $edit_Plugin->long_desc);
 if ($edit_Plugin->ID > 0) {
     // do not display ID for non registered Plugins
     $Form->info_field(T_('ID'), $edit_Plugin->ID);
 }
 $Form->info_field(T_('Version'), $edit_Plugin->version);
 $Form->info_field(T_('Classname'), $edit_Plugin->classname);
 $Form->info_field(T_('Class file'), rel_path_to_base($edit_Plugin->classfile_path));
 // Help icons (to homepage and README.html), if available:
 $help_icons = array();
 if ($help_www = $edit_Plugin->get_help_link('$help_url')) {
     $help_icons[] = $help_www;
 }
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 * Parts of this file are copyright (c)2004-2006 by Daniel HAHLER - {@link http://thequod.de/contact}.
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $repath_test_output, $action;
$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_('Test saved settings') . get_manual_link('return-path-configuration'));
$url = '?ctrl=email&amp;tab=return&amp;tab3=test&amp;' . url_crumb('emailsettings') . '&amp;action=';
$Form->info_field(T_('Perform tests'), '<a href="' . $url . 'test_1">[' . T_('server connection') . ']</a>&nbsp;&nbsp;' . '<a href="' . $url . 'test_2">[' . T_('get one returned email') . ']</a>&nbsp;&nbsp;' . '<a href="' . $url . 'test_3">[' . T_('Paste an error message/returned email') . ']</a>');
if ($action == 'test_3') {
    // Display a textarea to fill a sample error message
    $Form->textarea('test_error_message', param('test_error_message', 'raw', ''), 15, T_('Test error message'), '', 50);
    $Form->buttons(array(array('submit', 'actionArray[test_3]', T_('Test'), 'SaveButton')));
}
if (!empty($repath_test_output)) {
    echo '<div style="margin-top:25px"></div>';
    // Display scrollable div
    echo '<div style="padding: 6px; margin:5px; border: 1px solid #CCC; min-height: 350px">' . $repath_test_output . '</div>';
}
$Form->end_fieldset();
$Form->end_form();
        // Current user has already left this conversation
        echo '<span class="error">' . T_('You cannot reply because you have already left this conversation.') . '</span>';
    } else {
        // Current user is still part of this conversation, should be able to reply
        $Form = new Form($params['form_action'], $params['form_name'], 'post', $params['form_layout']);
        $Form->switch_template_parts($params['skin_form_params']);
        $Form->begin_form($params['form_class'], '');
        $Form->add_crumb('messaging_messages');
        if ($perm_abuse_management) {
            // To back in the abuse management
            memorize_param('tab', 'string', 'abuse');
        }
        $Form->hiddens_by_key(get_memorized('action' . ($creating ? ',msg_ID' : '')));
        // (this allows to come back to the right list order & page)
        $Form->hidden('redirect_to', $params['redirect_to']);
        $Form->info_field(T_('Reply to'), get_avatar_imgtags($available_recipients, true, true, 'crop-top-15x15', 'avatar_before_login mb1'), array('required' => true));
        if (!empty($closed_recipients)) {
            $Form->info_field('', T_('The other users involved in this conversation have closed their account.'));
        }
        $Form->textarea('msg_text', '', 10, T_('Message'), '', $params['cols'], '', true);
        $Form->end_form(array(array('submit', 'actionArray[create]', T_('Send message'), 'SaveButton')));
    }
}
// Display Leave or Close conversation action if they are available
if ($is_recipient && empty($leave_msg_ID) && count($available_recipients) > 0) {
    // user is recipient and didn't leave this conversation yet and this conversation is not closed
    echo '<div class="fieldset messages_list_actions">';
    if (count($available_recipients) > 1) {
        // there are more then one recipients
        $leave_text = T_('I want to leave this conversation now!');
        $confirm_leave_text = TS_('If you leave this conversation,\\nother users can still continue the conversation\\nbut you will not receive their future replies.\\nAre you sure?');
$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();
$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
     // Add hidden blog ID to correctly redirect after message posting:
     $Form->hidden('blog', $Blog->ID);
 }
 $Form->switch_template_parts($params['skin_form_params']);
 $Form->begin_form($params['form_class_msg'], is_admin_page() ? $form_title : '');
 $Form->add_crumb('messaging_messages');
 if ($perm_abuse_management) {
     // To back in the abuse management
     memorize_param('tab', 'string', 'abuse');
 }
 $Form->hiddens_by_key(get_memorized('action' . ($creating ? ',msg_ID' : '')));
 // (this allows to come back to the right list order & page)
 $Form->hidden('redirect_to', $params['redirect_to']);
 //$Form->info_field(T_('Reply to'), get_avatar_imgtags( $available_recipients, true, true, 'crop-top-15x15', 'avatar_before_login mb1' ), array('required'=>true));
 if (!empty($closed_recipients)) {
     $Form->info_field('', T_('The other users involved in this conversation have closed their account.'));
 }
 ob_start();
 echo '<div class="message_toolbars">';
 // CALL PLUGINS NOW:
 $Plugins->trigger_event('DisplayMessageToolbar', array());
 echo '</div>';
 $message_toolbar = ob_get_clean();
 $form_inputstart = $Form->inputstart;
 $Form->inputstart .= $message_toolbar;
 $Form->textarea_input('msg_text', !empty($edited_Message) ? $edited_Message->original_text : '', 10, T_('Message'), array('cols' => $params['cols'], 'required' => true));
 $Form->inputstart = $form_inputstart;
 // set b2evoCanvas for plugins
 echo '<script type="text/javascript">var b2evoCanvas = document.getElementById( "msg_text" );</script>';
 // Display renderers
 $current_renderers = !empty($edited_Message) ? $edited_Message->get_renderers_validated() : array('default');
Example #10
0
 * @var GeneralSettings
 */
global $Settings;
global $baseurl, $admin_url;
global $smtp_test_output, $action;
$Form = new Form(NULL, 'settings_checkchanges');
$Form->begin_form('fform');
$Form->add_crumb('emailsettings');
$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"
    // Date format
    $Form->text_input('newloc_datefmt', isset($ltemplate['datefmt']) ? $ltemplate['datefmt'] : get_param('newloc_datefmt'), 20, T_('Date format'), T_('See below.'), array('required' => true));
    // Time format
    $Form->text_input('newloc_timefmt', isset($ltemplate['timefmt']) ? $ltemplate['timefmt'] : get_param('newloc_timefmt'), 20, T_('Time format'), T_('See below.'), array('required' => true));
    // Short time format
    $Form->text_input('newloc_shorttimefmt', isset($ltemplate['shorttimefmt']) ? $ltemplate['shorttimefmt'] : get_param('newloc_shorttimefmt'), 20, T_('Short time format'), T_('See below.'), array('required' => true));
    // Start of week
    $Form->dayOfWeek('newloc_startofweek', isset($ltemplate['startofweek']) ? $ltemplate['startofweek'] : get_param('newloc_startofweek'), T_('Start of week'), T_('Day at the start of the week.'));
    // Lang file
    $Form->text('newloc_messages', isset($ltemplate['messages']) ? $ltemplate['messages'] : get_param('newloc_messages'), 20, T_('Lang file'), T_('the lang file to use, from the <code>locales</code> subdirectory'));
    // Priority
    $Form->text_input('newloc_priority', isset($ltemplate['priority']) ? $ltemplate['priority'] : get_param('newloc_priority'), 3, T_('Priority'), T_('1 is highest. Priority is important when selecting a locale from a language code and several locales match the same language; this can happen when detecting browser language. Priority also affects the order in which locales are displayed in dropdown boxes, etc.'), array('required' => true));
    // TODO: Update this field onchange of datefmt/timefmt through AJAX:
    // fp> It would actually make more sense to have the preview at the exact place that says "see below"
    locale_temp_switch($newlocale);
    $Form->info_field(T_('Date preview'), date_i18n(locale_datefmt() . ' ' . locale_timefmt(), $localtimenow));
    locale_restore_previous();
    // generate Javascript array of locales to warn in case of overwriting
    $l_warnfor = "'" . implode("', '", array_keys($locales)) . "'";
    if ($edit_locale != '_new_') {
        // remove the locale we want to edit from the generated array
        $l_warnfor = str_replace("'{$newlocale}'", "'thiswillneverevermatch'", $l_warnfor);
    }
    $Form->end_form(array(array('submit', 'submit', $edit_locale == '_new_' ? T_('Create') : T_('Save Changes!'), 'SaveButton')));
    ?>
	<div class="panelinfo">
		<h3><?php 
    echo T_('Flags');
    ?>
</h3>
		<p><?php