function rcl_get_tablist_options($content)
{
    global $tabs_rcl, $rcl_options;
    rcl_sortable_scripts();
    $opt = new Rcl_Options('tabs');
    if (!$tabs_rcl) {
        $content .= $opt->options(__('Setting tabs', 'wp-recall'), __('Neither one tab personal account not found', 'wp-recall'));
        return $content;
    }
    $tabs = '<p>' . __('Sort your tabs by dragging them to the desired position', 'wp-recall') . '</p>' . '<ul id="tabs-list-rcl" class="sortable">';
    if (isset($rcl_options['tabs']['order'])) {
        foreach ($rcl_options['tabs']['order'] as $order => $key) {
            if (!isset($tabs_rcl[$key])) {
                continue;
            }
            $tabs .= rcl_get_tab_option($key);
            $keys[$key] = 1;
        }
        foreach ($tabs_rcl as $key => $tab) {
            if (isset($keys[$key])) {
                continue;
            }
            $tabs .= rcl_get_tab_option($key, $tab);
        }
    } else {
        foreach ($tabs_rcl as $key => $tab) {
            if (!isset($tab['args']['order'])) {
                continue;
            }
            $order = $tab['args']['order'];
            if (isset($order)) {
                if (!isset($otabs[$order])) {
                    $otabs[$order][$key] = $tab;
                } else {
                    for ($a = $order; 1 == 1; $a++) {
                        if (!isset($otabs[$a])) {
                            $otabs[$a][$key] = $tab;
                            break;
                        }
                    }
                }
            }
        }
        foreach ($tabs_rcl as $key => $tab) {
            if (!isset($tab['args']['order'])) {
                $otabs[][$key] = $tab;
            }
        }
        ksort($otabs);
        foreach ($otabs as $order => $vals) {
            foreach ($vals as $key => $val) {
                $tabs .= rcl_get_tab_option($key, $val);
            }
        }
    }
    $tabs .= '</ul>';
    $tabs .= '<script>jQuery(function(){jQuery(".sortable").sortable();return false;});</script>';
    $content .= $opt->options(__('Setting tabs', 'wp-recall'), $opt->option_block(array($tabs)));
    return $content;
}
function rmag_primary_options($content)
{
    global $rcl_options;
    $rcl_options = get_option('primary-rmag-options');
    include_once RCL_PATH . 'functions/rcl_options.php';
    $opt = new Rcl_Options(rcl_key_addon(pathinfo(__FILE__)));
    $args = array('selected' => $rcl_options['basket_page_rmag'], 'name' => 'basket_page_rmag', 'show_option_none' => '<span style="color:red">Не выбрано</span>', 'echo' => 0);
    $content .= $opt->options('Настройки WP-RECALL-MAGAZIN', array($opt->option_block(array($opt->title('Общие настройки'), $opt->label('Email для уведомлений'), $opt->option('email', array('name' => 'admin_email_magazin_recall')), $opt->notice('Если email не указан, то уведомления будут рассылаться всем пользователям сайта с правами "Администратор"'), $opt->label('Наценка на товары (%)'), $opt->option('number', array('name' => 'margin_product')), $opt->notice('Если ноль или ничего нет, то наценка на товары не используется'))), $opt->option_block(array($opt->title('Оформление заказа'), $opt->label('Регистрация при оформлении'), $opt->option('select', array('name' => 'noreg_order', 'options' => array('Включено', 'Отключено'))), $opt->notice('Если включено, то пользователь автоматически регистрируется на сайте при успешном оформлении заказа'))), $opt->option_block(array($opt->title('Учет товара'), $opt->label('Учет товара на складе'), $opt->option('select', array('name' => 'products_warehouse_recall', 'options' => array('Отключено', 'Включено'))), $opt->notice('Если учет ведется, то у товаров можно будет отмечать наличие на складе. Если товар не в наличии, то кнопка на добавление товара в корзину отсутствует'))), $opt->option_block(array($opt->title('Корзина'), $opt->label('Порядок вывода кнопки "В корзину"'), $opt->option('select', array('name' => 'add_basket_button_recall', 'options' => array('Автоматически', 'Через шорткод'))), $opt->notice('На странице товара. Если шорткод, то используем [add-basket]'), $opt->label('Страница оформления заказа'), wp_dropdown_pages($args), $opt->notice('Укажите страницу, где размещен шорткод [basket]'))), $opt->option_block(array($opt->title('Система похожих или рекомендуемых товаров'), $opt->label('Порядок вывода'), $opt->option('select', array('name' => 'sistem_related_products', 'options' => array('Отключено', 'Включено'))), $opt->notice('Если учет ведется, то у товаров можно будет отмечать наличие на складе. Если товар не в наличии, то кнопка на добавление товара в корзину отсутствует'), $opt->label('Заголовок блока рекомендуемых товаров'), $opt->option('text', array('name' => 'title_related_products_recall')), $opt->label('Количество рекомендуемых товаров'), $opt->option('number', array('name' => 'size_related_products')))), $opt->option_block(array($opt->title('Валюта и курсы'), $opt->label('Основная валюта'), $opt->option('select', array('name' => 'primary_cur', 'options' => rcl_get_currency())), $opt->label('Второстепенная валюта'), $opt->option('select', array('name' => 'multi_cur', 'parent' => true, 'options' => array('Отключено', 'Включено'))), $opt->child(array('name' => 'multi_cur', 'value' => 1), array($opt->label('Выберите валюту'), $opt->option('select', array('name' => 'secondary_cur', 'options' => rcl_get_currency())), $opt->label('Курс'), $opt->option('text', array('name' => 'curse_currency')), $opt->notice('Укажите курс второстепенной валюты по отношению к основной. Например: 1.3')))))));
    return $content;
}
function rcl_get_publics_options_page($content)
{
    global $rcl_options, $_wp_additional_image_sizes;
    $opt = new Rcl_Options(__FILE__);
    $args = array('selected' => $rcl_options['public_form_page_rcl'], 'name' => 'public_form_page_rcl', 'show_option_none' => '<span style="color:red">' . __('Not selected', 'wp-recall') . '</span>', 'echo' => 0);
    $guest_redirect = isset($rcl_options['guest_post_redirect']) ? $rcl_options['guest_post_redirect'] : false;
    $_wp_additional_image_sizes['thumbnail'] = 1;
    $_wp_additional_image_sizes['medium'] = 1;
    $_wp_additional_image_sizes['large'] = 1;
    foreach ($_wp_additional_image_sizes as $name => $size) {
        $sh_name = $name;
        if ($size != 1) {
            $sh_name .= ' (' . $size['width'] . '*' . $size['height'] . ')';
        }
        $d_sizes[$name] = $sh_name;
    }
    $roles = array(10 => __('only Administrators', 'wp-recall'), 7 => __('Editors and older', 'wp-recall'), 2 => __('Authors and older', 'wp-recall'), 0 => __('Guests and users', 'wp-recall'));
    $content .= $opt->options(__('The publish settings', 'wp-recall'), array($opt->option_block(array($opt->title(__('General settings', 'wp-recall')), $opt->label(__('Page publishing and editing records', 'wp-recall')), wp_dropdown_pages($args), $opt->notice(__('Required for proper formation of links to edit records, you must specify the page where the shortcode is [public-form] no matter where displayed the very form of publication this page will be used to edit the entry', 'wp-recall')), $opt->label(__('Display information about the author', 'wp-recall')), $opt->option('select', array('name' => 'info_author_recall', 'options' => array(__('Disabled', 'wp-recall'), __('Included', 'wp-recall')))), $opt->label(__('Use preview', 'wp-recall')), $opt->option('select', array('name' => 'public_preview', 'options' => array(__('Yes', 'wp-recall'), __('No', 'wp-recall')))), $opt->label(__('Tab list of publications', 'wp-recall')), $opt->option('select', array('name' => 'publics_block_rcl', 'parent' => true, 'options' => array(__('Disabled', 'wp-recall'), __('Included', 'wp-recall')))), $opt->child(array('name' => 'publics_block_rcl', 'value' => 1), array($opt->label(__('List of publications of the user', 'wp-recall')), $opt->option('select', array('name' => 'view_publics_block_rcl', 'options' => array(__('Only the owner of the account', 'wp-recall'), __('Show everyone including guests', 'wp-recall')))))))), $opt->option_block(array($opt->title(__('Category', 'wp-recall')), $opt->label(__('Authorized headings', 'wp-recall')), $opt->option('text', array('name' => 'id_parent_category')), $opt->notice(__('ID columns in which permitted the publication should be separated by commas. ' . 'This setting is common to all forms of publication, but it is possible ' . 'to specify the desired category in shortcode forms, for example: [public-form cats="72,149"] ' . 'or for each form separately on the page generate custom fields', 'wp-recall')), $opt->notice(__('It is better to specify the parent category, then their child will be withdrawn automatically.', 'wp-recall')), $opt->label(__('Number of columns to select', 'wp-recall')), $opt->option('select', array('name' => 'count_category_post', 'default' => 1, 'options' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5))))), $opt->option_block(array($opt->title(__('Form of publication', 'wp-recall')), $opt->label(__('Text editor', 'wp-recall')), $opt->option('select', array('name' => 'type_text_editor', 'parent' => true, 'options' => array(__('WP-RECALL editor', 'wp-recall'), __('WordPress editor', 'wp-recall')))), $opt->child(array('name' => 'type_text_editor', 'value' => 0), array($opt->label(__('Images sizes', 'wp-recall')), $opt->option('text', array('name' => 'max_sizes_attachment', 'default' => '800,600')), $opt->notice(__('Default: 800,600', 'wp-recall')), $opt->label(__('Available buttons Editor', 'wp-recall')), $opt->option('checkbox', array('name' => 'rcl_editor_buttons', 'options' => array('header' => __('Subheader', 'wp-recall'), 'text' => __('Text', 'wp-recall'), 'image' => __('Upload images', 'wp-recall'), 'html' => __('HTML', 'wp-recall')))))), $opt->child(array('name' => 'type_text_editor', 'value' => 1), array($opt->label(__('View editor WP', 'wp-recall')), $opt->option('checkbox', array('name' => 'wp_editor', 'options' => array(1 => __('Visual Editor', 'wp-recall'), 2 => __('HTML-Editor', 'wp-recall')))), $opt->label(__('Number of images in the gallery Wp-Recall', 'wp-recall')), $opt->option('number', array('name' => 'count_image_gallery', 'default' => 10)), $opt->label(__('The maximum image size, Mb', 'wp-recall')), $opt->option('number', array('name' => 'public_gallery_weight', 'default' => 2)), $opt->notice(__('To limit image uploads to publish this value in megabytes. By default, 2MB', 'wp-recall')), $opt->label(__('The size in the editor by default', 'wp-recall')), $opt->option('select', array('name' => 'default_size_thumb', 'options' => $d_sizes)), $opt->notice(__('Select the picture size in the silence of their use in the visual editor during the publishing process', 'wp-recall')))), $opt->label(__('The output form of publication', 'wp-recall')), $opt->option('select', array('name' => 'output_public_form_rcl', 'default' => 1, 'parent' => 1, 'options' => array(__('Do not display', 'wp-recall'), __('Output', 'wp-recall')))), $opt->child(array('name' => 'output_public_form_rcl', 'value' => 1), array($opt->label(__('The form ID', 'wp-recall')), $opt->option('number', array('name' => 'form-lk')), $opt->notice(__('Enter the form ID to the conclusion in the personal Cabinet. The default is 1', 'wp-recall')))))), $opt->option_block(array($opt->title(__('Publication of records', 'wp-recall')), $opt->label(__('Republishing is allowed', 'wp-recall')), $opt->option('select', array('name' => 'user_public_access_recall', 'parent' => 1, 'options' => $roles)), $opt->child(array('name' => 'user_public_access_recall', 'value' => 0), array($opt->label(__('Redirect page', 'wp-recall')), wp_dropdown_pages(array('selected' => $guest_redirect, 'name' => 'guest_post_redirect', 'show_option_none' => __('Not selected', 'wp-recall'), 'echo' => 0)), $opt->notice(__('Select the page to which visitors will be redirected after a successful publication , if the site is included in the registration confirmation email', 'wp-recall')))), $opt->label(__('Moderation of publications', 'wp-recall')), $opt->option('select', array('name' => 'moderation_public_post', 'options' => array(__('To publish immediately', 'wp-recall'), __('Send for moderation', 'wp-recall')))), $opt->notice(__('If used in moderation: To allow the user to see their publication before it is moderated, it is necessary to have on the website right below the Author', 'wp-recall')))), $opt->option_block(array($opt->title(__('Editing', 'wp-recall')), $opt->label(__('Frontend editing', 'wp-recall')), $opt->option('checkbox', array('name' => 'front_editing', 'options' => array(10 => __('Administrators', 'wp-recall'), 7 => __('Editors', 'wp-recall'), 2 => __('Authors', 'wp-recall')))), $opt->label(__('Time limit editing', 'wp-recall')), $opt->option('number', array('name' => 'time_editing')), $opt->notice(__('Limit editing time of publication in hours, by default: unlimited', 'wp-recall')))), $opt->option_block(array($opt->title(__('Tags', 'wp-recall')), $opt->label(__('Field add tags', 'wp-recall')), $opt->option('select', array('name' => 'field_tags', 'options' => array(__('Do not display', 'wp-recall'), __('Output', 'wp-recall')))), $opt->label(__('Displaying a list of tags', 'wp-recall')), $opt->option('select', array('name' => 'display_tags', 'parent' => 1, 'options' => array(__('Do not display', 'wp-recall'), __('Output', 'wp-recall')))), $opt->child(array('name' => 'display_tags', 'value' => 1), array($opt->label(__('Limit the output', 'wp-recall')), $opt->option('text', array('name' => 'limit_tags')), $opt->notice(__('IDs of tags separated by commas, default displays all', 'wp-recall')))))), $opt->option_block(array($opt->title(__('Custom fields', 'wp-recall')), $opt->notice(__('Settings only for fields created using the form of the publication wp-recall', 'wp-recall')), $opt->label(__('Automatic withdrawal', 'wp-recall')), $opt->option('select', array('name' => 'pm_rcl', 'parent' => true, 'options' => array(__('No', 'wp-recall'), __('Yes', 'wp-recall')))), $opt->child(array('name' => 'pm_rcl', 'value' => 1), array($opt->label(__('Place output fields', 'wp-recall')), $opt->option('select', array('name' => 'pm_place', 'options' => array(__('After the content recording', 'wp-recall'), __('On content recording', 'wp-recall'))))))))));
    return $content;
}
function rcl_admin_page_rating($content)
{
    global $rcl_rating_types;
    $opt = new Rcl_Options(__FILE__);
    $options = '';
    foreach ($rcl_rating_types as $type => $data) {
        $more = false;
        $notice_temp = __('select a template output stories where', 'wp-recall') . ' <br>' . __('%USER% - name of the voted', 'wp-recall') . ', <br>' . __('%VALUE% - rated value', 'wp-recall') . ', <br>' . __('%DATE% - date of changing the rating', 'wp-recall') . ', <br>';
        if ($type == 'comment') {
            $notice_temp .= __('%COMMENT% - link to comment', 'wp-recall') . ', <br>';
        }
        if (isset($data['post_type'])) {
            $notice_temp .= __('%POST% - link to publication', 'wp-recall');
        }
        if (isset($data['style'])) {
            $more .= $opt->label(__('Type of rating for', 'wp-recall') . ' ' . $data['type_name']);
            $more .= $opt->option('select', array('name' => 'rating_type_' . $type, 'options' => array(__('Plus/minus', 'wp-recall'), __('I like', 'wp-recall'))));
        }
        if (isset($data['data_type'])) {
            $more .= $opt->label(__('Overall rating ' . $data['type_name'], 'wp-recall'));
            $more .= $opt->option('select', array('name' => 'rating_overall_' . $type, 'options' => array(__('Sum votes values', 'wp-recall'), __('Number of positive and negative votes', 'wp-recall'))));
        }
        if (isset($data['limit_votes'])) {
            $more .= $opt->label(__('Limit of one vote per user', 'wp-recall'));
            $more .= $opt->label(__('Positive votes', 'wp-recall'));
            $more .= __('Number', 'wp-recall') . ': ' . $opt->option('number', array('name' => 'rating_plus_limit_' . $type));
            $more .= ' ' . __('Time', 'wp-recall') . ': ' . $opt->option('number', array('name' => 'rating_plus_time_' . $type));
            $more .= $opt->label(__('Negative votes', 'wp-recall'));
            $more .= __('Number', 'wp-recall') . ': ' . $opt->option('number', array('name' => 'rating_minus_limit_' . $type));
            $more .= ' ' . __('Time', 'wp-recall') . ': ' . $opt->option('number', array('name' => 'rating_minus_time_' . $type));
            $more .= $opt->notice(__('Note: Time in seconds', 'wp-recall'));
        }
        $options .= $opt->option_block(array($opt->title(__('The rating', 'wp-recall') . ' ' . $data['type_name']), $opt->option('select', array('name' => 'rating_' . $type, 'options' => array(__('Disabled', 'wp-recall'), __('Included', 'wp-recall')))), $more, $opt->label(__('Points for ranking', 'wp-recall') . ' ' . $data['type_name']), $opt->option('text', array('name' => 'rating_point_' . $type)), $opt->notice(__('set how many points the ranking will be awarded for a positive vote or how many points will be subtracted from the rating for a negative vote', 'wp-recall')), $opt->label(sprintf(__('The influence of rating %s on the overall rating', 'wp-recall'), $data['type_name'])), $opt->option('select', array('name' => 'rating_user_' . $type, 'parent' => true, 'options' => array(__('No', 'wp-recall'), __('Yes', 'wp-recall')))), $opt->child(array('name' => 'rating_user_' . $type, 'value' => 1), array($opt->label(__('Template output stories in the overall ranking', 'wp-recall')), $opt->option('text', array('name' => 'rating_temp_' . $type, 'default' => '%USER% ' . __('voted', 'wp-recall') . ': %VALUE%')), $opt->notice($notice_temp)))));
    }
    $content .= $opt->options(__('Rating settings', 'wp-recall'), array($options, $opt->option_block(array($opt->label(__('Allow to bypass the moderation of publications at achievement rating', 'wp-recall')), $opt->option('number', array('name' => 'rating_no_moderation')), $opt->notice(__('specify the rating level at which the user will get the ability to post without moderation', 'wp-recall')))), $opt->option_block(array($opt->label(__('View results', 'wp-recall')), $opt->option('select', array('name' => 'rating_results_can', 'default' => 0, 'options' => array(0 => __('All users', 'wp-recall'), 1 => __('Participants and older', 'wp-recall'), 2 => __('Authors and older', 'wp-recall'), 7 => __('Editors and older', 'wp-recall'), 10 => __('only Administrators', 'wp-recall')))), $opt->notice(__('specify the user group which is allowed to view votes', 'wp-recall')))), $opt->option_block(array($opt->label(__('Deleting your voice', 'wp-recall')), $opt->option('select', array('name' => 'rating_delete_voice', 'options' => array(__('No', 'wp-recall'), __('Yes', 'wp-recall'))))))));
    return $content;
}
Esempio n. 5
0
 function get_admin_private_mess_page_content($content)
 {
     global $rcl_options;
     if (!isset($rcl_options['file_exchange']) || !$rcl_options['file_exchange']) {
         wp_clear_scheduled_hook('days_garbage_file_rcl');
     }
     $opt = new Rcl_Options(__FILE__);
     $content .= $opt->options(__('Settings private messages', 'wp-recall'), $opt->option_block(array($opt->title(__('Private messages', 'wp-recall')), $opt->label(__('Displaying messages in the correspondence', 'wp-recall')), $opt->option('select', array('name' => 'sort_mess', 'options' => array(__('Top-Down', 'wp-recall'), __('Bottom-Up', 'wp-recall')))), $opt->label(__('Limit words message', 'wp-recall')), $opt->option('number', array('name' => 'ms_limit_words')), $opt->notice(__('the default is 400', 'wp-recall')), $opt->label(__('The number of messages in the conversation', 'wp-recall')), $opt->option('number', array('name' => 'max_private_message')), $opt->notice(__('the default is 100 messages in the conversation (per correspondence user)', 'wp-recall')), $opt->label(__('Pause between requests for new posts to show per page of correspondence with another user in seconds', 'wp-recall')), $opt->option('number', array('name' => 'update_private_message')), $opt->label(__('The number of requests you receive a new message page correspondence', 'wp-recall')), $opt->option('number', array('name' => 'max_request_new_message')), $opt->notice(__('Specify the maximum number of requests to retrieve a new message from a friend on the page of correspondence.' . 'If the number of requests exceeds the specified value, then the requests will stop. If nothing is specified or you specify zero, then there is no limit.', 'wp-recall')), $opt->label(__('The pause between requests for new messages on all other pages of the website in seconds', 'wp-recall')), $opt->option('number', array('name' => 'global_update_private_message')), $opt->notice(__('If null, then the receipt of new messages only when the page loads, without subsequent requests', 'wp-recall')), $opt->label(__('Lock requests if the person offline', 'wp-recall')), $opt->option('select', array('name' => 'block_offrequest', 'options' => array(__('Do not block', 'wp-recall'), __('To block requests', 'wp-recall')))), $opt->notice(__('We mean a request to retrieve new messages from the user to the page which you are', 'wp-recall')), $opt->label(__('File sharing', 'wp-recall')), $opt->option('select', array('name' => 'file_exchange', 'parent' => true, 'options' => array(__('Prohibited', 'wp-recall'), __('Allowed', 'wp-recall')))), $opt->child(array('name' => 'file_exchange', 'value' => 1), array($opt->label(__('Maximum file size, Mb', 'wp-recall')), $opt->option('number', array('name' => 'file_exchange_weight')), $opt->notice(__('To restrict downloading of files this value in megabytes. By default, 2MB', 'wp-recall')), $opt->label(__('The retention time of the file', 'wp-recall')), $opt->option('number', array('name' => 'savetime_file')), $opt->notice(__('Specify the maximum number of unclaimed files in days. After this period, the file will be deleted. The default is 7 days.', 'wp-recall')), $opt->label(__('Limit unmatched files')), $opt->option('number', array('name' => 'file_limit')), $opt->notice(__('Specify the number of files missed by the recipients in which the user loses the possibility of further transfer of files. Protection from spam. Default-without any restrictions.', 'wp-recall')))))));
     return $content;
 }
