Viewing 15 replies - 16 through 30 (of 36 total)
  • Thread Starter Slideit

    (@slideit)

    Ok I did all you said ??
    Still getting the error.
    Parse error: syntax error, unexpected T_FOR in C:\Wamp\www\wordpress\wp-content\themes\Savarona\single.php on line 23

    Could it be the theme?
    Sorry Rahul. I don’t have Skype.

    Thread Starter Slideit

    (@slideit)

    Rahul I just took the line

    <?php if(function_exists(‘like_counter_p’)) { like_counter_p(“text for like”); } ?>

    out and I’m not getting the error now, but it’s not counting. It shows the thumbs up with (0), so it’s kind of working. ??
    Thanks

    Thread Starter Slideit

    (@slideit)

    <?php if(function_exists(‘like_counter_p’)) { like_counter_p(“text for like”); } ?>

    That’s the line. I put it back in and getting the error again.
    Thanks

    Plugin Author rahulbrilliant2004

    (@rahulbrilliant2004)

    Hi

    I got the issue. You have to put it before the end while. Can you please try it there please.

    Thanks

    Thread Starter Slideit

    (@slideit)

    Parse error: syntax error, unexpected ‘<‘ in C:\Wamp\www\wordpress\wp-content\themes\Savarona\single.php on line 17

    Mine

    <?php
    if (have_posts()) : while (have_posts()) : the_post();
    /**
    * Find the post formatting for the single post (full post view) in the post-single.php file
    */
    get_template_part(‘post’, ‘single’);
    <?php if(function_exists(‘like_counter_p’)) { like_counter_p(“text for like”); } ?>
    endwhile;

    else :
    get_template_part(‘post’, ‘noresults’);
    endif;
    ?>
    <?php if(function_exists(‘dislike_counter_c’)) { dislike_counter_c(“”); } ?>

    <?php $theme->hook(‘content_after’); ?>

    Looking at the db. There is nothing there either for the p_like. Should there be?
    Thanks

    Plugin Author rahulbrilliant2004

    (@rahulbrilliant2004)

    Hi

    Please use this. Since its already in php you dont need to use the php tags there.

    <?php
    if (have_posts()) : while (have_posts()) : the_post();
    /**
    * Find the post formatting for the single post (full post view) in the post-single.php file
    */
    get_template_part('post', 'single');
    if(function_exists(‘like_counter_p’)) { like_counter_p(“text for like”); }
    if(function_exists('dislike_counter_c')) { dislike_counter_c(""); }
    endwhile;
    
    else :
    get_template_part('post', 'noresults');
    endif;
    ?>
    <?php  ?>
    
    <?php $theme->hook('content_after'); ?>

    Let me know if that works for you.

    Thanks

    Thread Starter Slideit

    (@slideit)

    I know this must be frustrating for you Rahul, but no it didn’t. Sorry.

    Parse error: syntax error, unexpected ‘<‘ in C:\Wamp\www\wordpress\wp-content\themes\Savarona\single.php on line 12
    Call Stack
    # Time Memory Function Location
    1 0.0009 393488 {main}( ) ..\index.php:0
    2 0.0014 397192 require( ‘C:\Wamp\www\wordpress\wp-blog-header.php’ ) ..\index.php:17
    3 1.5133 24023352 require_once( ‘C:\Wamp\www\wordpress\wp-includes\template-loader.php’ ) ..\wp-blog-header.php:16

    Thanks again

    Plugin Author rahulbrilliant2004

    (@rahulbrilliant2004)

    Hi

    I am sorry it’s 4 am here. Can you please email me the theme at [email protected]. I will try to install it and see what’s the issue??

    Thanks

    Thread Starter Slideit

    (@slideit)

    I know it’s early there I just ran the time up through Bing. Do you ever sleep?:) Sure I’ll email you the single.php. That is what you want isn’t it?
    Thanks

    Plugin Author rahulbrilliant2004

    (@rahulbrilliant2004)

    HI

    I have emailed you back. Actually you needed to make changes in the post-single.php. The theme uses it to show the single post.

    I have added the code with comments. The top one displays the like dislike on the top and the bottom one at the bottom. Use the one that you want to use and delete the one that you dont want to use. Here is the code again.

    <?php global $theme; ?>
    
        <div <?php post_class('post post-single clearfix'); ?> id="post-<?php the_ID(); ?>">
    
            <h2 class="title"><?php the_title(); ?></h2>
    
            <div class="postmeta-primary">
    
                <span class="meta_date"><?php echo get_the_date(); 
    
                  /* added by Rahul */
                    if(function_exists('like_counter_p')) { like_counter_p("Like this post"); }
    
                    if(function_exists('dislike_counter_p')) { dislike_counter_p("Dislike this post"); }
    
                    /* End added by Rahul */
    
                ?></span>
               &nbsp; <span class="meta_categories"><?php the_category(', '); ?></span>
    
                    <?php if(comments_open( get_the_ID() ))  {
                        ?> &nbsp; <span class="meta_comments"><?php comments_popup_link( __( 'No comments', 'themater' ), __( '1 Comment', 'themater' ), __( '% Comments', 'themater' ) ); ?></span><?php
                    }
    
                    if(is_user_logged_in())  {
                        ?> &nbsp; <span class="meta_edit"><?php edit_post_link(); ?></span><?php
                    } ?>
            </div>
    
            <div class="entry clearfix">
    
                <?php
                    if(has_post_thumbnail())  {
                        the_post_thumbnail(
                            array($theme->get_option('featured_image_width_single'), $theme->get_option('featured_image_height_single')),
                            array("class" => $theme->get_option('featured_image_position_single') . " featured_image")
                        );
                    }
                ?>
    
                <?php
                    the_content('');
                    wp_link_pages( array( 'before' => '<p><strong>' . __( 'Pages:', 'themater' ) . '</strong>', 'after' => '</p>' ) );
    
                    /* added by Rahul */
                    if(function_exists('like_counter_p')) { like_counter_p("Like this post"); }
    
                    if(function_exists('dislike_counter_p')) { dislike_counter_p("Dislike this post"); }
    
                    /* End added by Rahul */
    
                ?>
    
            </div>
    
            <?php if(get_the_tags()) {
                    ?><div class="postmeta-secondary"><span class="meta_tags"><?php the_tags('', ', ', ''); ?></span></div><?php
                }
            ?> 
    
        </div><!-- Post ID <?php the_ID(); ?> -->
    
        <?php
            if(comments_open( get_the_ID() ))  {
                comments_template('', true);
            }
        ?>

    And I dont know why its giving error to you worked perfectly fine for me on my wamp.

    Thanks

    Thread Starter Slideit

    (@slideit)

    I don’t know why its giving error to you worked perfectly fine for me on my wamp.

    This is working great for me too, but we were talking about single.php. Not post-single.php. I added a space
    if(function_exists(‘like_counter_p’)) { like_counter_p(“Like this post<HERE>“); }

    if(function_exists(‘dislike_counter_p’)) { dislike_counter_p(“Dislike this post<AND HERE>“); }
    It looks nicer that way. I want to thank you Rahul for all of the great work.;)
    Again. It works great.

    Plugin Author rahulbrilliant2004

    (@rahulbrilliant2004)

    Thank you I am marking this one as resolved. Can you please provide me the url when you have moved it live.

    Thanks

    Thread Starter Slideit

    (@slideit)

    Yes I will give a link. It will be over the weekend. I’m working on a few things that need to be done first. I’ll send you an email when I get it done.
    Thanks again

    Hi there, shouldn’t there be onclick event to update the counter. BEcause That is what is currently happening right now. I have place the code within <?php #your code# ?> and it display them both fine. However. I can when I press both only one gets updated and the counter goes up. Can you please help resolve this issue. Thank you

    how do u apply this to buddypress comments

Viewing 15 replies - 16 through 30 (of 36 total)
  • The topic ‘[Plugin: Like Dislike Counter] What do you mean?’ is closed to new replies.