Exemplo n.º 1
0
<?php

require_once WP_RW__PLUGIN_DIR . "/themes/dir.php";
require_once WP_RW__PLUGIN_DIR . "/lib/defaults.php";
require_once WP_RW__PLUGIN_DIR . "/lib/def_settings.php";
global $DEFAULT_OPTIONS;
$options_type = rw_options()->type;
$options_theme = rw_options()->theme;
?>
<td><span class="rw-ui-def"><?php 
_erw('theme');
?>
:</span></td>
<td>
	<img id="rw_theme_loader" src="<?php 
echo WP_RW__ADDRESS_IMG;
?>
rw.loader.gif" alt=""/>
	<?php 
global $RW_THEMES;
foreach ($RW_THEMES as $type => $type_themes) {
    ?>
			<div id="rw_<?php 
    echo $type;
    ?>
_theme_select" class="rw-select" style="display: none;">
				<select tabindex="4">
					<option></option>
				</select>
				<i class="rw-select-icon"></i>
Exemplo n.º 2
0
<?php

$selected_size = rw_options()->size;
?>
<td class="rw-ui-def-width">
	<span class="rw-ui-def"><?php 
_erw('size');
?>
:</span>
</td>
<td>
	<?php 
$sizes = array('tiny' => __rw('tiny'), 'small' => __rw("small"), 'medium' => __rw("medium"), 'large' => __rw("large"));
$tab_index = 5;
foreach ($sizes as $size => $label) {
    ?>
			<div class="rw-ui-img-radio<?php 
    if ($selected_size == $size) {
        echo " rw-selected";
    }
    ?>
" onclick="RWM.Set.size(RW.SIZE.<?php 
    echo strtoupper($size);
    ?>
);">
				<i class="rw-ui-holder"><i
						class="rw-ui-sprite rw-ui-star rw-ui-<?php 
    echo $size;
    ?>
 rw-ui-yellow"></i></i>
				<span><?php 
Exemplo n.º 3
0
<?php

$frequency = rw_options()->frequency;
?>
<div id="rw_frequency_settings" class="has-sidebar has-right-sidebar">
	<div class="has-sidebar-content">
		<div class="postbox rw-body">
			<h3><?php 
_erw('voting-frequency-settings');
?>
</h3>

			<div class="inside rw-ui-content-container rw-no-radius" style="padding: 5px; width: 610px;">
				<?php 
$frquencies = array(array('f' => 'ONCE', 'label' => __rw('once'), 'days' => -1, 'desc' => __rw('once_desc')), array('f' => 'DAILY', 'label' => __rw('daily'), 'days' => 1, 'desc' => __rw('daily_desc')), array('f' => 'WEEKLY', 'label' => __rw('weekly'), 'days' => 7, 'desc' => __rw('weekly_desc')), array('f' => 'MONTHLY', 'label' => __rw('monthly'), 'days' => 30, 'desc' => __rw('monthly_desc')), array('f' => 'YEARLY', 'label' => __rw('annually'), 'days' => 365, 'desc' => __rw('annually_desc')), array('f' => 'UNLIMITED', 'label' => __rw('unlimited'), 'days' => 0, 'desc' => __rw('unlimited_desc')));
?>
				<select>
					<?php 
foreach ($frquencies as $f) {
    $selected = $frequency == $f['days'];
    ?>
						<option name="rw_frequency" data-frequency="<?php 
    echo $f['f'];
    ?>
"
						        value="<?php 
    echo $f['days'];
    ?>
" <?php 
    if ($selected) {
        echo ' selected="selected"';
?>
</p>
							</li>
							<li>
								<b>{{avg_rate}}</b>

								<p class="description"><?php 
_erw('template_avg-rate');
?>
</p>
							</li>
							<li>
								<b>{{post.title}}</b>

								<p class="description" id="tagline-description"><?php 
_erw('template_title');
?>
</p>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<input type="hidden" name="add-on" value="<?php 
echo $selected_key;
?>
"/>
		<input type="hidden" name="rw-save-addons-settings"/>
	</form>
</div>
Exemplo n.º 5
0
"<?php 
    if ($font->type == $f) {
        echo ' checked="checked"';
    }
    ?>
 />
					</div>
				<?php 
}
?>
		</td>
	</tr>
	<tr id="rw_font_style" class="rw-odd">
		<td class="rw-ui-def-width">
			<span class="rw-ui-def"><?php 
_erw('style');
?>
:</span>
		</td>
		<td>
			<div class="rw-ui-img-radio<?php 
if ($font->bold) {
    echo " rw-selected";
}
?>
" onclick="rwStar.toggleBold(); rwNero.toggleBold();">
				<i class="rw-ui-holder"><i id="rw_ui_bold" class="rw-ui-sprite rw-ui-large"></i></i>
				<span><b>Bold</b></span>
				<input type="checkbox" name="rw-font-bold" value="0"<?php 
if ($font->bold) {
    echo ' checked="checked"';
Exemplo n.º 6
0
        /**
         * To get a list of all custom user defined posts:
         *
         *       get_post_types(array('public'=>true,'_builtin' => false))
         */
        public function SettingsPage()
        {
            RWLogger::LogEnterence('SettingsPage');
            // Must check that the user has the required capability.
            if (!current_user_can('manage_options')) {
                wp_die(__rw('no-sufficient-permissions'));
            }
            global $plugin_page;
            // Variables for the field and option names
            $rw_form_hidden_field_name = 'rw_form_hidden_field_name';
            $settings_data = array();
            $selected_key = 'dummy';
            if ($plugin_page === $this->GetMenuSlug('buddypress') && $this->IsBuddyPressInstalled()) {
                $settings_data = array('activity-blog-posts' => array('tab' => __rw('activity-blog-posts'), 'class' => 'new-blog-post', 'options' => WP_RW__ACTIVITY_BLOG_POSTS_OPTIONS, 'align' => WP_RW__ACTIVITY_BLOG_POSTS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__ACTIVITY_BLOG_POSTS_ALIGN], 'excerpt' => false, 'show_align' => true), 'activity-blog-comments' => array('tab' => __rw('activity-blog-comments'), 'class' => 'new-blog-comment', 'options' => WP_RW__ACTIVITY_BLOG_COMMENTS_OPTIONS, 'align' => WP_RW__ACTIVITY_BLOG_COMMENTS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__ACTIVITY_BLOG_COMMENTS_ALIGN], 'excerpt' => false, 'show_align' => true), 'activity-updates' => array('tab' => __rw('activity-updates'), 'class' => 'activity-update', 'options' => WP_RW__ACTIVITY_UPDATES_OPTIONS, 'align' => WP_RW__ACTIVITY_UPDATES_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__ACTIVITY_UPDATES_ALIGN], 'excerpt' => false, 'show_align' => true), 'activity-comments' => array('tab' => __rw('activity-comments'), 'class' => 'activity-comment', 'options' => WP_RW__ACTIVITY_COMMENTS_OPTIONS, 'align' => WP_RW__ACTIVITY_COMMENTS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__ACTIVITY_COMMENTS_ALIGN], 'excerpt' => false, 'show_align' => true), 'users' => array('tab' => __rw('user-profiles'), 'class' => 'user', 'options' => WP_RW__USERS_OPTIONS, 'align' => WP_RW__USERS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__USERS_ALIGN], 'excerpt' => false, 'show_align' => false));
                $selected_key = isset($_GET['rating']) ? $_GET['rating'] : 'activity-blog-posts';
                if (!isset($settings_data[$selected_key])) {
                    $selected_key = 'activity-blog-posts';
                }
            } else {
                if ($plugin_page === $this->GetMenuSlug('bbpress') && $this->IsBBPressInstalled()) {
                    $settings_data = array('forum-posts' => array('tab' => __rw('forum-posts'), 'class' => 'forum-post', 'options' => WP_RW__FORUM_POSTS_OPTIONS, 'align' => WP_RW__FORUM_POSTS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__FORUM_POSTS_ALIGN], 'excerpt' => false, 'show_align' => true), 'activity-forum-posts' => array('tab' => __rw('activity-forum-posts'), 'class' => 'new-forum-post', 'options' => WP_RW__ACTIVITY_FORUM_POSTS_OPTIONS, 'align' => WP_RW__ACTIVITY_FORUM_POSTS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__ACTIVITY_FORUM_POSTS_ALIGN], 'excerpt' => false, 'show_align' => true), 'users' => array('tab' => __rw('user-profiles'), 'class' => 'user', 'options' => WP_RW__USERS_OPTIONS, 'align' => WP_RW__USERS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__USERS_ALIGN], 'excerpt' => false, 'show_align' => false));
                    $selected_key = isset($_GET['rating']) ? $_GET['rating'] : 'forum-posts';
                    if (!isset($settings_data[$selected_key])) {
                        $selected_key = 'forum-posts';
                    }
                } else {
                    if ($plugin_page === $this->GetMenuSlug('user')) {
                        $settings_data = array('users-posts' => array('tab' => __rw('posts'), 'class' => 'user-post', 'options' => WP_RW__USERS_POSTS_OPTIONS, 'align' => WP_RW__USERS_POSTS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__USERS_POSTS_ALIGN], 'excerpt' => false, 'show_align' => false), 'users-pages' => array('tab' => __rw('pages'), 'class' => 'user-page', 'options' => WP_RW__USERS_PAGES_OPTIONS, 'align' => WP_RW__USERS_PAGES_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__USERS_PAGES_ALIGN], 'excerpt' => false, 'show_align' => false), 'users-comments' => array('tab' => __rw('comments'), 'class' => 'user-comment', 'options' => WP_RW__USERS_COMMENTS_OPTIONS, 'align' => WP_RW__USERS_COMMENTS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__USERS_COMMENTS_ALIGN], 'excerpt' => false, 'show_align' => false));
                        if ($this->IsBuddyPressInstalled()) {
                            $settings_data['users-activity-updates'] = array('tab' => __rw('activity-updates'), 'class' => 'user-activity-update', 'options' => WP_RW__USERS_ACTIVITY_UPDATES_OPTIONS, 'align' => WP_RW__USERS_ACTIVITY_UPDATES_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__USERS_ACTIVITY_UPDATES_ALIGN], 'excerpt' => false, 'show_align' => false);
                            $settings_data['users-activity-comments'] = array('tab' => __rw('activity-comments'), 'class' => 'user-activity-comment', 'options' => WP_RW__USERS_ACTIVITY_COMMENTS_OPTIONS, 'align' => WP_RW__USERS_ACTIVITY_COMMENTS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__USERS_ACTIVITY_COMMENTS_ALIGN], 'excerpt' => false, 'show_align' => false);
                            if ($this->IsBBPressInstalled()) {
                                $settings_data['users-forum-posts'] = array('tab' => __rw('forum-posts'), 'class' => 'user-forum-post', 'options' => WP_RW__USERS_FORUM_POSTS_OPTIONS, 'align' => WP_RW__USERS_FORUM_POSTS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__USERS_FORUM_POSTS_ALIGN], 'excerpt' => false, 'show_align' => false);
                            }
                        }
                        $selected_key = isset($_GET['rating']) ? $_GET['rating'] : 'users-posts';
                        if (!isset($settings_data[$selected_key])) {
                            $selected_key = 'users-posts';
                        }
                    } else {
                        $is_extension = false;
                        foreach ($this->_extensions as $ext) {
                            if ($plugin_page !== $this->GetMenuSlug($ext->GetSlug())) {
                                continue;
                            }
                            $is_extension = true;
                            $settings_data = $ext->GetSettings();
                            $selected_key = isset($_GET['rating']) && isset($settings_data[$_GET['rating']]) ? $_GET['rating'] : $this->GetFirstKey($settings_data);
                        }
                        if (!$is_extension) {
                            $settings_data = array('blog-posts' => array('tab' => __rw('blog-posts'), 'class' => 'blog-post', 'options' => WP_RW__BLOG_POSTS_OPTIONS, 'align' => WP_RW__BLOG_POSTS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__BLOG_POSTS_ALIGN], 'excerpt' => true, 'show_align' => true), 'front-posts' => array('tab' => __rw('front-page-posts'), 'class' => 'front-post', 'options' => WP_RW__FRONT_POSTS_OPTIONS, 'align' => WP_RW__FRONT_POSTS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__FRONT_POSTS_ALIGN], 'excerpt' => false, 'show_align' => true), 'comments' => array('tab' => __rw('comments'), 'class' => 'comment', 'options' => WP_RW__COMMENTS_OPTIONS, 'align' => WP_RW__COMMENTS_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__COMMENTS_ALIGN], 'excerpt' => false, 'show_align' => true), 'pages' => array('tab' => __rw('pages'), 'class' => 'page', 'options' => WP_RW__PAGES_OPTIONS, 'align' => WP_RW__PAGES_ALIGN, 'default_align' => $this->_OPTIONS_DEFAULTS[WP_RW__PAGES_ALIGN], 'excerpt' => false, 'show_align' => true));
                            $selected_key = isset($_GET['rating']) ? $_GET['rating'] : 'blog-posts';
                            if (!isset($settings_data[$selected_key])) {
                                $selected_key = 'blog-posts';
                            }
                        }
                    }
                }
            }
            $rw_current_settings = $settings_data[$selected_key];
            // Some alias.
            $rw_class = $rw_current_settings['class'];
            $is_blog_post = 'blog-post' === $rw_current_settings['class'];
            $item_with_category = in_array($rw_current_settings['class'], array('blog-post', 'front-post', 'comment'));
            // Visibility list must be loaded anyway.
            $this->_visibilityList = $this->GetOption(WP_RW__VISIBILITY_SETTINGS);
            if ($item_with_category) {
                // Categories Availability list must be loaded anyway.
                $this->categories_list = $this->GetOption(WP_RW__CATEGORIES_AVAILABILITY_SETTINGS);
            }
            // Availability list must be loaded anyway.
            $this->availability_list = $this->GetOption(WP_RW__AVAILABILITY_SETTINGS);
            $this->custom_settings_enabled_list = $this->GetOption(WP_RW__CUSTOM_SETTINGS_ENABLED);
            $this->custom_settings_list = $this->GetOption(WP_RW__CUSTOM_SETTINGS);
            $this->multirating_settings_list = $this->GetOption(WP_RW__MULTIRATING_SETTINGS);
            // Accumulated user ratings support.
            if ('users' === $selected_key && $this->IsBBPressInstalled()) {
                $rw_is_user_accumulated = $this->GetOption(WP_RW__IS_ACCUMULATED_USER_RATING);
            }
            // Comment "Reviews" mode support.
            if ('comments' === $selected_key) {
                $comment_ratings_mode_settings = $this->get_comment_ratings_mode_settings();
                $comment_ratings_mode = $comment_ratings_mode_settings->comment_ratings_mode;
            }
            // Reset categories.
            $rw_categories = array();
            // See if the user has posted us some information
            // If they did, this hidden field will be set to 'Y'
            if (isset($_POST[$rw_form_hidden_field_name]) && $_POST[$rw_form_hidden_field_name] == 'Y') {
                // Set settings into save mode.
                $this->settings->SetSaveMode();
                /* Multi-rating options.
                   ---------------------------------------------------------------------------------------------------------------*/
                if (isset($_POST['multi_rating'])) {
                    $multi_rating = $_POST['multi_rating'];
                    if (count($multi_rating['criteria']) > 3) {
                        $multi_rating['criteria'] = array_splice($multi_rating['criteria'], 0, 3);
                    }
                    // Unset empty labels
                    foreach ($multi_rating['criteria'] as $criteria_id => $criteria) {
                        $criteria_label = isset($criteria['label']) ? trim($criteria['label']) : '';
                        if (empty($criteria_label)) {
                            unset($multi_rating['criteria'][$criteria_id]['label']);
                        }
                    }
                    // Retrieve the current multi-rating options
                    if (!isset($this->multirating_settings_list)) {
                        $this->multirating_settings_list = new stdClass();
                    }
                    $multirating_options = $this->multirating_settings_list->{$rw_class};
                    // Save the new criteria IDs and labels
                    $multirating_options->criteria = $multi_rating['criteria'];
                    // Save the summary label
                    $summary_label = isset($multi_rating['summary_label']) ? trim($multi_rating['summary_label']) : '';
                    if (!empty($summary_label)) {
                        $multirating_options->summary_label = $summary_label;
                    } else {
                        unset($multirating_options->summary_label);
                    }
                    // Save the state of the Show Summary Rating option
                    $multirating_options->show_summary_rating = isset($multi_rating['show_summary_rating']) ? true : false;
                    // Save the updated multi-rating options
                    if (!isset($this->multirating_settings_list)) {
                        $this->multirating_settings_list = new stdClass();
                    }
                    $this->multirating_settings_list->{$rw_class} = $multirating_options;
                    $this->SetOption(WP_RW__MULTIRATING_SETTINGS, $this->multirating_settings_list);
                }
                /* Widget align options.
                   ---------------------------------------------------------------------------------------------------------------*/
                $rw_show_rating = isset($_POST['rw_show']) ? true : false;
                $rw_align = !$rw_show_rating ? new stdClass() : $rw_current_settings['default_align'];
                if ($rw_show_rating && isset($_POST['rw_align'])) {
                    $align = explode(' ', $_POST['rw_align']);
                    if (is_array($align) && count($align) == 2) {
                        if (in_array($align[0], array('top', 'bottom')) && in_array($align[1], array('left', 'center', 'right'))) {
                            $rw_align->ver = $align[0];
                            $rw_align->hor = $align[1];
                        }
                    }
                }
                $this->SetOption($rw_current_settings['align'], $rw_align);
                /* Rating-Widget options.
                   ---------------------------------------------------------------------------------------------------------------*/
                $rw_options = json_decode(preg_replace('/\\%u([0-9A-F]{4})/i', '\\u$1', urldecode(stripslashes($_POST['rw_options']))));
                if (null !== $rw_options) {
                    $this->SetOption($rw_current_settings['options'], $rw_options);
                }
                /* Availability settings.
                   ---------------------------------------------------------------------------------------------------------------*/
                $rw_availability = isset($_POST['rw_availability']) ? max(0, min(2, (int) $_POST['rw_availability'])) : 0;
                $this->availability_list->{$rw_class} = $rw_availability;
                $this->SetOption(WP_RW__AVAILABILITY_SETTINGS, $this->availability_list);
                if ($item_with_category) {
                    /* Categories Availability settings.
                       ---------------------------------------------------------------------------------------------------------------*/
                    $rw_categories = isset($_POST['rw_categories']) && is_array($_POST['rw_categories']) ? $_POST['rw_categories'] : array();
                    if (!isset($this->categories_list)) {
                        $this->categories_list = new stdClass();
                    }
                    $this->categories_list->{$rw_class} = in_array('-1', $rw_categories) ? array('-1') : $rw_categories;
                    $this->SetOption(WP_RW__CATEGORIES_AVAILABILITY_SETTINGS, $this->categories_list);
                }
                // Accumulated user ratings support.
                if ('users' === $selected_key && $this->IsBBPressInstalled() && isset($_POST['rw_accumulated_user_rating'])) {
                    $rw_is_user_accumulated = 'true' == (in_array($_POST['rw_accumulated_user_rating'], array('true', 'false')) ? $_POST['rw_accumulated_user_rating'] : 'true');
                    $this->SetOption(WP_RW__IS_ACCUMULATED_USER_RATING, $rw_is_user_accumulated);
                }
                // Comment ratings mode
                if ('comments' === $selected_key && isset($_POST['rw_comment_review_mode'])) {
                    $comment_ratings_mode = $_POST['rw_comment_review_mode'];
                    // Save the new comment ratings mode.
                    $comment_ratings_mode_settings = $this->get_comment_ratings_mode_settings();
                    $comment_ratings_mode_settings->comment_ratings_mode = $comment_ratings_mode;
                    $this->SetOption(WP_RW__DB_OPTION_IS_ADMIN_COMMENT_RATINGS_SETTINGS, $comment_ratings_mode_settings);
                }
                /* Visibility settings
                   ---------------------------------------------------------------------------------------------------------------*/
                $rw_visibility = isset($_POST['rw_visibility']) ? max(0, min(2, (int) $_POST['rw_visibility'])) : 0;
                $rw_visibility_exclude = isset($_POST['rw_visibility_exclude']) ? $_POST['rw_visibility_exclude'] : '';
                $rw_visibility_include = isset($_POST['rw_visibility_include']) ? $_POST['rw_visibility_include'] : '';
                $rw_custom_settings_enabled = isset($_POST['rw_custom_settings_enabled']) ? true : false;
                if (!isset($this->custom_settings_enabled_list)) {
                    $this->custom_settings_enabled_list = new stdClass();
                }
                $this->custom_settings_enabled_list->{$rw_class} = $rw_custom_settings_enabled;
                $this->SetOption(WP_RW__CUSTOM_SETTINGS_ENABLED, $this->custom_settings_enabled_list);
                $rw_custom_settings = isset($_POST['rw_custom_settings']) ? $_POST['rw_custom_settings'] : '';
                if (!isset($this->custom_settings_list)) {
                    $this->custom_settings_list = new stdClass();
                }
                $this->custom_settings_list->{$rw_class} = $rw_custom_settings;
                $this->SetOption(WP_RW__CUSTOM_SETTINGS, $this->custom_settings_list);
                if (!isset($this->_visibilityList)) {
                    $this->_visibilityList = new stdClass();
                }
                if (!isset($this->_visibilityList->{$rw_class})) {
                    $this->_visibilityList->{$rw_class} = new stdClass();
                }
                $this->_visibilityList->{$rw_class}->selected = $rw_visibility;
                $this->_visibilityList->{$rw_class}->exclude = self::IDsCollectionToArray($rw_visibility_exclude);
                $this->_visibilityList->{$rw_class}->include = self::IDsCollectionToArray($rw_visibility_include);
                $this->SetOption(WP_RW__VISIBILITY_SETTINGS, $this->_visibilityList);
                ?>
					<div class="updated"><p><strong><?php 
                _erw('settings-successfully-saved');
                ?>
</strong>
						</p></div>
				<?php 
            } else {
                /* Get rating alignment.
                   ---------------------------------------------------------------------------------------------------------------*/
                $rw_align = $this->GetOption($rw_current_settings['align']);
                /* Get show on excerpts option.
                   ---------------------------------------------------------------------------------------------------------------*/
                // Already loaded.
                /* Get rating options.
                   ---------------------------------------------------------------------------------------------------------------*/
                $rw_options = $this->GetOption($rw_current_settings['options']);
            }
            $rw_language_str = isset($rw_options->lng) ? $rw_options->lng : WP_RW__DEFAULT_LNG;
            if (!isset($this->_visibilityList->{$rw_class})) {
                $this->_visibilityList->{$rw_class} = new stdClass();
                $this->_visibilityList->{$rw_class}->selected = 0;
                $this->_visibilityList->{$rw_class}->exclude = '';
                $this->_visibilityList->{$rw_class}->include = '';
            }
            $rw_visibility_settings = $this->_visibilityList->{$rw_class};
            if (!isset($this->availability_list->{$rw_class})) {
                $this->availability_list->{$rw_class} = 0;
            }
            $rw_availability_settings = $this->availability_list->{$rw_class};
            if ($item_with_category) {
                if (!isset($this->categories_list->{$rw_class})) {
                    $this->categories_list->{$rw_class} = array(-1);
                }
                $rw_categories = $this->categories_list->{$rw_class};
            }
            if (!isset($this->custom_settings_enabled_list->{$rw_class})) {
                $this->custom_settings_enabled_list->{$rw_class} = false;
            }
            $rw_custom_settings_enabled = $this->custom_settings_enabled_list->{$rw_class};
            if (!isset($this->custom_settings_list->{$rw_class})) {
                $this->custom_settings_list->{$rw_class} = '';
            }
            $rw_custom_settings = $this->custom_settings_list->{$rw_class};
            $dictionary = array('DUMMY');
            $dir = $hor = 'dummy';
            require_once WP_RW__PLUGIN_DIR . "/languages/{$rw_language_str}.php";
            require_once WP_RW__PLUGIN_DIR . '/lib/defaults.php';
            require_once WP_RW__PLUGIN_DIR . '/lib/def_settings.php';
            global $DEFAULT_OPTIONS;
            rw_set_language_options($DEFAULT_OPTIONS, $dictionary, $dir, $hor);
            $theme_font_size_set = false;
            $theme_line_height_set = false;
            $rating_font_size_set = isset($rw_options->advanced) && isset($rw_options->advanced->font) && isset($rw_options->advanced->font->size);
            $rating_line_height_set = isset($rw_options->advanced) && isset($rw_options->advanced->layout) && isset($rw_options->advanced->layout->lineHeight);
            $def_options = $DEFAULT_OPTIONS;
            if (isset($rw_options->theme) && $rw_options->theme !== '') {
                require_once WP_RW__PLUGIN_DIR . '/themes/dir.php';
                global $RW_THEMES;
                if (!isset($rw_options->type)) {
                    $rw_options->type = isset($RW_THEMES['star'][$rw_options->theme]) ? 'star' : 'nero';
                }
                if (isset($RW_THEMES[$rw_options->type][$rw_options->theme])) {
                    $theme = array('DUMMY');
                    require WP_RW__PLUGIN_DIR . '/themes/' . $RW_THEMES[$rw_options->type][$rw_options->theme]['file'];
                    $theme_font_size_set = isset($theme['options']->advanced) && isset($theme['options']->advanced->font) && isset($theme['options']->advanced->font->size);
                    $theme_line_height_set = isset($theme['options']->advanced) && isset($theme['options']->advanced->layout) && isset($theme['options']->advanced->layout->lineHeight);
                    // Enrich theme options with defaults.
                    $def_options = rw_enrich_options1($theme['options'], $DEFAULT_OPTIONS);
                }
            }
            // Enrich rating options with calculated default options (with theme reference).
            $rw_options = rw_enrich_options1($rw_options, $def_options);
            // If font size and line height isn't explicitly specified on rating
            // options or rating's theme, updated theme correspondingly
            // to rating size.
            if (isset($rw_options->size)) {
                $SIZE = strtoupper($rw_options->size);
                if (!$rating_font_size_set && !$theme_font_size_set) {
                    global $DEF_FONT_SIZE;
                    if (!isset($rw_options->advanced)) {
                        $rw_options->advanced = new stdClass();
                    }
                    if (!isset($rw_options->advanced->font)) {
                        $rw_options->advanced->font = new stdClass();
                    }
                    $rw_options->advanced->font->size = $DEF_FONT_SIZE->{$SIZE};
                }
                if (!$rating_line_height_set && !$theme_line_height_set) {
                    global $DEF_LINE_HEIGHT;
                    if (!isset($rw_options->advanced)) {
                        $rw_options->advanced = new stdClass();
                    }
                    if (!isset($rw_options->advanced->layout)) {
                        $rw_options->advanced->layout = new stdClass();
                    }
                    $rw_options->advanced->layout->lineHeight = $DEF_LINE_HEIGHT->{$SIZE};
                }
            }
            $rw_languages = $this->languages;
            $this->settings->rating_type = $selected_key;
            $this->settings->options = $rw_options;
            $this->settings->languages = $rw_languages;
            $this->settings->language_str = $rw_language_str;
            $this->settings->categories = $rw_categories;
            $this->settings->availability = $rw_availability_settings;
            $this->settings->visibility = $rw_visibility_settings;
            $this->settings->form_hidden_field_name = $rw_form_hidden_field_name;
            $this->settings->custom_settings_enabled = $rw_custom_settings_enabled;
            $this->settings->custom_settings = $rw_custom_settings;
            // Accumulated user ratings support.
            if ('users' === $selected_key && $this->IsBBPressInstalled()) {
                $this->settings->is_user_accumulated = $rw_is_user_accumulated;
            } else {
                if ('comments' === $selected_key) {
                    // Comment ratings mode support
                    $this->settings->comment_ratings_mode = $comment_ratings_mode;
                }
            }
            ?>
				<div class="wrap rw-dir-ltr rw-wp-container">
					<h2 class="nav-tab-wrapper rw-nav-tab-wrapper">
						<?php 
            foreach ($settings_data as $key => $settings) {
                ?>
							<a href="<?php 
                echo esc_url(add_query_arg(array('rating' => $key, 'message' => false)));
                ?>
"
							   class="nav-tab<?php 
                if ($settings_data[$key] == $rw_current_settings) {
                    echo ' nav-tab-active';
                }
                ?>
"><?php 
                echo $settings['tab'];
                ?>
</a>
						<?php 
            }
            ?>
					</h2>

					<form method="post" action="">
						<div id="poststuff">
							<div id="rw_wp_set">
								<?php 
            rw_require_once_view('preview.php');
            ?>
								<div class="has-sidebar has-right-sidebar">
									<div class="has-sidebar-content">
										<div class="postbox rw-body">
											<?php 
            $enabled = isset($rw_align->ver);
            ?>
											<div style="padding: 10px;">
												<label for="rw_show">
													<input id="rw_show" type="checkbox" name="rw_show"
													       value="true"<?php 
            if ($enabled) {
                echo ' checked="checked"';
            }
            ?>
 onclick="RWM_WP.enable(this);"/> Enable
													for <?php 
            echo $rw_current_settings['tab'];
            ?>
												</label>
												<?php 
            if (true === $rw_current_settings['show_align']) {
                ?>
														<div class="rw-post-rating-align"<?php 
                if (!$enabled) {
                    echo ' style="display: none;"';
                }
                ?>
>
															<?php 
                $vers = array('top', 'bottom');
                $hors = array('left', 'center', 'right');
                ?>
															<select>
																<?php 
                foreach ($vers as $ver) {
                    foreach ($hors as $hor) {
                        $checked = false;
                        if ($enabled) {
                            $checked = $ver == $rw_align->ver && $hor == $rw_align->hor;
                        }
                        ?>
																			<option
																				value="<?php 
                        echo $ver . ' ' . $hor;
                        ?>
"<?php 
                        if ($checked) {
                            echo ' selected="selected"';
                        }
                        ?>
><?php 
                        echo ucwords($ver) . ' ' . ucwords($hor);
                        ?>
</option>
																		<?php 
                    }
                }
                ?>
															</select>
															<input id="rw_align" name="rw_align" type="hidden"
															       value="<?php 
                echo $rw_align->ver . ' ' . $rw_align->hor;
                ?>
">
															<script>
																(function ($) {
																	$('.rw-post-rating-align select').chosen({width: '100%'}).change(function (evt, params) {
																		$('#rw_align').val(params.selected);
																	});
																})(jQuery);
															</script>
														</div>
													<?php 
            }
            ?>
											</div>
										</div>
									</div>
								</div>
								<?php 
            if ('users' === $selected_key) {
                rw_require_once_view('user_rating_type_options.php');
            } else {
                if ('comments' === $selected_key) {
                    rw_require_once_view('comment_rating_mode_options.php');
                }
            }
            rw_require_once_view('options.php');
            rw_require_once_view('availability_options.php');
            rw_require_once_view('visibility_options.php');
            if ($is_blog_post) {
                rw_require_once_view('post_views_visibility.php');
            }
            if ($item_with_category) {
                rw_require_once_view('categories_availability_options.php');
            }
            rw_require_once_view('settings/frequency.php');
            rw_require_once_view('powerusers.php');
            ?>
							</div>
							<div id="rw_wp_set_widgets">
								<?php 
            if ($this->fs->is_not_paying()) {
                // Show random.
                if (0 == rand(0, 1)) {
                    rw_require_once_view('rich-snippets.php');
                } else {
                    rw_require_once_view('upgrade.php');
                }
            }
            ?>
							</div>
						</div>
					</form>
				</div>
				<?php 
            fs_require_template('powered-by.php');
            ?>
				<?php 
            // Store options if in save mode.
            if ($this->settings->IsSaveMode()) {
                $this->_options->store();
            }
        }