Esempio n. 6
0
function rcl_profile_options($content)
{
    $opt = new Rcl_Options(__FILE__);
    $content .= $opt->options(__('Profile settings and account', 'wp-recall'), $opt->option_block(array($opt->title(__('Profile and account', 'wp-recall')), $opt->label(__('Allow to delete users from your account?', 'wp-recall')), $opt->option('select', array('name' => 'delete_user_account', 'options' => array(__('No', 'wp-recall'), __('Yes', 'wp-recall')))), $opt->label(__('The maximum size of the avatar, Mb', 'wp-recall')), $opt->option('number', array('name' => 'avatar_weight')), $opt->notice(__('To restrict the loading of images as avatars this value in megabytes. By default, 2MB', 'wp-recall')))));
    return $content;
}
Esempio n. 7
0
 function get_review_options($content)
 {
     $opt = new Rcl_Options(__FILE__);
     $content .= $opt->options(__('Settings reviews', 'wp-recall'), $opt->option_block(array($opt->title(__('Reviews', 'wp-recall')), $opt->label(__('To accept and leave feedback can', 'wp-recall')), $opt->option('select', array('name' => 'type_recall', 'options' => array(__('All', 'wp-recall'), __('With published posts', 'wp-recall')))), $opt->label(__('Restriction rated', 'wp-recall')), $opt->option('number', array('name' => 'rw_limit_rating')), $opt->notice(__('the default not limited', 'wp-recall')))));
     return $content;
 }
function rcl_admin_groups_page_content($content)
{
    $opt = new Rcl_Options(__FILE__);
    $content .= $opt->options(__('Group settings', 'wp-recall'), $opt->option_block(array($opt->title(__('Groups', 'wp-recall')), $opt->label(__('Creating groups is allowed', 'wp-recall')), $opt->option('select', array('name' => 'public_group_access_recall', 'options' => array(10 => __('only Administrators', 'wp-recall'), 7 => __('Editors and older', 'wp-recall'), 2 => __('Authors and older', 'wp-recall'), 1 => __('Participants and older', 'wp-recall')))), $opt->label(__('Moderation of publications in the group', 'wp-recall')), $opt->option('select', array('name' => 'moderation_public_group', 'options' => array(__('To publish immediately', 'wp-recall'), __('Send for moderation', 'wp-recall')))), $opt->notice(__('If used in moderation: To allow the user to see their publication before it is moderated, it is necessary to have on the website right below the Author', 'wp-recall')))));
    return $content;
}