Example #1
0
				rw.src = "<?php 
echo rw_get_js_url('external.php');
?>
?wp=<?php 
echo WP_RW__VERSION;
?>
";
				var s = document.getElementsByTagName("script")[0];
				s.parentNode.insertBefore(rw, s);
			})();
		}
	</script>
</div>
<div class="submit" style="margin-top: 10px; padding: 0;">
	<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 
echo esc_attr(__rw('save-changes'));
?>
"/>
	<?php 
if ($rw_fs->is_not_paying()) {
    ?>
		<a href="<?php 
    echo $rw_fs->get_upgrade_url();
    ?>
"
Example #2
0
<?php

$settings = rw_settings();
?>
<div class="wrap rw-dir-ltr">
    <form id="rw_advanced_settings_form" method="post" action="">
        <div id="poststuff">
            <div id="rw_wp_set">
                <div id="rw_identify_by" class="has-sidebar has-right-sidebar">
                    <div class="has-sidebar-content">
                        <div class="postbox rw-body">
                            <h3><?php 
_e('Visitor Identification Method', WP_RW__ID);
?>
</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 ('laccount' === $settings->identify_by) {
    echo ' rw-selected';
}
?>
">
                                    <input type="radio" name="rw_identify_by" value="laccount" <?php 
if ('laccount' === $settings->identify_by) {
    echo ' checked="checked"';
}
?>
> <span><?php 
_e('Identify visitor by Cookie / Device.', WP_RW__ID);
?>
</span>
<?php

$bbpress_support = ratingwidget()->IsBBPressInstalled();
$is_accumulated = $bbpress_support ? rw_settings()->is_user_accumulated : false;
?>
<div id="rw_user_rating_type_settings" class="has-sidebar has-right-sidebar">
	<div class="has-sidebar-content">
		<div class="postbox rw-body">
			<h3><?php 
_erw('rating-type');
?>
</h3>

			<div class="inside rw-ui-content-container rw-no-radius">
				<div class="rw-ui-img-radio rw-ui-hor<?php 
if ($is_accumulated) {
    echo ' rw-selected';
}
?>
"<?php 
if (!$bbpress_support) {
    echo ' data-alert="' . __rw('reputational-rating_pro-only-alert') . '"';
}
?>
>
					<i class="rw-ui-sprite"></i> <input type="radio" name="rw_accumulated_user_rating"
					                                    value="true" <?php 
if ($is_accumulated) {
    echo ' checked="checked"';
}
?>
<?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 
_e('User Availability Settings', WP_RW__ID);
?>
</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>Show active <?php 
echo $types;
?>
 ratings for all users.</span>
                </div>
                <div class="rw-ui-img-radio rw-ui-hor<?php 
if ($availability == 1) {
    echo ' rw-selected';
<?php

$types = ucwords(str_replace('-', ' ', rw_settings_rating_type()));
$type = substr($types, 0, strlen($types) - 1);
function implode_or_empty($array)
{
    if (is_string($array)) {
        return $array;
    }
    if (!is_array($array)) {
        return '';
    }
    return implode(',', $array);
}
$visibility = rw_settings()->visibility;
?>
<div id="rw_visibiliy_settings" class="has-sidebar has-right-sidebar">
	<div class="has-sidebar-content">
		<div class="postbox rw-body">
			<h3><?php 
_erw('visibility_title');
?>
</h3>

			<div class="inside rw-ui-content-container rw-no-radius">
				<div class="rw-ui-img-radio rw-ui-hor<?php 
if ($visibility->selected == 0) {
    echo ' rw-selected';
}
?>
">
Example #6
0
<?php

wp_enqueue_script('ace', WP_RW__PLUGIN_URL . 'resources/js/ace/ace.js');
$custom_settings = rw_settings()->custom_settings;
$custom_settings_enabled = rw_settings()->custom_settings_enabled;
?>
<style>
	#rw_power_options label {
		font-size: 13px;
		font-weight: bold;
		display: block;
		margin: 5px;
	}
</style>
<div id="rw_power_options" class="has-sidebar has-right-sidebar">
    <div class="has-sidebar-content">
        <div class="postbox rw-body">
            <h3><?php 
_e('Power User Settings', WP_RW__ID);
?>
</h3>
            <div class="inside rw-ui-content-container rw-no-radius">
                <label><input id="rw_custom_settings_enabled" name="rw_custom_settings_enabled" type="checkbox" value="1"<?php 
if ($custom_settings_enabled) {
    echo ' checked="checked"';
}
?>
 /> Activate / In-Activate</label>
                <p>Here you can customize the ratings according to our <a href="<?php 
rw_the_site_url('documentation');
?>
</option>
							<?php 
    }
    ?>
						</select>

						<div style="display: none">
							<input type="checkbox" name="rw_categories[]" value="-1" <?php 
    if ($all) {
        echo ' checked="checked"';
    }
    ?>
>
							<?php 
    foreach ($all_categories as $category) {
        $selected = $all || in_array($category->cat_ID, rw_settings()->categories);
        ?>
								<input type="checkbox" name="rw_categories[]"
								       value="<?php 
        echo $category->cat_ID;
        ?>
" <?php 
        if ($selected) {
            echo ' checked="checked"';
        }
        ?>
>
							<?php 
    }
    ?>
						</div>
 function rw_options()
 {
     return rw_settings()->options;
 }
Example #9
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>
<?php

/**
 * Comment Ratings Mode view file called by ratingwidget()->SettingsPage() method.
 *
 * Generates the HTML content for the Comment Ratings Mode section in WP admin dashboard > RatingWidget > Settings
 * > Comments tab.
 */
$comment_ratings_mode = rw_settings()->comment_ratings_mode;
?>
<div id="rw_comment_rating_mode_settings" class="has-sidebar has-right-sidebar">
	<div class="has-sidebar-content">
		<div class="postbox rw-body">
			<h3><?php 
_erw('comment-ratings-mode');
?>
</h3>

			<div class="inside rw-ui-content-container rw-no-radius">
				<div class="rw-ui-img-radio rw-ui-hor<?php 
if ('false' === $comment_ratings_mode) {
    echo ' rw-selected';
}
?>
">
					<i class="rw-ui-sprite"></i> <input type="radio" name="rw_comment_review_mode"
					                                    value="false" <?php 
checked('false', $comment_ratings_mode);
?>
>
					<span><?php