Example #1
0
    $Form->text_input('post_title', $item_title, 20, T_('Title'), '', array('maxlength' => 255, 'style' => 'width: 100%;', 'required' => $use_title == 'required'));
    echo '</tr></table>';
    $Form->switch_layout(NULL);
}
if ($edited_Item->get_type_setting('use_text') != 'never') {
    // Display text
    // --------------------------- 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->switch_layout('none');
    $Form->fieldstart = '<div class="edit_area">';
    $Form->fieldend = "</div>\n";
    $Form->textarea_input('content', $item_content, 16, NULL, array('cols' => 50, 'id' => 'itemform_post_content', 'class' => 'autocomplete_usernames'));
    $Form->switch_layout(NULL);
    ?>
		<script type="text/javascript" language="JavaScript">
			<!--
			// This is for toolbar plugins
			var b2evoCanvas = document.getElementById('itemform_post_content');
			//-->
		</script>

		<?php 
    echo '<div class="edit_plugin_actions">';
    // CALL PLUGINS NOW:
    $Plugins->trigger_event('DisplayEditorButton', array('target_type' => 'Item', 'edit_layout' => 'inskin'));
    echo '</div>';
} else {
Example #2
0
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',ityp_ID' : '')));
// (this allows to come back to the right list order & page)
$Form->begin_fieldset($creating ? T_('New Post Type') . get_manual_link('item-type-form') : T_('Post type') . get_manual_link('item-type-form'));
if ($creating) {
    $Form->text_input('new_ityp_ID', get_param('new_ityp_ID'), 8, T_('ID'), '', array('maxlength' => 10, 'required' => true));
} else {
    $Form->hidden('ityp_ID', $edited_Itemtype->ID);
}
if ($edited_Itemtype->is_special()) {
    // Don't edit a name of special post types
    $Form->info(T_('Name'), $edited_Itemtype->name);
} else {
    // Display a field to edit a name
    $Form->text_input('ityp_name', $edited_Itemtype->name, 50, T_('Name'), '', array('maxlength' => 30, 'required' => true));
}
$Form->textarea_input('ityp_description', $edited_Itemtype->description, 2, T_('Description'), array('cols' => 47));
$Form->radio('ityp_perm_level', $edited_Itemtype->perm_level, array(array('standard', T_('Standard')), array('restricted', T_('Restricted')), array('admin', T_('Admin'))), T_('Permission level'));
$Form->text_input('ityp_backoffice_tab', $edited_Itemtype->backoffice_tab, 25, T_('Back-office tab'), T_('Items of this type will be listed in this back-office tab. If empty, items will be found only in the "All" tab.'), array('maxlength' => 30));
$Form->text_input('ityp_template_name', $edited_Itemtype->template_name, 25, T_('Template name'), T_('b2evolution will automatically append .main.php or .disp.php'), array('maxlength' => 40));
$Form->end_fieldset();
$options = array(array('required', T_('Required')), array('optional', T_('Optional')), array('never', T_('Never')));
// Check if current type is intro and set specific params for the fields "ityp_allow_breaks" and "ityp_allow_featured":
$intro_type_disabled = ItemType::is_intro($edited_Itemtype->ID);
$intro_type_note = $intro_type_disabled ? T_('This feature is not compatible with Intro posts.') : '';
$Form->begin_fieldset(T_('Features') . get_manual_link('item-type-features'), array('id' => 'itemtype_features'));
$Form->radio('ityp_use_title', $edited_Itemtype->use_title, $options, T_('Use title'));
$Form->radio('ityp_use_text', $edited_Itemtype->use_text, $options, T_('Use text'));
$Form->checkbox('ityp_allow_html', $edited_Itemtype->allow_html, T_('Allow HTML'), T_('Check to allow HTML in posts.') . ' (' . T_('HTML code will pass several sanitization filters.') . ')');
$Form->checkbox('ityp_allow_breaks', $edited_Itemtype->allow_breaks, T_('Allow Teaser and Page breaks'), $intro_type_note, '', 1, $intro_type_disabled);
$Form->checkbox('ityp_allow_attachments', $edited_Itemtype->allow_attachments, T_('Allow attachments'));
$Form->checkbox('ityp_allow_featured', $edited_Itemtype->allow_featured, T_('Allow featured'), $intro_type_note, '', 1, $intro_type_disabled);
Example #3
0
    $Form->inputend = '</td>';
    $Form->text_input('post_title', $item_title, 20, T_('Title'), '', array('maxlength' => 255, 'style' => 'width: 100%;', 'required' => $require_title == 'required'));
    echo '</tr></table>';
}
// --------------------------- 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->labelstart = '';
$Form->labelend = '';
$Form->labelempty = '';
$Form->textarea_input('content', $item_content, 16, NULL, array('cols' => 50, 'id' => 'itemform_post_content'));
?>
	<script type="text/javascript" language="JavaScript">
		<!--
		// This is for toolbar plugins
		var b2evoCanvas = document.getElementById('itemform_post_content');
		//-->
	</script>

	<?php 