Exemplo n.º 7
0
if ($visibility->selected == 2) {
    echo ' rw-selected';
}
?>
" onclick="jQuery(this).children('input[type=text]').focus();">
					<i class="rw-ui-sprite  rw-ui-visibility-include"></i> <input type="radio" name="rw_visibility"
					                                                              value="2" <?php 
if ($visibility->selected == 2) {
    echo ' checked="checked"';
}
?>
> <span><?php 
printf(__rw('visibility_show-on-every-include', WP_RW__ID), $types);
?>
</span>
					<input type="text" name="rw_visibility_include"
					       value="<?php 
echo implode_or_empty($visibility->include);
?>
"/>
				</div>
				<span
					style="font-size: 10px; background: white; padding: 2px; border: 1px solid gray; display: block; margin-top: 5px; font-weight: bold; background: rgb(240,240,240); color: black;"><?php 
_erw('visibility__separate-with-commas');
?>
</span>
			</div>
		</div>
	</div>
</div>
Exemplo n.º 8
0
<div class="has-sidebar has-right-sidebar">
	<div class="has-sidebar-content">
		<div class="postbox rw-body">
			<h3><?php 
_erw('ratingwidget-options');
?>
</h3>

			<div class="inside rw-ui-content-container rw-no-radius">
				<table>
					<?php 
