Ejemplo n.º 1
0
function rcl_user_rayting()
{
    global $rcl_user, $rcl_users_set;
    if (!function_exists('rcl_get_rating_block')) {
        return false;
    }
    if (false !== array_search('rating_total', $rcl_users_set->data) || isset($rcl_user->rating_total)) {
        if (!isset($rcl_user->rating_total)) {
            $rcl_user->rating_total = 0;
        }
        echo rcl_rating_block(array('value' => $rcl_user->rating_total));
    }
}
<?php

global $rating;
?>
<div class="user-single">
    <div class="thumb-user">
        <a title="<?php 
echo get_the_author_meta('display_name', $rating->user_id);
?>
" href="<?php 
echo get_author_posts_url($rating->user_id);
?>
">
            <?php 
echo get_avatar($rating->user_id, 70);
?>
        </a>
        <?php 
echo rcl_rating_block(array('value' => $rating->rating_total));
?>
    </div>
</div>
Ejemplo n.º 3
0
				<td width="50"><?php 
        echo mysql2date('d.m.y', $post->post_date);
        ?>
</td>

				<td>

				<?php 
        echo $post->post_status == 'trash' ? $post->post_title : '<a target="_blank" href="' . $post->guid . '">' . $post->post_title . '</a>';
        ?>

				<?php 
        if (function_exists('rcl_format_rating')) {
            $rtng = isset($ratings[$post->ID]) ? $ratings[$post->ID] : 0;
            echo rcl_rating_block(array('value' => $rtng));
        }
        ?>
				<?php 
        $content = '';
        echo apply_filters('content_postslist', $content);
        ?>

				</td>
				<td><?php 
        echo $status;
        ?>
</td>

			</tr>
		<?php 
Ejemplo n.º 4
0
function rcl_get_authorize_form($type = false, $form = false)
{
    global $user_ID, $rcl_user_URL, $rcl_options, $typeform;
    $typeform = $form;
    ob_start();
    echo '<div class="panel_lk_recall ' . $type . '">';
    if ($type == 'floatform') {
        echo '<a href="#" class="close-popup"><i class="fa fa-times-circle"></i></a>';
    }
    if ($user_ID) {
        echo '<div class="username"><b>' . __('Hi', 'wp-recall') . ', ' . get_the_author_meta('display_name', $user_ID) . '!</b></div>
                    <div class="author-avatar">';
        echo '<a href="' . $rcl_user_URL . '" title="' . __('In personal account', 'wp-recall') . '">' . get_avatar($user_ID, 60) . '</a>';
        if (function_exists('rcl_rating_block')) {
            echo rcl_rating_block(array('ID' => $user_ID, 'type' => 'user'));
        }
        echo '</div>';
        echo '<div class="buttons">';
        $buttons = '<p>' . rcl_get_button(__('In personal account', 'wp-recall'), $rcl_user_URL, array('icon' => 'fa-home')) . '</p>
                            <p>' . rcl_get_button(__('Exit', 'wp-recall'), wp_logout_url(home_url()), array('icon' => 'fa-external-link')) . '</p>';
        echo apply_filters('buttons_widget_rcl', $buttons);
        echo '</div>';
    } else {
        $login_form = isset($rcl_options['login_form_recall']) ? $rcl_options['login_form_recall'] : 0;
        if ($login_form == 1 && $type != 'pageform') {
            $redirect_url = rcl_format_url(get_permalink($rcl_options['page_login_form_recall']));
            echo '<div class="buttons">';
            $buttons = '<p>' . rcl_get_button(__('Entry', 'wp-recall'), $redirect_url . 'action-rcl=login', array('icon' => 'fa-sign-in')) . '</p>
                            <p>' . rcl_get_button(__('Registration', 'wp-recall'), $redirect_url . 'action-rcl=register', array('icon' => 'fa-book')) . '</p>';
            echo apply_filters('buttons_widget_rcl', $buttons);
            echo '</div>';
        } else {
            if ($login_form == 2) {
                echo '<div class="buttons">';
                $buttons = '<p>' . rcl_get_button(__('Entry', 'wp-recall'), esc_url(wp_login_url('/')), array('icon' => 'fa-sign-in')) . '</p>
                            <p>' . rcl_get_button(__('Registration', 'wp-recall'), esc_url(wp_registration_url()), array('icon' => 'fa-book')) . '</p>';
                echo apply_filters('buttons_widget_rcl', $buttons);
                echo '</div>';
            } else {
                if ($login_form == 3 || $type) {
                    if ($typeform != 'register') {
                        rcl_include_template('form-sign.php');
                    }
                    if ($typeform != 'sign') {
                        rcl_include_template('form-register.php');
                    }
                    if (!$typeform || $typeform == 'sign') {
                        rcl_include_template('form-remember.php');
                    }
                } else {
                    if (!$login_form) {
                        echo '<div class="buttons">';
                        $buttons = '<p>' . rcl_get_button(__('Entry', 'wp-recall'), '#', array('icon' => 'fa-sign-in', 'class' => 'rcl-login')) . '</p>
                                <p>' . rcl_get_button(__('Registration', 'wp-recall'), '#', array('icon' => 'fa-book', 'class' => 'rcl-register')) . '</p>';
                        echo apply_filters('buttons_widget_rcl', $buttons);
                        echo '</div>';
                    }
                }
            }
        }
    }
    echo '</div>';
    $html = ob_get_contents();
    ob_end_clean();
    return $html;
}
Ejemplo n.º 5
0
function rcl_add_counter_rating($tab)
{
    global $user_LK;
    if ($tab['id'] != 'rating') {
        return $tab;
    }
    $cnt = rcl_rating_block(array('value' => rcl_get_user_rating($user_LK)));
    $tab['name'] .= ': ' . $cnt;
    return $tab;
}