Post Voting Plugin: How to create/use a custom image

I'd like to use my own image with this plugin. I've read a few forum posts about this but the answers aren't very detailed.

Any help?

-Jeff

  • 3SixtyEvolve
    • New Recruit

    Greetings Jeff

    Greetings from the WPMU DEV Support Team and thank you for being a member.

    I am looking into the code to see where you can make this change. Please allow me to come back to you with feedback.

    Thank you for your patience. I will be in touch shortly.

    Have a good day!

    Gina

  • Jeff
    • Design Lord, Child of Thor

    Hi Gina,

    Is there a solution for using a custom image? The images in this screenshot are very boring. A custom image would allow me to make this feature more attractive and have a closer look and feel to my site's branding.

    Thanks,
    Jeff

  • Ashley Pearson
    • The Incredible Code Injector

    I guess Gina forgot, haha!

    All images need to go into your /img/ folder found in yourdomain.com (public_html/wp-includes/plugins/post voting plugin(varied name)/img/

    Upload 4 images into a folder of a name of your choice, something simple you remember.

    down.png
    down_disabled.png
    up.png
    up_disabled.png

    Bare with me while I scour the code finding what to add. :wink:

  • Ashley Pearson
    • The Incredible Code Injector

    Okay, the best solution if you don't want to use the ones you have is to replace them in the folder I specified above.

    Get 4 images

    down.png
    down_disabled.png
    up.png
    up_disabled.png

    Width 18px
    Height 26px for each one.

    Upload these images of this size to the /img/ folder and NOT into a sub folder and it will replace the default ones that you have. There is also a loading.gif file you can replace if you chose to.

    The other method is by changing the provided CSS file, but the method just mentioned is easier.

    If this helps, a billion rep points are appreciated.

  • Ashley Pearson
    • The Incredible Code Injector

    I believe so however I am unsure how it will affect the theme or design.

    In the CSS file provided with the plugin, found at plugin-name/css/wdpv_voting.css you can make changes.

    This rule applies if you are replacing the 4 images found in the /img/ folder only, as this change applies to those images.

    At the top of the file you will see Height and Width and a px value for wdpv_vote_up. Simply make your pictures, and see the size, change it in this CSS file and it should apply to the design. Now scroll down and make the changes dfor wpdv_vote_down etc for the 4 images, not the rest of the "up" images as they apply to the other images in the other folders.

    If there are any problems visually let me know and I will see what i can do.

    Hope I helped.

  • Jeff
    • Design Lord, Child of Thor

    I got it! I just started playing around with different pixel dimensions.

    My image is 50x30 but I set the the pixel height slightly larger
    .wdpv_vote_up {
    width: 50px;
    height: 35px;
    background: url("../img/up.png") no-repeat scroll 0 7px;
    float: left;
    cursor: pointer;

    The results number was a little high so I adjusted the code below. Instead of "2", I changed it to "8".
    .wdpv_vote_result {
    float: left;
    font-size: 24px;
    padding: 8px 5px;

    Thanks buddy, you helped a ton! I think I know my way around this plugin enough to get it looking just right.

  • 3SixtyEvolve
    • New Recruit

    Hi @kauffey19

    Glad that we have such good community members in here that comes to other members' rescue when they need it.

    I didn't forget about you, apologies. It's just been a crazy busy week (and was away for the weekend, which didn't help) so I was hoping to get back to you today with a solution, but I found that @slow2die sorted you out - very happy for that!

    If you need any further support, please don't hesitate to be in touch. I promise next answer will be much quicker... :slight_smile:

    Have a good day!

    Gina

  • 3SixtyEvolve
    • New Recruit

    @slow2die
    With the support you're providing, I'm sure you'll be able to achieve that target very soon. Some has done it in under a month, others took their time, but it's achievable. :slight_smile:

    All the best with it and if I find you on the forum giving some good advice, be assured you'll get some cookies from me :slight_smile:

  • Ashley Pearson
    • The Incredible Code Injector

    Well I have to do it within 3 months as thats how long i get with my pro membership haha! Lets hope I can find some stuff I can help with properly in that time. Ive seen some stuff I am unsure of the answers too, but its a learning curve for me too, so there are lots of opportunities.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.