// CALL PLUGINS NOW:
$Plugins->trigger_event('DisplayEditorButton', array('target_type' => 'Item', 'edit_layout' => 'inskin'));
$Form->end_fieldset();
global $display_item_settings_is_defined;
$display_item_settings_is_defined = false;
modules_call_method('display_item_settings', array('Form' => &$Form, 'Blog' => &$Blog, 'edited_Item' => &$edited_Item));
 ob_start();
 echo '<div class="comment_toolbars">';
 // CALL PLUGINS NOW:
 $Plugins->trigger_event('DisplayCommentToolbar', array('Comment' => &$Comment, 'Item' => &$Item));
 echo '</div>';
 $comment_toolbar = ob_get_clean();
 // Message field:
 $form_inputstart = $Form->inputstart;
 $Form->inputstart .= $comment_toolbar;
 $note = '';
 // $note = T_('Allowed XHTML tags').': '.htmlspecialchars(str_replace( '><',', ', $comment_allowed_tags));
 $textarea_params = array('note' => $note, 'cols' => 38, 'class' => 'bComment autocomplete_usernames', 'display_fix_pixel' => false);
 if (!empty($comment_toolbar)) {
     $textarea_params['style'] = 'border-radius: 0 0 8px 8px;';
 }
 $Form->textarea_input($dummy_fields['content'], $comment_content, $params['textarea_lines'], $params['form_comment_text'], $textarea_params);
 $Form->inputstart = $form_inputstart;
 // set b2evoCanvas for plugins
 echo '<script type="text/javascript">var b2evoCanvas = document.getElementById( "' . $dummy_fields['content'] . '" );</script>';
 // Attach files:
 if (!empty($comment_attachments)) {
     // display already attached files checkboxes
     $FileCache =& get_FileCache();
     $attachments = explode(',', $comment_attachments);
     $final_attachments = explode(',', $checked_attachments);
     // create attachments checklist
     $list_options = array();
     foreach ($attachments as $attachment_ID) {
         $attachment_File = $FileCache->get_by_ID($attachment_ID, false);
         if ($attachment_File) {
             // checkbox should be checked only if the corresponding file id is in the final attachments array
Example #5
0
if ($params['allow_select_recipients']) {
    // User can select recipients
    $Form->text_input('thrd_recipients', $edited_Thread->recipients, $params['cols'], T_('Recipients'), '<noscript>' . T_('Enter usernames. Separate with comma (,)') . '</noscript>', array('maxlength' => 255, 'required' => true, 'class' => 'wide_input'));
    echo '<div id="multiple_recipients">';
    $Form->radio('thrdtype', $params['thrdtype'], array(array('discussion', T_('Start a group discussion')), array('individual', T_('Send individual messages'))), T_('Multiple recipients'), true);
    echo '</div>';
} else {
    // No available to select recipients, Used in /contact.php
    $Form->info(T_('Recipients'), $edited_Thread->recipients);
    foreach ($recipients_selected as $recipient) {
        $Form->hidden('thrd_recipients_array[id][]', $recipient['id']);
        $Form->hidden('thrd_recipients_array[title][]', $recipient['title']);
    }
}
$Form->text_input('thrd_title', $edited_Thread->title, $params['cols'], T_('Subject'), '', array('maxlength' => 255, 'required' => true, 'class' => 'wide_input'));
$Form->textarea_input('msg_text', isset($edited_Thread->text) ? $edited_Thread->text : $edited_Message->text, 10, T_('Message'), array('cols' => $params['cols'], 'class' => 'wide_textarea', 'required' => true));
global $thrd_recipients_array, $recipients_selected;
if (!empty($thrd_recipients_array)) {
    // Initialize the preselected users (from post request or when user send a message to own contacts)
    foreach ($thrd_recipients_array['id'] as $rnum => $recipient_ID) {
        $recipients_selected[] = array('id' => $recipient_ID, 'title' => $thrd_recipients_array['title'][$rnum]);
    }
}
// display submit button, but only if enabled
$Form->end_form(array(array('submit', 'actionArray[create]', T_('Send message'), 'SaveButton')));
if ($params['allow_select_recipients']) {
    // User can select recipients
    ?>
<script type="text/javascript">
jQuery( document ).ready( function()
{
 *
 * @version $Id: $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $secure_htsrv_url;
global $Blog;
$Form = new Form($secure_htsrv_url . 'login.php');
$Form->begin_form('inskin');
$Form->add_crumb('closeaccountform');
$Form->hidden('redirect_to', $Blog->gen_blogurl());
$Form->hidden('action', 'closeaccount');
echo '<p>' . T_('We are sorry to see you leave.') . '</p>' . "\n";
echo '<p>' . T_('We value your feedback. Please be so kind and tell us in a few words why you are leaving us. This will help us to improve the site for the future.') . '</p>';
$Form->textarea_input('account_close_reason', '', 6, NULL, array('cols' => 40, 'class' => 'large', '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 )
			{
				char_left = 0;
			}
 if (!empty($params['policy_text'])) {
     // We have a policy text to display
     $Form->info_field('', $params['policy_text']);
 }
 ob_start();
 echo '<div class="comment_toolbars">';
 // CALL PLUGINS NOW:
 $Plugins->trigger_event('DisplayCommentToolbar', array('Comment' => &$Comment, 'Item' => &$Item));
 echo '</div>';
 $comment_toolbar = ob_get_clean();
 // Message field:
 $form_inputstart = $Form->inputstart;
 $Form->inputstart .= $comment_toolbar;
 $note = '';
 // $note = T_('Allowed XHTML tags').': '.htmlspecialchars(str_replace( '><',', ', $comment_allowed_tags));
 $Form->textarea_input($dummy_fields['content'], $comment_content, $params['textarea_lines'], $params['form_comment_text'], array('note' => $note, 'cols' => 38, 'class' => 'autocomplete_usernames'));
 $Form->inputstart = $form_inputstart;
 // set b2evoCanvas for plugins
 echo '<script type="text/javascript">var b2evoCanvas = document.getElementById( "' . $dummy_fields['content'] . '" );</script>';
 // Attach files:
 if (!empty($comment_attachments)) {
     // display already attached files checkboxes
     $FileCache =& get_FileCache();
     $attachments = explode(',', $comment_attachments);
     $final_attachments = explode(',', $checked_attachments);
     // create attachments checklist
     $list_options = array();
     foreach ($attachments as $attachment_ID) {
         $attachment_File = $FileCache->get_by_ID($attachment_ID, false);
         if ($attachment_File) {
             // checkbox should be checked only if the corresponding file id is in the final attachments array
}
if ($edited_Comment->get_author_User()) {
    $Form->info(T_('Author'), $edited_Comment->get_author());
} else {
    $Form->text_input('newcomment_author', $edited_Comment->author, 20, T_('Author'), '', array('maxlength' => 100, 'style' => 'width: 99%;'));
    $Form->text_input('newcomment_author_email', $edited_Comment->author_email, 20, T_('Email'), '', array('maxlength' => 255, 'style' => 'width: 99%;'));
    $Form->text_input('newcomment_author_url', $edited_Comment->author_url, 20, T_('Website URL'), '', array('maxlength' => 255, 'style' => 'width: 99%;'));
}
ob_start();
echo '<div class="comment_toolbars">';
// CALL PLUGINS NOW:
$Plugins->trigger_event('DisplayCommentToolbar', array('Comment' => &$edited_Comment, 'Item' => &$comment_Item));
echo '</div>';
$plugins_toolbar = ob_get_clean();
$Form->switch_template_parts(array('inputstart' => '<td class="form_input comment_content">' . $plugins_toolbar));
$Form->textarea_input('content', $comment_content, $disp_params['textarea_lines'], $disp_params['form_comment_text'], array('cols' => 60, 'style' => 'width:100%', 'class' => 'autocomplete_usernames', 'id' => $dummy_fields['content']));
// set b2evoCanvas for plugins
echo '<script type="text/javascript">var b2evoCanvas = document.getElementById( "' . $dummy_fields['content'] . '" );</script>';
if ($current_User->check_perm('blog_edit_ts', 'edit', false, $Blog->ID)) {
    // ------------------------------------ TIME STAMP -------------------------------------
    $Form->switch_template_parts(array('fieldstart' => '', 'fieldend' => '', 'labelstart' => '', 'labelend' => '', 'labelempty' => '', 'inputstart' => '', 'inputend' => '', 'output' => false));
    $comment_date_input = $Form->date_input('comment_issue_date', $edited_Comment->date, '');
    $comment_date_input .= $Form->time_input('comment_issue_time', $edited_Comment->date, '');
    $Form->switch_template_parts($disp_params['edit_form_params']);
    $Form->info(T_('Comment date'), $comment_date_input, '');
}
if ($comment_Item->can_rate() || !empty($edited_Comment->rating)) {
    // Rating is editable
    $edit_form_params = $disp_params['edit_form_params'];
    $before_rating = $edit_form_params['fieldstart'] . $edit_form_params['labelstart'] . T_('Rating') . $edit_form_params['labelend'] . $edit_form_params['inputstart'];
    $after_rating = $edit_form_params['inputend'] . $edit_form_params['fieldend'];
Example #9
0
        /*
         * -----------------------------------------------------------------------------------
         * Form to change the debug config
         * -----------------------------------------------------------------------------------
         */
        block_open(T_('Debug config'));
        $Form = new Form($_SERVER['PHP_SELF']);
        $Form->switch_template_parts($booststrap_install_form_params);
        $Form->begin_form('form-horizontal');
        $Form->hidden('action', 'update_config');
        $Form->hidden('password', $password);
        $Form->textarea_input('content', $file_overrides_content, 20, T_('Config'), array('cols' => 50, 'note' => 'A few possible settings:<br /><br />
$minimum_comment_interval = 1;<br />
$debug = 1;<br />
$debug_jslog = 1;<br />
$allow_po_extraction = 1;<br />
$test_install_all_features = true;<br />
$db_config[\'debug_dump_rows\'] = 20;<br />
$db_config[\'debug_explain_joins\'] = false;<br />
$display_errors_on_production = false;'));
        $Form->end_form(array(array('name' => 'submit', 'value' => T_('Save Changes!'), 'class' => 'btn-primary btn-lg')));
        block_close();
        break;
    default:
        /*
         * -----------------------------------------------------------------------------------
         * Default config
         * -----------------------------------------------------------------------------------
         */
        echo T_('To enable this tool, create a file called /conf/_overrides_TEST.php with the following contents:');
        echo '<pre>&lt;?php
Example #10
0
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'userfield_checkchanges', 'post', 'compact');
$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">
        $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');
        $message_renderer_checkboxes = $Plugins->get_renderer_checkboxes($current_renderers, array('setting_name' => 'msg_apply_rendering'));
        if (!empty($message_renderer_checkboxes)) {
            $Form->info(T_('Text Renderers'), $message_renderer_checkboxes);
        }
        $Form->end_form(array(array('submit', 'actionArray[preview]', T_('Preview'), 'SaveButton btn-info'), array('submit', 'actionArray[create]', T_('Send message'), 'SaveButton')));
        echo $params['messages_list_body_end'];
        echo $params['messages_list_form_end'];
    }
}
// Display Leave or Close conversation action if they are available
Example #12
0
 *
 * @package evocore
 *
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author fplanque: Francois PLANQUE.
 *
 * @version $Id: _newsletter.form.php 988 2012-03-06 06:10:41Z yura $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $Session, $users_numbers;
$Form = new Form(NULL, 'newsletter');
$Form->begin_form('fform');
$Form->add_crumb('newsletter');
$Form->hidden('ctrl', 'newsletter');
$Form->hidden('action', 'preview');
$Form->begin_fieldset(T_('Users info'));
$Form->info(T_('Number of accounts in filterset'), $users_numbers['all']);
$Form->info(T_('Number of active accounts in filterset'), $users_numbers['active']);
$Form->info(T_('Number of active accounts which accept newsletter email'), $users_numbers['newsletter']);
$Form->end_fieldset();
$Form->begin_fieldset(T_('Newsletter'));
echo '<p>';
echo T_('You can use the following patterns to auto insert the user\'s data:');
echo ' $login$, $email$, $user_ID$, $unsubscribe_key$.';
echo '</p>';
$Form->text_input('title', $Session->get('newsletter_title', T_('Newsletter')), 60, T_('Title'), '', array('maxlength' => 1024, 'required' => true));
$Form->textarea_input('message', $Session->get('newsletter_message'), 30, T_('Message'), array('cols' => 45, 'required' => true));
$Form->end_fieldset();
$Form->end_form(array(array('submit', 'submit', T_('Preview !'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
$Form->hidden('ctrl', 'campaigns');
$Form->hidden('current_tab', $tab);
$Form->hidden('ecmp_ID', $edited_EmailCampaign->ID);
$Form->begin_fieldset(T_('Plain-text message') . get_manual_link('creating-an-email-campaign'));
$Form->info(T_('Name'), $edited_EmailCampaign->get('name'));
$Form->info(T_('Email title'), $edited_EmailCampaign->get('email_title'));
$Form->info(T_('Campaign created'), mysql2localedatetime_spans($edited_EmailCampaign->get('date_ts'), 'M-d'));
$Form->info(T_('Last sent'), $edited_EmailCampaign->get('sent_ts') ? mysql2localedatetime_spans($edited_EmailCampaign->get('sent_ts'), 'M-d') : T_('Not sent yet'));
// Plain Text Message with button to extract text from html content
if ($current_User->check_perm('emails', 'edit')) {
    // User must has a permission to edit emails in order to extract text from html
    $Form->output = false;
    $button_to_extract = $Form->button(array('submit', 'actionArray[extract_html]', T_('Extract from HTML'), 'SaveButton'));
    $Form->output = true;
} else {
    // No permission
    $button_to_extract = '';
}
$Form->textarea_input('ecmp_email_text', $edited_EmailCampaign->get('email_text'), 20, T_('Plain-text Message'), array('required' => true, 'input_prefix' => $button_to_extract));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Newsletter recipients'));
$Form->info(T_('Currently selected recipients'), $edited_EmailCampaign->get_users_count(), '(' . T_('Accounts which accept newsletter emails') . ') - <a href="' . $admin_url . '?ctrl=campaigns&amp;action=change_users&amp;ecmp_ID=' . $edited_EmailCampaign->ID . '">' . T_('Change selection') . ' &gt;&gt;</a>');
$Form->info(T_('Already received'), $edited_EmailCampaign->get_users_count('accept'), '(' . T_('Accounts which have already been sent this newsletter') . ')');
$Form->info(T_('Ready to send'), $edited_EmailCampaign->get_users_count('wait'), '(' . T_('Accounts which have not been sent this newsletter yet') . ')');
$Form->end_fieldset();
$buttons = array();
if ($current_User->check_perm('emails', 'edit')) {
    // User must has a permission to edit emails
    $buttons[] = array('submit', 'actionArray[save]', T_('Save Plain-text message'), 'SaveButton');
}
$Form->end_form($buttons);
Example #14
0
$Form->hidden('action_type', 'comment');
$Form->hidden('comment_ID', $edited_Comment->ID);
$Form->hidden('redirect_to', url_add_tail($comment_Item->get_permanent_url(), '#c' . $edited_Comment->ID));
$Form->info(T_('In response to'), $comment_Item->get_title());
if ($edited_Comment->get_author_User()) {
    $Form->info(T_('Author'), $edited_Comment->get_author());
} else {
    $Form->text_input('newcomment_author', $edited_Comment->author, 20, T_('Author'), '', array('maxlength' => 100, 'style' => 'width: 100%;'));
    $Form->text_input('newcomment_author_email', $edited_Comment->author_email, 20, T_('Email'), '', array('maxlength' => 100, 'style' => 'width: 100%;'));
    $Form->text_input('newcomment_author_url', $edited_Comment->author_url, 20, T_('Website URL'), '', array('maxlength' => 100, 'style' => 'width: 100%;'));
}
echo '<div class="comment_toolbars">';
// CALL PLUGINS NOW:
$Plugins->trigger_event('AdminDisplayToolbar', array('target_type' => 'Comment', 'edit_layout' => NULL, 'Comment' => $edited_Comment));
echo '</div>';
$Form->textarea_input('content', $comment_content, $display_params['textarea_lines'], $display_params['form_comment_text'], array('cols' => 38, 'class' => 'bComment', 'id' => $dummy_fields['content']));
// set b2evoCanvas for plugins
echo '<script type="text/javascript">var b2evoCanvas = document.getElementById( "' . $dummy_fields['content'] . '" );</script>';
if ($current_User->check_perm('blog_edit_ts', 'edit', false, $Blog->ID)) {
    // ------------------------------------ TIME STAMP -------------------------------------
    $Form->begin_fieldset();
    echo '<div class="label">' . T_('Comment date') . ':</div>';
    $Form->switch_layout('blockspan');
    $Form->date_input('comment_issue_date', $edited_Comment->date, '', array('size' => "10"));
    $Form->time_input('comment_issue_time', $edited_Comment->date, '', array('size' => "10"));
    $Form->switch_layout(NULL);
    $Form->end_fieldset();
}
if ($comment_Item->can_rate() || !empty($edited_Comment->rating)) {
    // Rating is editable
    $edited_Comment->rating_input(array('before' => '<fieldset><div class="label">' . T_('Rating') . ':</div><div class="input">', 'after' => '</div></fieldset>'));
Example #15
0
$Form->info(T_('In response to'), $comment_Item->get_title());
if ($edited_Comment->get_author_User()) {
    $Form->info(T_('Author'), $edited_Comment->get_author());
} else {
    $Form->text_input('newcomment_author', $edited_Comment->author, 20, T_('Author'), '', array('maxlength' => 100, 'style' => 'width: 99%;'));
    $Form->text_input('newcomment_author_email', $edited_Comment->author_email, 20, T_('Email'), '', array('maxlength' => 100, 'style' => 'width: 99%;'));
    $Form->text_input('newcomment_author_url', $edited_Comment->author_url, 20, T_('Website URL'), '', array('maxlength' => 100, 'style' => 'width: 99%;'));
}
ob_start();
echo '<div class="comment_toolbars">';
// CALL PLUGINS NOW:
$Plugins->trigger_event('AdminDisplayToolbar', array('target_type' => 'Comment', 'edit_layout' => NULL, 'Comment' => $edited_Comment));
echo '</div>';
$plugins_toolbar = ob_get_clean();
$Form->switch_template_parts(array('inputstart' => '<td class="row2 left">' . $plugins_toolbar));
$Form->textarea_input('content', $comment_content, $disp_params['textarea_lines'], $disp_params['form_comment_text'], array('cols' => 60, 'style' => 'width:99%', 'id' => $dummy_fields['content']));
// set b2evoCanvas for plugins
echo '<script type="text/javascript">var b2evoCanvas = document.getElementById( "' . $dummy_fields['content'] . '" );</script>';
if ($current_User->check_perm('blog_edit_ts', 'edit', false, $Blog->ID)) {
    // ------------------------------------ TIME STAMP -------------------------------------
    $Form->switch_template_parts(array('fieldstart' => '', 'fieldend' => '', 'labelstart' => '', 'labelend' => '', 'labelempty' => '', 'inputstart' => '', 'inputend' => '', 'output' => false));
    $comment_date_input = $Form->date_input('comment_issue_date', $edited_Comment->date, '');
    $comment_date_input .= $Form->time_input('comment_issue_time', $edited_Comment->date, '');
    $Form->switch_template_parts($disp_params['edit_form_params']);
    $Form->info(T_('Comment date'), $comment_date_input, '');
}
if ($comment_Item->can_rate() || !empty($edited_Comment->rating)) {
    // Rating is editable
    $edit_form_params = $disp_params['edit_form_params'];
    $before_rating = $edit_form_params['fieldstart'] . $edit_form_params['labelstart'] . T_('Rating') . $edit_form_params['labelend'] . $edit_form_params['inputstart'];
    $after_rating = $edit_form_params['inputend'] . $edit_form_params['fieldend'];
Example #16
0
?>

	<div class="edit_toolbars">
	<?php 
// --------------------------- TOOLBARS ------------------------------------
// CALL PLUGINS NOW:
$Plugins->trigger_event('AdminDisplayToolbar', array('target_type' => 'Comment', 'edit_layout' => NULL, 'Comment' => $edited_Comment));
?>
	</div>

	<?php 
// ---------------------------- TEXTAREA -------------------------------------
$content = $comment_content;
$Form->fieldstart = '<div class="edit_area">';
$Form->fieldend = "</div>\n";
$Form->textarea_input('content', $content, 16, '', array('cols' => 40, 'id' => 'commentform_post_content'));
$Form->fieldstart = '<div class="tile">';
$Form->fieldend = '</div>';
?>
	<script type="text/javascript">
		<!--
		// This is for toolbar plugins
		var b2evoCanvas = document.getElementById('commentform_post_content');
		//-->
	</script>

	<div class="edit_actions">

	<?php 
// ---------- DELETE ----------
if ($action == 'editcomment') {
 * @package evocore
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $admin_url, $tab;
global $edited_EmailCampaign;
$Form = new Form(NULL, 'campaign_form');
$Form->begin_form('fform');
$Form->add_crumb('campaign');
$Form->hidden('ctrl', 'campaigns');
$Form->hidden('current_tab', $tab);
$Form->hidden('ecmp_ID', $edited_EmailCampaign->ID);
$Form->begin_fieldset(T_('HTML message') . get_manual_link('creating-an-email-campaign'));
$Form->info(T_('Name'), $edited_EmailCampaign->get('name'));
$Form->info(T_('Email title'), $edited_EmailCampaign->get('email_title'));
$Form->info(T_('Campaign created'), mysql2localedatetime_spans($edited_EmailCampaign->get('date_ts'), 'M-d'));
$Form->info(T_('Last sent'), $edited_EmailCampaign->get('sent_ts') ? mysql2localedatetime_spans($edited_EmailCampaign->get('sent_ts'), 'M-d') : T_('Not sent yet'));
$Form->textarea_input('ecmp_email_html', $edited_EmailCampaign->get('email_html'), 20, T_('HTML Message'), array('required' => true));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Newsletter recipients'));
$Form->info(T_('Currently selected recipients'), $edited_EmailCampaign->get_users_count(), '(' . T_('Accounts which accept newsletter emails') . ') - <a href="' . $admin_url . '?ctrl=campaigns&amp;action=change_users&amp;ecmp_ID=' . $edited_EmailCampaign->ID . '">' . T_('Change selection') . ' &gt;&gt;</a>');
$Form->info(T_('Already received'), $edited_EmailCampaign->get_users_count('accept'), '(' . T_('Accounts which have already been sent this newsletter') . ')');
$Form->info(T_('Ready to send'), $edited_EmailCampaign->get_users_count('wait'), '(' . T_('Accounts which have not been sent this newsletter yet') . ')');
$Form->end_fieldset();
$buttons = array();
if ($current_User->check_perm('emails', 'edit')) {
    // User must has a permission to edit emails
    $buttons[] = array('submit', 'actionArray[save]', T_('Save HTML message'), 'SaveButton');
}
$Form->end_form($buttons);
    $Form->checkbox('blog_allowtrackbacks', $edited_Blog->get('allowtrackbacks'), T_('Trackbacks') . $trackbacks_title, $trackbacks_warning . T_('Allow other bloggers to send trackbacks to this blog, letting you know when they refer to it. This will also let you send trackbacks to other blogs.'));
}
echo '</div>';
if ($edited_Blog->get_setting('allow_comments') == 'never') {
    ?>
	<script type="text/javascript">
		<!--
		jQuery( '.feedback_details_container' ).hide();
		//-->
	</script>
	<?php 
}
$Form->end_fieldset();
$Form->begin_fieldset(T_('Voting options'), array('class' => 'feedback_details_container'));
$Form->radio('allow_rating_items', $edited_Blog->get_setting('allow_rating_items'), array($any_option, $registered_option, $member_option, $never_option), T_('Allow star ratings from'), true);
$Form->textarea_input('rating_question', $edited_Blog->get_setting('rating_question'), 3, T_('Star rating question'), array('class' => 'large'));
$Form->checkbox('allow_rating_comment_helpfulness', $edited_Blog->get_setting('allow_rating_comment_helpfulness'), T_('Allow helpful/not helpful'), T_("Allow users to say if a comment was helpful or not."));
$Form->end_fieldset();
// display comments settings provided by optional modules:
// echo 'modules';
modules_call_method('display_collection_comments', array('Form' => &$Form, 'edited_Blog' => &$edited_Blog));
$Form->begin_fieldset(T_('Comment moderation'));
$newstatus_warning_attrs = ' id="newstatus_warning" style="display:' . ($edited_Blog->get_setting('new_feedback_status') == 'published' ? 'inline' : 'none') . '"';
$newstatus_warning = str_replace('$attrs$', $newstatus_warning_attrs, $spammers_warning);
$status_options = get_visibility_statuses('', array('redirected', 'trash'));
if ($edited_Blog->get_setting('new_feedback_status') != 'published') {
    if ($perm_blog_admin) {
        // Only admin can set this setting to 'Public'
        $status_options['published'] .= ' [' . T_('Admin') . ']';
    } else {
        // Remove published status for non-admin users
Example #19
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();
    $Form->text_input('newcomment_author_url', $edited_Comment->author_url, 20, T_('Website URL'), '', array('maxlength' => 255, 'style' => 'width: 100%;'));
}
if ($comment_Item->can_rate() || !empty($edited_Comment->rating)) {
    // Rating is editable
    $edited_Comment->rating_input(array('before' => $Form->begin_field('comment_rating_field', T_('Rating'), true), 'after' => $Form->inputend . $Form->fieldend));
}
ob_start();
echo '<div class="comment_toolbars">';
// CALL PLUGINS NOW:
$Plugins->trigger_event('AdminDisplayToolbar', array('target_type' => 'Comment', 'edit_layout' => NULL, 'Comment' => $edited_Comment));
echo '</div>';
$comment_toolbar = ob_get_clean();
// Message field:
$form_inputstart = $Form->inputstart;
$Form->inputstart .= $comment_toolbar;
$Form->textarea_input('content', $comment_content, $display_params['textarea_lines'], $display_params['form_comment_text'], array('cols' => 38, 'rows' => 11, 'class' => 'evo_comment_field autocomplete_usernames', 'id' => $dummy_fields['content']));
$Form->inputstart = $form_inputstart;
// set b2evoCanvas for plugins
echo '<script type="text/javascript">var b2evoCanvas = document.getElementById( "' . $dummy_fields['content'] . '" );</script>';
// Display renderers checkboxes ( Note: This contains inputs )
$comment_renderer_checkboxes = $edited_Comment->renderer_checkboxes(NULL, false);
if (!empty($comment_renderer_checkboxes)) {
    $Form->info(T_('Text Renderers'), $comment_renderer_checkboxes);
}
$Form->end_fieldset();
// Display comment attachments
$LinkOwner = new LinkComment($edited_Comment);
if ($LinkOwner->count_links()) {
    // there are attachments to display
    if ($current_User->check_perm('files', 'view') && $current_User->check_perm('admin', 'restricted')) {
        $Form->begin_fieldset(T_('Attachments'), array('id' => 'comment_attachments'));
Example #21
0
 *
 * This file is part of the evoCore framework - {@link http://evocore.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/}
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var File
 */
global $edited_File;
$Form = new Form(NULL, 'file_edit');
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('fm_mode'));
$Form->begin_form('fform', T_('Editing:') . ' ' . $edited_File->get_rdfs_rel_path());
$Form->hidden_ctrl();
$Form->add_crumb('file');
$Form->hidden('action', 'update_file');
$Form->hiddens_by_key(get_memorized());
$Form->switch_layout('none');
echo '<div class="center">';
$Form->textarea_input('file_content', $edited_File->content, 25, '', array('cols' => '80'));
$Form->buttons(array(array('submit', '', T_('Save Changes!'), 'SaveButton')));
echo '</div>';
$Form->switch_layout(NULL);
$Form->end_form();
 if (!empty($params['policy_text'])) {
     // We have a policy text to display
     $Form->info_field('', $params['policy_text']);
 }
 ob_start();
 echo '<div class="comment_toolbars">';
 // CALL PLUGINS NOW:
 $Plugins->trigger_event('DisplayCommentToolbar', array('Comment' => &$Comment, 'Item' => &$Item));
 echo '</div>';
 $comment_toolbar = ob_get_clean();
 // Message field:
 $form_inputstart = $Form->inputstart;
 $Form->inputstart .= $comment_toolbar;
 $note = '';
 // $note = T_('Allowed XHTML tags').': '.htmlspecialchars(str_replace( '><',', ', $comment_allowed_tags));
 $Form->textarea_input($dummy_fields['content'], $comment_content, $params['textarea_lines'], $params['form_comment_text'], array('note' => $note, 'cols' => 38, 'class' => 'bComment autocomplete_usernames', 'display_fix_pixel' => false));
 $Form->inputstart = $form_inputstart;
 // set b2evoCanvas for plugins
 echo '<script type="text/javascript">var b2evoCanvas = document.getElementById( "' . $dummy_fields['content'] . '" );</script>';
 // Attach files:
 if (!empty($comment_attachments)) {
     // display already attached files checkboxes
     $FileCache =& get_FileCache();
     $attachments = explode(',', $comment_attachments);
     $final_attachments = explode(',', $checked_attachments);
     // create attachments checklist
     $list_options = array();
     foreach ($attachments as $attachment_ID) {
         $attachment_File = $FileCache->get_by_ID($attachment_ID, false);
         if ($attachment_File) {
             // checkbox should be checked only if the corresponding file id is in the final attachments array
Example #23
0
?>

	<div class="edit_toolbars">
	<?php 
// --------------------------- TOOLBARS ------------------------------------
// CALL PLUGINS NOW:
$Plugins->trigger_event('AdminDisplayToolbar', array('target_type' => 'Comment', 'edit_layout' => NULL, 'Comment' => $edited_Comment));
?>
	</div>

	<?php 
// ---------------------------- TEXTAREA -------------------------------------
$content = $comment_content;
$Form->fieldstart = '<div class="edit_area">';
$Form->fieldend = "</div>\n";
$Form->textarea_input('content', $content, 16, '', array('cols' => 40, 'id' => 'commentform_post_content', 'class' => 'autocomplete_usernames'));
$Form->fieldstart = '<div class="tile">';
$Form->fieldend = '</div>';
?>
	<script type="text/javascript">
		<!--
		// This is for toolbar plugins
		var b2evoCanvas = document.getElementById('commentform_post_content');
		//-->
	</script>

	<div class="edit_actions">

	<?php 
// ---------- DELETE ----------
if ($edited_Comment->status == 'trash' && ($action == 'edit' || $action == 'update_edit')) {
$Form->checkbox('autocomplete_usernames', $edited_Blog->get_setting('autocomplete_usernames'), T_('Autocomplete usernames in back-office'), T_('Check to enable auto-completion of usernames entered after a "@" sign in the comment forms'));
echo '</div>';
if ($edited_Blog->get_setting('allow_comments') == 'never') {
    ?>
	<script type="text/javascript">
		<!--
		jQuery( '.feedback_details_container' ).hide();
		//-->
	</script>
	<?php 
}
$Form->end_fieldset();
$Form->begin_fieldset(T_('Voting options') . get_manual_link('comment-voting-options'), array('class' => 'feedback_details_container'));
$Form->checkbox('display_rating_summary', $edited_Blog->get_setting('display_rating_summary'), T_('Display summary'), T_('Display a summary of ratings above the comments'));
$Form->radio('allow_rating_items', $edited_Blog->get_setting('allow_rating_items'), array($any_option, $registered_option, $member_option, $never_option), T_('Allow star ratings from'), true);
$Form->textarea_input('rating_question', $edited_Blog->get_setting('rating_question'), 3, T_('Star rating question'));
$Form->checkbox('allow_rating_comment_helpfulness', $edited_Blog->get_setting('allow_rating_comment_helpfulness'), T_('Allow helpful/not helpful'), T_('Allow users to say if a comment was helpful or not.'));
$Form->end_fieldset();
// display comments settings provided by optional modules:
// echo 'modules';
modules_call_method('display_collection_comments', array('Form' => &$Form, 'edited_Blog' => &$edited_Blog));
$Form->begin_fieldset(T_('Comment moderation') . get_manual_link('comment-moderation'));
$is_bootstrap_skin = isset($AdminUI, $AdminUI->skin_name) && $AdminUI->skin_name == 'bootstrap';
$newstatus_warning_attrs = ' id="newstatus_warning" style="display:' . ($edited_Blog->get_setting('new_feedback_status') == 'published' ? 'inline' : 'none') . '"';
$newstatus_warning = str_replace('$attrs$', $newstatus_warning_attrs, $spammers_warning);
$status_options = get_visibility_statuses('', array('redirected', 'trash'));
if ($edited_Blog->get_setting('new_feedback_status') != 'published') {
    if ($perm_blog_admin) {
        // Only admin can set this setting to 'Public'
        $status_options['published'] .= $is_bootstrap_skin ? get_admin_badge('coll', false) : ' [' . T_('Admin') . ']';
    } else {