• Resolved Antivirus

    (@evilsmoney)


    Hi Lester,
    I try to display the comment author rating by uncomment the line:
    add_filter(‘comment_text’, ‘comment_author_ratings_filter’);
    at wp-content/plugins/wp-postratings/wp-postratings.php
    But as a result I have shown the same text: someusername + did not rate this post.
    Please help me!

    https://ww.wp.xz.cn/plugins/wp-postratings/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Lester Chan

    (@gamerz)

    It works fine for me https://lesterchan.net/wordpress/2013/08/02/wordpress-3-6/comment-page-1/#comment-51755

    Maybe you are using a plugin that conflicts it?

    Thread Starter Antivirus

    (@evilsmoney)

    Hm… In your link all works good!
    Here is a list of plugins that are active on my site:
    – Advanced Custom Fields
    – CloudFlare
    – Redirection
    – RusToLat
    – Wordfence Security
    – WP-PostRatings
    – WP-PostViews
    – Yoast SEO
    Are there any known conflicts with these plug-ins?
    I tried to turn them off one by one, but the positive effect I have not received.
    In which way can still see?
    Link to my page: http://termosnab.net/catalog/pvc-curtains/pvx-zavesy-dlya-sklada

    Thread Starter Antivirus

    (@evilsmoney)

    I can give you access.

    Plugin Author Lester Chan

    (@gamerz)

    Sorry, if I can’t reproduce the problem on my end I don’t help others to debug since this plugin is already provided for free.

    Deactivate all expect PostRatings and switch to the default theme

    Thread Starter Antivirus

    (@evilsmoney)

    Thank you! I’ll try to do it and then write the results.

    Thread Starter Antivirus

    (@evilsmoney)

    Why you mark this topic as resolved?
    Disable all plug-ins did not help. What can I do more?

    Thread Starter Antivirus

    (@evilsmoney)

    Reinstalling the plugin also does not help.

    Here is an example page which is not displayed comment author rating http://termosnab.net/catalog/pvc-curtains/pvx-zavesy-dlya-sklada

    Plugin Author Lester Chan

    (@gamerz)

    When I answer the questions, I always like to mark it as resolved because 50% of the time, I did not get a reply back. Anyway it doesn’t matter, whether it is resolved or not, doesn’t really bother me or affect anything.

    I am seeing it “EvilsMoney did not rate this post.” when I post a comment, I also see “Lester Chan did not rate this post.” which is correct because there is no ratings for me to rate on the post.

    As the name of the plugin suggest, it is POST ratings, so it only allows you to rate the post. To insert the rating code please refer to https://ww.wp.xz.cn/plugins/wp-postratings/installation/.

    We need to be on the same page, this DOES NOT insert ratings into the comments. It just merely shows who rated the post from the comment author.

    Thread Starter Antivirus

    (@evilsmoney)

    I do not know why, but managed to make a few comments with rating. Only a few. All other again displayed without rating. Rating suffered from a form of code comments in the page itself.

    Thread Starter Antivirus

    (@evilsmoney)

    Most likely the problem lies somewhere inside my theme. Since rating standard 13th relating works.
    Can you tell in which direction you need to look in more detail?

    Thread Starter Antivirus

    (@evilsmoney)

    Also loader image displaying befor i click at rating.
    Maybe you can look at code of my page?

    <?php get_header(); ?>
    
    <main class="page" role="main">
    
    <?php get_sidebar(); ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="good" id="good-<?php the_ID(); ?>">
    	<?php if (function_exists('dimox_breadcrumbs')) dimox_breadcrumbs(); ?>
    
        <section <?php post_class(); ?>>
        	<div class="good-entry">
            	<div class="thumb">
    				<?php echo('<script> $(document).ready(function(){ $(".gallery-'.$post->ID.'").colorbox({rel:\'gallery-'.$post->ID.'\', scalePhotos:"true", maxHeight:"90%"}); }); </script>');
    				if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { $thumbfull = wp_get_attachment_image_src(get_post_thumbnail_id(), full); echo('<a href="'.$thumbfull[0].'" title="'.$post->post_title.'" class="gallery-'.$post->ID.' good-thumb">'); the_post_thumbnail(array( 270,203 ), array( 'class' => 'good-img', 'alt' => trim(strip_tags( $post->post_title )), 'title' => trim(strip_tags( $post->post_title )), )); echo('</a>'); } ?>
    
                    <div class="gallery">
    				<?php
                        $images = get_posts(
                                array(
                                    'numberposts' => -1, //лимит картинок... -1 значит все
                                    'post_type' => 'attachment',
                                    'post_mime_type'  => 'image', // image, video, video/mp4
                                    'post_parent' => $post->ID,
                                    'orderby' => 'menu_order',
                                    'order' => 'ASC',
                                    'exclude' => get_post_thumbnail_id($post->ID)
                                )
                            );
    
                            if ( count( $images ) > 0 ) {
                                foreach ( $images as $image ) {
    								setup_postdata($image);
                                    $src = wp_get_attachment_image_src($image->ID, full);
                                    $img = wp_get_attachment_image( $image->ID, array(175,131));
    
                                    $title = $image->post_title; // заголовок изображения
                                    $caption = $image->post_excerpt; // подпись к изображению
                                    $description = $image->post_content; // описание изображения
    
                                    echo '<a href="'.$src[0].'" title="'.$title.'" class="gallery-'.$post->ID.'">'.$img.'</a>';
                                }
    						}
    				?>
                    </div>
                </div>
                <div class="description">
                	<?php $good_title = get_field('good-title'); if ($good_title) { echo('<h1>'.$good_title.'</h1>'); } else { echo('<h1>'.the_title().'</h1>'); } ?>
    
                	<?php $good_entry = get_field('good-entry'); if ($good_entry) { echo($good_entry); } ?>
    
                    <?php $good_price = floatval(get_field('good-price')); if ($good_price) { ?>
                    <div>от<span> <?php price_in_grivna($good_price); ?> </span>грн<?php echo('<span class="price-euro">&nbsp; / &nbsp;'.$good_price.' &euro;</span>'); ?></div>
                    <?php } ?>
                </div>
            </div>
    
            <div>
    			<?php the_content(); ?>
                <div><?php if(function_exists('the_ratings')) { the_ratings(); } ?></div>
    			<?php comments_template(); ?>
            </div>
    	</section>
    
    	<?php endwhile; else: ?>
    
    <div class="good" id="good-nomatch">
    	<?php if (function_exists('dimox_breadcrumbs')) dimox_breadcrumbs(); ?>
    	<p>Извините, но нет страниц для отображения согласно вашим критериям.</p>
    </div>
    <?php endif; ?>
    
    <?php get_footer(); ?>

    Thread Starter Antivirus

    (@evilsmoney)

    As far as I understand, the main problem in the proper discharge of the request – wp_reset_postdata ();

    Plugin Author Lester Chan

    (@gamerz)

    Sorry you have to solve it yourself because clearly it has nothing to do with the plugin issue since it works fine.

    As mentioned earlier, I don’t provide support for integration with other code/theme since this plugin is already provided for free.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Comment Author Ratings does not work’ is closed to new replies.