$odd = false;
?>
					<tr id="rw_language" class="rw-<?php 
echo ($odd = !$odd) ? 'odd' : 'even';
?>
">
						<?php 
rw_include_once_view('settings/language.php');
?>
					</tr>
					<tr id="rw_rate_type" class="rw-<?php 
echo ($odd = !$odd) ? 'odd' : 'even';
?>
">
						<?php 
rw_include_once_view('settings/type.php');
?>
					</tr>
					<tr id="rw_theme" class="rw-<?php 
echo ($odd = !$odd) ? 'odd' : 'even';
			<div class="has-sidebar-content">
				<div class="postbox rw-body">
					<h3><?php 
    _erw('categories-visibility-settings');
    ?>
</h3>

					<div class="inside rw-ui-content-container rw-no-radius">
						<select data-placeholder="Choose Categories..." multiple>
							<option value="-1" <?php 
    if ($all) {
        echo ' selected="selected"';
    }
    ?>
><?php 
    _erw('all-categories');
    ?>
</option>
							<?php 
    foreach ($all_categories as $category) {
        $selected = $all || in_array($category->cat_ID, rw_settings()->categories);
        ?>
								<option value="<?php 
        echo $category->cat_ID;
        ?>
" <?php 
        if ($selected) {
            echo ' selected="selected"';
        }
        ?>
><?php 
Exemplo n.º 10
0
echo rw_get_site_img_path('/wordpress/rich-snippets.png');
?>
"
		     alt="Google SERP with Rich-Snippets">

		<div class="disclaimer">
			<a class="trigger" href="#"
			   onclick="jQuery(this).parent().find('p').toggle(); return false;">[+] <?php 
_erw('disclaimer-uppercase');
?>
</a>

			<p style="display: none">
				<?php 
printf(__rw('rich-snippets_disclaimer'), sprintf('<a href="%s" target="_blank">%s</a>', 'http://www.google.com/webmasters/tools/richsnippets', __rw('rich-snippets_testing-tool')), '<b>' . __rw('rich-snippets_disclaimer-bold') . '</b>');
?>
			</p>
		</div>
		<div>
			<a style="display: block; text-align: center;" href="<?php 
echo rw_fs()->get_upgrade_url();
?>
"
			   onclick="_gaq.push(['_trackEvent', 'upgrade', 'wordpress', 'richsnippets_button', 1, true]); _gaq.push(['_link', this.href]); return false;"
			   class="button-secondary gradient rw-upgrade-button"><?php 
_erw('upgrade-to-pro');
?>
</a>
		</div>
	</div>
</div>
if ($settings->IsSaveMode()) {
    foreach ($views as $view) {
        $settings->{'show_on_' . $view} = isset($_POST['rw_show_on_' . $view]) ? true : false;
        ratingwidget()->SetOption('rw_show_on_' . $view, $settings->{'show_on_' . $view});
    }
} else {
    foreach ($views as $view) {
        $settings->{'show_on_' . $view} = false !== ratingwidget()->GetOption('rw_show_on_' . $view);
    }
}
?>
<div class="has-sidebar has-right-sidebar">
	<div class="has-sidebar-content">
		<div class="postbox rw-body">
			<h3><?php 
_erw('post-views-settings');
?>
</h3>

			<div class="inside rw-ui-content-container rw-no-radius">
				<?php 
foreach ($views as $view) {
    ?>
					<div class="rw-ui-img-radio rw-ui-hor<?php 
    if ($settings->{'show_on_' . $view}) {
        echo ' rw-selected';
    }
    ?>
">
						<input type="checkbox" name="rw_show_on_<?php 
    echo $view;
Exemplo n.º 12
0
</li>
			<li><?php 
_erw('upgrade_priority-email');
?>
</li>
			<li><?php 
_erw('upgrade_ssl');
?>
</li>
			<li><?php 
_erw('upgrade_secure-connection');
?>
</li>
			<li><?php 
_erw('upgrade_wpml');
?>
</li>
		</ul>
		<div id="rw_new_wp_subscribe">
			<a style="display: block; text-align: center;" href="<?php 
echo rw_fs()->get_upgrade_url();
?>
"
			   onclick="_gaq.push(['_trackEvent', 'upgrade', 'wordpress', 'gopro_button', 1, true]); _gaq.push(['_link', this.href]); return false;"
			   class="button-secondary gradient rw-upgrade-button"><?php 
_erw('learn-more');
?>
</a>
		</div>
	</div>
</div>
 * variable.
 */
// Import variables
extract($VARS);
?>
<div>
	<?php 
echo sprintf(__rw('rate-ask-message'), $min_votes_trigger);
?>
	<br/><br/>
	<strong><em>~ Vova Feldman</em></strong>
</div>
<ul data-nonce="<?php 
echo wp_create_nonce('rw_five_star_wp_rate_action_nonce');
?>
">
	<li><a data-rate-action="do-rate"
	       href="https://wordpress.org/support/view/plugin-reviews/rating-widget?rate=5#postform"><?php 
_erw('rate-ask_ok');
?>
</a>
	</li>
	<li><a data-rate-action="done-rating" href="#"><?php 
_erw('rate-ask_already-did');
?>
</a></li>
	<li><a data-rate-action="not-enough" href="#"><?php 
_erw('rate-ask_no');
?>
</a></li>
</ul>
Exemplo n.º 14
0
<td><span class="rw-ui-def"><?php 
_erw('language');
?>
:</span></td>
<td>
    <select id="rw_lng_select" tabindex="1" name="rw_language" style="font-size: 12px;" onchange="RWM.Set.language(this.value);">
        <?php 
$language_str = isset(rw_settings()->language_str) ? rw_settings()->language_str : 'en';
foreach (rw_settings()->languages as $short => $long) {
    echo '<option value="' . $short . '"' . ($short == $language_str ? ' selected="selected"' : '') . '>' . $long . '</option>';
}
?>
    </select>
</td>
Exemplo n.º 15
0
 ...</div>
			</div>
			<ul class="list-group"></ul>

			<!-- WHEN part of the operation -->
			<div>
						<span class="pull-right">
							<button class="button button-primary button-small edit-workflow edit-events"
							        data-toggle="tab" href="#edit-events"><?php 
_erw('edit');
?>
</button>
						</span>

				<div><?php 
_erw('when');
?>
 ...</div>
			</div>
			<ul class="list-group"></ul>
		</div>
	</div>
</div>

<!-- Single operation -->
<div class="workflow-template" data-class="operation">
	<i class="badge or"><?php 
strtolower(__rw('or'));
?>
</i>
Exemplo n.º 16
0
        <i class="rw-ui-holder"><i class="rw-ui-sprite rw-ui-unlocked rw-ui-default"></i></i>
        <span><?php 
_erw('active');
?>
</span>
        <input type="radio" name="rw-readonly" value="star"<?php 
if ($readOnly == false) {
    echo ' checked="checked"';
}
?>
 />
    </div>
    <div class="rw-ui-img-radio<?php 
if ($readOnly == true) {
    echo " rw-selected";
}
?>
" onclick="rwStar.setReadOnly(true); rwNero.setReadOnly(true);">
        <i class="rw-ui-holder"><i class="rw-ui-sprite rw-ui-locked"></i></i>
        <span><?php 
_erw('read-only');
?>
</span>
        <input type="radio" name="rw-readonly" value="nero"<?php 
if ($readOnly == true) {
    echo ' checked="checked"';
}
?>
 />
    </div>
</td>
Exemplo n.º 17
0
_erw('flash-dependency_disable-desc');
?>
</span>
									</div>
									<span
										style="font-size: 10px; background: white; padding: 2px; border: 1px solid gray; display: block; margin-top: 5px; font-weight: bold; background: rgb(240,240,240); color: black;">Flash dependency <b
											style="text-decoration: underline;">don't</b> means that if a user don't have a flash player installed on his browser then it will stuck. The reason to disable flash is for users which have flash blocking add-ons (e.g. FF Flashblock add-on), which is quite rare.</span>
								</div>
							</div>
						</div>
					</div>
					<div id="rw_mobile_settings" class="has-sidebar has-right-sidebar">
						<div class="has-sidebar-content">
							<div class="postbox rw-body">
								<h3><?php 
_erw('mobile-settings');
?>
</h3>

								<div class="inside rw-ui-content-container rw-no-radius"
								     style="padding: 5px; width: 610px;">
									<div class="rw-ui-img-radio rw-ui-hor<?php 
if ($settings->show_on_mobile) {
    echo ' rw-selected';
}
?>
">
										<i class="rw-ui-sprite rw-ui-mobile"></i> <input type="radio"
										                                                 name="rw_show_on_mobile"
										                                                 value="true" <?php 
if ($settings->show_on_mobile) {
Exemplo n.º 18
0
			};
		})(),
		Modal	  = (function() {
			var _modalHTML =
				'<div class="rw-wf-modal" aria-hidden="true">'
				+	'	<div class="rw-wf-modal-dialog">'
				+	'		<div class="rw-wf-modal-header">'
				+	'			<h2>{{modal.title}}</h2>'
				+	'			<a href="#close" class="rw-wf-button-close" aria-hidden="true">×</a>'
				+	'		</div>'
				+	'		<div class="rw-wf-modal-body">'
				+	'			{{modal.body}}'
				+	'		</div>'
				+	'		<div class="rw-wf-modal-footer">'
				+	'			<input type="button" href="#close" class="rw-wf-button-close rw-wf-button" value="<?php 
_erw('cancel');
?>
" />'
				+	'		</div>'
				+	'	</div>'
				+	'</div>',
				_init = function() {
					$( 'body' ).delegate( '.rw-wf-button-close', 'click', function() {
						$( this ).parents( '.rw-wf-modal:first' ).remove();
					});
				};
			
			_init();
			
			return {
				show: function( args ) {
Exemplo n.º 19
0
        public function form($instance)
        {
            $types = $this->GetTypesInfo();
            $orders = array('avgrate', 'votes', 'likes', 'created', 'updated');
            $orders_labels = array('Average Rate', 'Votes Number', 'Likes (for Thumbs)', 'Created', 'Updated');
            // Update default values.
            $values = array('title' => 'Top Rated', 'title_max_length' => 30);
            foreach ($types as $type => $info) {
                $values["show_{$type}"] = 'posts' === $type;
                $values["{$type}_count"] = WP_RW__TR_DEFAULT_ITEMS_COUNT;
                $values["{$type}_min_votes"] = WP_RW__TR_DEFAULT_MIN_VOTES;
                $values["{$type}_orderby"] = WP_RW__TR_DEFAULT_ORDERY_BY;
                $values["{$type}_order"] = WP_RW__TR_DEFAULT_ORDERY;
                $values["show_{$type}_title"] = 0;
                $values["{$type}_style"] = WP_RW__TR_DEFAULT_STYLE;
                $values["{$type}_since_created"] = WP_RW__TR_DEFAULT_SINCE_CREATED;
            }
            $instance = wp_parse_args((array) $instance, $values);
            $title = strip_tags($instance['title']);
            $titleMaxLength = (int) $instance['title_max_length'];
            foreach ($types as $type => $info) {
                if (isset($instance["show_{$type}"])) {
                    $values["show_{$type}"] = (int) $instance["show_{$type}"];
                }
                if (isset($instance["show_{$type}_title"])) {
                    $values["show_{$type}_title"] = (int) $instance["show_{$type}_title"];
                }
                if (isset($instance["{$type}_title"])) {
                    $values["{$type}_title"] = $instance["{$type}_title"];
                }
                if (isset($instance["{$type}_style"])) {
                    $values["{$type}_style"] = $instance["{$type}_style"];
                }
                if (isset($instance["{$type}_count"])) {
                    $values["{$type}_count"] = (int) $instance["{$type}_count"];
                }
                if (isset($instance["{$type}_min_votes"])) {
                    $values["{$type}_min_votes"] = max(1, (int) $instance["{$type}_min_votes"]);
                }
                if (isset($instance["{$type}_orderby"])) {
                    $values["{$type}_orderby"] = $instance["{$type}_orderby"];
                }
                if (isset($values["{$type}_orderby"]) && !in_array($values["{$type}_orderby"], $orders)) {
                    $values["{$type}_orderby"] = WP_RW__TR_DEFAULT_ORDERY_BY;
                }
                if (isset($values["{$type}_order"])) {
                    $values["{$type}_order"] = strtoupper($instance["{$type}_order"]);
                }
                if (isset($values["{$type}_order"]) && !in_array($values["{$type}_order"], array('DESC', 'ASC'))) {
                    $values["{$type}_order"] = WP_RW__TR_DEFAULT_ORDERY;
                }
                if (isset($instance["{$type}_since_created"])) {
                    $values["{$type}_since_created"] = (int) $instance["{$type}_since_created"];
                }
            }
            ?>
				<div id="rw_wp_top_rated_settings" class="new" style="margin-bottom: 15px;">
					<div class="rw-toprated-settings-section selected">
						<div class="rw-section-body">
							<p><label
									for="<?php 
            echo $this->get_field_id('title');
            ?>
"><?php 
            _erw('widget-title');
            ?>
									: <input id="<?php 
            echo $this->get_field_id('title');
            ?>
"
									         name="<?php 
            echo $this->get_field_name('title');
            ?>
" type="text"
									         value="<?php 
            echo esc_attr($title);
            ?>
"/></label></p>

							<p><label
									for="<?php 
            echo $this->get_field_id('title_max_length');
            ?>
"><?php 
            _erw('title-max-length');
            ?>
									: <input style="width: 110px;"
									         id="<?php 
            echo $this->get_field_id('title_max_length');
            ?>
"
									         name="<?php 
            echo $this->get_field_name('title_max_length');
            ?>
"
									         type="text"
									         value="<?php 
            echo esc_attr($titleMaxLength);
            ?>
"/></label></p>
						</div>
					</div>
					<?php 
            foreach ($types as $type => $info) {
                $typeTitle = ucwords(str_replace('_', ' ', $type));
                $checked = '';
                $selected = '';
                if ($values["show_{$type}"] == 1) {
                    $checked = ' checked="checked"';
                    $selected = ' selected';
                }
                ?>
							<div class="rw-toprated-settings-section<?php 
                echo $selected;
                ?>
">
								<h4>
									<label for="<?php 
                echo $this->get_field_id("show_{$type}");
                ?>
" title="On / Off">
										<input type="checkbox" class="checkbox"
										       id="<?php 
                echo $this->get_field_id("show_{$type}");
                ?>
"
										       name="<?php 
                echo $this->get_field_name("show_{$type}");
                ?>
"
										       value="1"<?php 
                echo $checked;
                ?>
 />
										<?php 
                echo $typeTitle;
                ?>
									</label>
								</h4>

								<div class="rw-section-body">
									<?php 
                if (isset($info['has_thumbnails']) && true === $info['has_thumbnails']) {
                    ?>
										<?php 
                    $styles = array('legacy' => 'Titles (Legacy)', 'thumbs' => 'Thumbs (160px X 100px) + Titles', 'compact_thumbs' => 'Compact Thumbs (50px X 40px) + Titles');
                    ?>
										<p>
											<select id="<?php 
                    echo $this->get_field_id('style');
                    ?>
"
											        name="<?php 
                    echo $this->get_field_name("{$type}_style");
                    ?>
"
											        style="font-size: 11px;">
												<?php 
                    $i = 0;
                    ?>
												<?php 
                    foreach ($styles as $key => $val) {
                        ?>
													<option
														value="<?php 
                        echo $key;
                        ?>
"<?php 
                        if ($key == $values["{$type}_style"] || $i === $values["{$type}_style"]) {
                            echo ' selected="selected"';
                        }
                        ?>
><?php 
                        echo $val;
                        ?>
</option>
													<?php 
                        $i++;
                        ?>
												<?php 
                    }
                    ?>
											</select>
										</p>
									<?php 
                }
                ?>
									<?php 
                ?>
									<p class="rw-toprated-title">
										<?php 
                $disabled = ' disabled="disabled"';
                $checked = '';
                if ($values["show_{$type}_title"] == 1) {
                    $checked = ' checked="checked"';
                    $disabled = '';
                }
                ?>
										<label class="rw-enabler"
										       for="<?php 
                echo $this->get_field_id("show_{$type}_title");
                ?>
">
											<input type="checkbox" title="Show Title" class="checkbox"
											       id="<?php 
                echo $this->get_field_id("show_{$type}_title");
                ?>
"
											       name="<?php 
                echo $this->get_field_name("show_{$type}_title");
                ?>
"
											       value="1"<?php 
                echo $checked;
                ?>
 />
											<?php 
                $values["{$type}_title"] = empty($values["{$type}_title"]) ? $typeTitle : $values["{$type}_title"];
                ?>
											<?php 
                _erw('title');
                ?>
:
										</label>
										<input
											id="<?php 
                echo $this->get_field_id('title');
                ?>
"<?php 
                echo $disabled;
                ?>
											name="<?php 
                echo $this->get_field_name("{$type}_title");
                ?>
" type="text"
											value="<?php 
                echo esc_attr($values["{$type}_title"]);
                ?>
"
											style="width: 120px;"/>
									</p>

									<p>
										<label
											for="rss-items-<?php 
                echo $values["{$type}_count"];
                ?>
"><?php 
                _erw('max-items');
                ?>
											:
											<select id="<?php 
                echo $this->get_field_id("{$type}_count");
                ?>
"
											        name="<?php 
                echo $this->get_field_name("{$type}_count");
                ?>
">
												<?php 
                for ($i = 1; $i <= 25; $i++) {
                    echo "<option value='{$i}' " . ($values["{$type}_count"] == $i ? 'selected=\'selected\'' : '') . ">{$i}</option>";
                }
                ?>
											</select>
										</label>
									</p>

									<p>
										<label
											for="<?php 
                echo $this->get_field_id("{$type}_min_votes");
                ?>
"><?php 
                _erw('min-votes');
                ?>
											(>= 1):
											<input style="width: 40px; text-align: center;"
											       id="<?php 
                echo $this->get_field_id("{$type}_min_votes");
                ?>
"
											       name="<?php 
                echo $this->get_field_name("{$type}_min_votes");
                ?>
"
											       type="text"
											       value="<?php 
                echo esc_attr($values["{$type}_min_votes"]);
                ?>
"/>
										</label>
									</p>

									<p>
										<label
											for="rss-items-<?php 
                echo $values["{$type}_orderby"];
                ?>
"><?php 
                _erw('orderby');
                ?>
											:
											<select id="<?php 
                echo $this->get_field_id("{$type}_orderby");
                ?>
"
											        name="<?php 
                echo $this->get_field_name("{$type}_orderby");
                ?>
">
												<?php 
                for ($i = 0, $len = count($orders); $i < $len; $i++) {
                    echo '<option value="' . $orders[$i] . '"' . ($values["{$type}_orderby"] == $orders[$i] ? 'selected=\'selected\'' : '') . '>' . $orders_labels[$i] . '</option>';
                }
                ?>
											</select>
										</label>
									</p>

									<p>
										<label
											for="rss-items-<?php 
                echo $values["{$type}_order"];
                ?>
"><?php 
                _erw('order');
                ?>
											:
											<select id="<?php 
                echo $this->get_field_id("{$type}_order");
                ?>
"
											        name="<?php 
                echo $this->get_field_name("{$type}_order");
                ?>
">
												<option
													value="DESC"<?php 
                echo $values["{$type}_order"] == 'DESC' ? ' selected=\'selected\'' : '';
                ?>
>
													<?php 
                _erw('best');
                ?>
 (<?php 
                _erw('descending');
                ?>
)
												</option>
												<option
													value="ASC"<?php 
                echo $values["{$type}_order"] == 'ASC' ? ' selected=\'selected\'' : '';
                ?>
>
													<?php 
                _erw('worst');
                ?>
 (<?php 
                _erw('ascending');
                ?>
)
												</option>
											</select>
										</label>
									</p>

									<?php 
                $since_created_options = array(WP_RW__TIME_ALL_TIME => __rw('all-time', WP_RW__ID), WP_RW__TIME_YEAR_IN_SEC => __rw('last-year', WP_RW__ID), WP_RW__TIME_6_MONTHS_IN_SEC => sprintf(__rw('last-x-months'), 6), WP_RW__TIME_30_DAYS_IN_SEC => sprintf(__rw('last-x-days'), 30), WP_RW__TIME_WEEK_IN_SEC => sprintf(__rw('last-x-days'), 7), WP_RW__TIME_24_HOURS_IN_SEC => sprintf(__rw('last-x-hours'), 24));
                ?>
									<p>
										<label
											for="rss-items-<?php 
                echo $values["{$type}_since_created"];
                ?>
"><?php 
                printf(__rw('s-created-in'), $typeTitle);
                ?>
											<select id="<?php 
                echo $this->get_field_id("{$type}_since_created");
                ?>
"
											        name="<?php 
                echo $this->get_field_name("{$type}_since_created");
                ?>
">
												<?php 
                foreach ($since_created_options as $since_created => $display_text) {
                    ?>
														<option
															value="<?php 
                    echo $since_created;
                    ?>
" <?php 
                    selected($values["{$type}_since_created"], $since_created);
                    ?>
><?php 
                    echo $display_text;
                    ?>
</option>
													<?php 
                }
                ?>
											</select>
										</label>
									</p>
								</div>
							</div>
						<?php 
            }
            ?>
				</div>
			<?php 
        }
Exemplo n.º 20
0
						<div id="rw_advanced_star_tab"<?php 
if (rw_options()->type === "nero") {
    echo ' style="display: none;"';
}
?>
><?php 
_erw('star');
?>
						</div>
						<div id="rw_advanced_nero_tab"<?php 
if (rw_options()->type === "star") {
    echo ' style="display: none;"';
}
?>
><?php 
_erw('thumbs');
?>
						</div>
					</div>
					<div id="rw_advanced_settings_body" class="rw-clearfix">
						<?php 
require_once dirname(__FILE__) . "/advanced/font.php";
?>
						<?php 
require_once dirname(__FILE__) . "/advanced/layout.php";
?>
						<?php 
require_once dirname(__FILE__) . "/advanced/text.php";
?>
						<?php 
require_once dirname(__FILE__) . "/advanced/star.php";
Exemplo n.º 21
0
<?php

$container = rw_options()->advanced->css->container;
?>
<td class="rw-ui-def-width">
	<span class="rw-ui-def"><?php 
_erw('background');
?>
:</span>
</td>
<td>
	<div class="rw-ui-img-radio<?php 
if ($container !== '') {
    echo ' rw-selected';
}
?>
" onclick="RWM.Set.background('buddy');">
		<i class="rw-ui-holder"><i class="rw-ui-sprite rw-ui-buddy"></i></i>
		<span>Buddy</span>
		<input type="radio" name="rw-background" value="buddypress"<?php 
if ($container !== '') {
    echo ' checked="checked"';
}
?>
 />
	</div>
	<div class="rw-ui-img-radio<?php 
if ($container === '') {
    echo ' rw-selected';
}
?>
Exemplo n.º 22
0
<?php

$types = ucwords(str_replace('-', ' ', rw_settings_rating_type()));
$type = substr($types, 0, strlen($types) - 1);
$availability = rw_settings()->availability;
?>
<div id="rw_availability_settings" class="has-sidebar has-right-sidebar">
	<div class="has-sidebar-content">
		<div class="postbox rw-body">
			<h3><?php 
_erw('user-availability-settings');
?>
</h3>

			<div class="inside rw-ui-content-container rw-no-radius">
				<div class="rw-ui-img-radio rw-ui-hor<?php 
if ($availability == 0) {
    echo ' rw-selected';
}
?>
">
					<i class="rw-ui-sprite rw-ui-availability-active"></i> <input type="radio" name="rw_availability"
					                                                              value="0" <?php 
checked($availability, 0);
?>
>
					<span><?php 
printf(__rw('user-availability-settings_all'), $types);
?>
</span>
				</div>
Exemplo n.º 23
0
?>
</b></li>
								<li><?php 
_erw('upgrade_priority-email');
?>
</li>
								<li><?php 
_erw('upgrade_ssl');
?>
</li>
								<li><?php 
_erw('upgrade_secure-connection');
?>
</li>
								<li><?php 
_erw('upgrade_wpml');
?>
</li>
							</ul>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
	<br/>
	<img src="<?php 
echo WP_RW__ADDRESS_IMG . 'wordpress/rw.report.example.png';
?>
" alt="">
</div>
Exemplo n.º 24
0
</h3>

	<div class="inside update-nag" style="margin: 0; border: 0;">
		<p class="submit" style="margin: 0; padding: 10px;">
			<input type="hidden" name="<?php 
echo rw_settings()->form_hidden_field_name;
?>
" value="Y">
			<input type="hidden" id="rw_options_hidden" name="rw_options" value=""/>
			<input type="submit" name="Submit" class="button-primary" value="<?php 
_erw('save-changes');
?>
"/>
			<?php 
if (rw_fs()->is_not_paying()) {
    ?>
				<a href="<?php 
    echo rw_fs()->get_upgrade_url();
    ?>
"
				   onclick="_gaq.push(['_trackEvent', 'upgrade', 'wordpress', 'gopro_button', 1, true]); _gaq.push(['_link', this.href]); return false;"
				   class="button-secondary gradient rw-upgrade-button"><?php 
    _erw('upgrade-now');
    ?>
</a>
			<?php 
}
?>
		</p>
	</div>
</div>
Exemplo n.º 25
0
			</tr>
		<?php 
}
?>
</table>
<label for="rw_include_post"><input type="checkbox" name="rw_include_post" id="rw_include_post"
                                    value="1"<?php 
checked(false, $excluded_post);
?>
 /><?php 
_erw('show');
?>
	(<?php 
_erw('uncheck-to-hide');
?>
)
</label>
<br>
<label for="rw_readonly_post"><input type="checkbox" name="rw_readonly_post" id="rw_readonly_post"
                                     value="1"<?php 
checked(false, $readonly_post);
?>
 /><?php 
_erw('active');
?>
 (<?php 
_erw('uncheck-to-readonly');
?>
)
</label>
</p>
        echo $p['id'];
        ?>
]').val(val); return true;">
									<input type="hidden" name="rw_action" value="update_<?php 
        echo $p['id'];
        ?>
">
									<input type="hidden" name="rw_<?php 
        echo $p['id'];
        ?>
" value="">
									<?php 
        wp_nonce_field('update_' . $p['id']);
        ?>
									<input type="submit" class="button button-small" value="<?php 
        _erw('edit');
        ?>
">
								</form>
							</td>
						<?php 
    }
    ?>
					</tr>
					<?php 
    $odd = !$odd;
}
?>
		</table>
	</div>
