Support » Plugin: WP-PostRatings » Image Size

  • Resolved Mike-bd

    (@mikekharisma)


    Hi Lester
    I’ve been all through your code but can’t find a answer to this.

    I want to put your ratings in my search results, but the image size I’m using on the full post page is too large really. I note the images within the sidebar widget are smaller although it uses the full image, but I can’t find how you done it.

    Is it possible to call “the_ratings” and either use the small downsized image as in the widget or perhaps call another image folder by creating another modified function, say “the_ratings_small”?
    KInd regards
    Mike

    http://wordpress.org/plugins/wp-postratings/

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

    (@gamerz)

    You can use CSS to control the size of the image, from the code, the image sizes are the same. I did not specify any specific sizes. it might be your theme that is controlling the size of setting the image size to max-width 100%;

    You can control the size via CSS like
    #search-page .post-ratings IMG {width: 10px; height: 10px;}

    Thread Starter Mike-bd

    (@mikekharisma)

    Thanks for that … Easy really!!!

    I note you’ve used IMG instead of image. Is that something you specified with the PHP?

    As I’ve tried to address the text separately as well with
    #search-page .post-ratings-text
    which doesn’t seem to work.

    Cheers
    Mike

    Plugin Author Lester Chan

    (@gamerz)

    The correct image tag for html is IMG

    #search-page is an example, I am not too sure what is the CSS selector on your search page.

    Thread Starter Mike-bd

    (@mikekharisma)

    So what’s the class name for the post-ratings text? So I can address it #search-page .post-ratings-text?
    Mike

    Plugin Author Lester Chan

    (@gamerz)

    Nope just

    #search-page .post-ratings {font-size: 10px;}

    Thread Starter Mike-bd

    (@mikekharisma)

    Many thanks for your help Lester

    Thread Starter Mike-bd

    (@mikekharisma)

    HI Lester
    Still working on my site. I’ve now formatted the “the_ratings” function call in the templates page for my single post page.
    My search results use a shortened summery/extract of the post and what I’d like to do is simply use the post ratings image in the summary. How can I call and echo the post %RATINGS_IMAGES% directly?
    Kind regards
    Mike

    Plugin Author Lester Chan

    (@gamerz)

    Try <?php echo the_ratings_results(get_the_id())); ?>

    Thread Starter Mike-bd

    (@mikekharisma)

    Many thanks. That brings up the “Ratings Voted Text:” template I’ve set up for the single page, which includes the text as well?

    Plugin Author Lester Chan

    (@gamerz)

    Yes, the results will display that. There is no way to exclude that right now since it uses the same template.

    Thread Starter Mike-bd

    (@mikekharisma)

    Thanks Lester. I found a way by using zero opacity on the text selector.
    Cheers again.
    Mike

    Thread Starter Mike-bd

    (@mikekharisma)

    Lester
    Another quick one regarding the ratings voted text, I’d like to restrict the number to just one decimal place. At present it’s two. Where do I find the code?
    Mike

    Plugin Author Lester Chan

    (@gamerz)

    There is a lot of places that does that. You might want to find number_format_i18n and change it to intval

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Image Size’ is closed to new replies.