</div>
}
?>
>
					<span><?php 
_erw('reputational-rating_desc');
?>
</span>
				</div>
				<div class="rw-ui-img-radio rw-ui-hor<?php 
if (!$is_accumulated) {
    echo ' rw-selected';
}
?>
">
					<i class="rw-ui-sprite"></i> <input type="radio" name="rw_accumulated_user_rating"
					                                    value="false" <?php 
if (!$is_accumulated) {
    echo ' checked="checked"';
}
?>
>
					<span><?php 
_erw('standard-rating_desc');
?>
</span>
				</div>
			</div>
		</div>
	</div>
</div>
Exemplo n.º 28
0
				</tr>
				<tr>
					<td colspan='2'>
						<div
							id="rw-toprated-note"><?php 
_erw('add-table_shortcode-desc');
?>
</div>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div class="mceActionPanel">
		<input type="submit" id="rw-toprated-insert-shortcode" value="<?php 
_erw('add-table');
?>
"/>
	</div>
</form>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="<?php 
echo includes_url('js/tinymce/tiny_mce_popup.js');
?>
"></script>
<script type="text/javascript">
	(function ($) {
		// Helper function for initializing the values of an <option> element
		function updateDialogField($dialogField, values, defaultValue) {
			for (var property in values) {
				if (!values.hasOwnProperty(property)) {
Exemplo n.º 29
0
"/>
	<?php 
if ($rw_fs->is_not_paying()) {
    ?>
		<a href="<?php 
    echo $rw_fs->get_upgrade_url();
    ?>
"
		   onclick="_gaq.push(['_trackEvent', 'upgrade', 'wordpress', 'gopro_button', 1, true]); _gaq.push(['_link', this.href]); return false;"
		   class="button-secondary gradient rw-upgrade-button"
		   style="float: right;"><?php 
    _erw('upgrade-now');
    ?>
</a>
	<?php 
}
?>
	<span style="margin: 0 10px; font-size: 1em; float: right; line-height: 30px;"><b
			style="font-size: 24px;vertical-align: top;color: #999;">&#9829;</b> <?php 
_erw('preview-rate-ask');
?>
		<a href="http://wordpress.org/support/view/plugin-reviews/rating-widget?rate=5#postform" target="_blank" style="
    font-weight: bold;
"><?php 
_erw('preview-rate-ask_title');
?>
</a></span>
</div>
</div>
</div>
Exemplo n.º 30
0
			</div>
			<input type="hidden" id="wp-version" value="<?php 
echo $wp_version;
?>
"
		</form>
		<script>
			(function ($) {
				$(document).ready(function () {
					var wpVersion = parseFloat($("#wp-version").val(), 10);

					var $popupDialog = $("#rw-addons-popup-dialog");

					var dialogOptions = {
						title        : '<?php 
_erw('oops');
?>
...',
						dialogClass  : wpVersion > 3 ? 'wp-dialog' : 'wp-custom-dialog',
						modal        : true,
						autoOpen     : false,
						closeOnEscape: true,
						width        : 430,
						buttons      : {
							// Add button labels in this way so that it will work with WordPress 3.0 and below
							<?php 
echo json_encode(__rw('addons_add-to-waiting-list'));
?>
: function () {
								$('.addons-page-notice').show();
								sendData({addon_action: $popupDialog.find('.addon-action').val(), add_user: true});