• Resolved Tigerbite

    (@tigerbite)


    -UPDATE-
    Woo, I finally got it somewhat how I want it, but now I’m trying to figure out where I need to go to style it. I’m looking…and all I’m seeing is a lot of mumbo jumbo T_T

    ———————————————–
    Is there a way to make the like/dislike buttons be side by side, rather than on top of each other and can they be put on the side of the image, rather than under the image?

    I’m messing around with the code, but I tend to be breaking it more than anything XD

    https://www.ads-software.com/extend/plugins/nextgen-gallery-voting/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author shauno

    (@shauno)

    Hey Tigerbite

    The plugin by default adds no styling (other than the stars if you have selected that type). The plugin does output its markup with classes, so there is enough to style it however you want to.
    You need to know some CSS to really make the most of this though.

    Good luck

    Thread Starter Tigerbite

    (@tigerbite)

    Thanks for the reply. Yeah, I’m decent enough with css to fix it up, eventually. It’s just php makes my head spin, haha.

    I’m slowly getting stuff to how I want it to look after breaking it a few times.

    But for example, right now, I have the thumbs up/down icon. Then when you click one of them the icon disappears and you get a “x Likes” “x Dislikes” Where do I edit that?

    I’m thinking it’s the file voting-types.php, but I’m not really sure. If you can point me in the right direction that would be great! I’ll probably be buying the pro plugin after I figure everything out ??

    Plugin Author shauno

    (@shauno)

    The Premium add-on gives you an interface to edit those messages. Check out a screenshot here.

    But if you want to mess with them manually, they are in voting-types.php. The image messages are on line 219-221, 255-257. Just remember, if you alter the core plugin files, any updates will overwrite your changes.

    Let me know if there’s anything else I can help with ??

    Thread Starter Tigerbite

    (@tigerbite)

    Yeah, that’s the area I’m messing around with, but I can’t get anything to change on the frontend. It’s not so much as to changing the words, but the location. Right now they’re side by side and once you vote and the icons go away it runs into each other.

    Example: 1 Like0 Dislikes

    Instead of 1 Like 0 Dislikes.

    Once I can figure out where to change it, I can style it and make it look pretty ??

    -edit-
    I thought it would be this part of the code, but like I said, nothing changes on the front end when I change this part of the code ??

    if($options->user_results) {
    				$results = $nggv->getVotingResults($options->gid, array('likes'=>true, 'dislikes'=>true));
    				$return['form'] .= '<div class="like-results">';
    				$return['form'] .= $results['likes'].' ';
    				$return['form'] .= $results['likes'] == 1 ? nggVoting::msg('Like') : nggVoting::msg('Likes');
    				$return['form'] .= ' '.$results['dislikes'].' ';
    				$return['form'] .= $results['dislikes'] == 1 ? nggVoting::msg('Dislike') : nggVoting::msg('Dislikes');
    				$return['form'] .= '</div>';
    			}
    Thread Starter Tigerbite

    (@tigerbite)

    Welp! I found it! Was in the wrong tidbit of code, haha. If only I knew what those codes meant, this would be a lot easier on me.

    Thanks for the help!

    Plugin Author shauno

    (@shauno)

    That lack of a space in the text is a bit sloppy isn’t it ??
    I am going to be releasing an update in the next 24 hours, and I’ve added a space there by default now.
    I will be changing line 256 to the following in the next release:

    $return['form'] .= ' '.$results['dislikes'].' ';

    Thread Starter Tigerbite

    (@tigerbite)

    Just wanted to say thanks again for all the help and thought I’d share what I’ve came up with so far!
    Example

    The bottom image is before you vote and the top picture is after you vote. Still working on some styling so it lines up better. Now I just have to make sure I copy the changes I’ve made to voting-page before I update. ??

    Plugin Author shauno

    (@shauno)

    Great work Tigerbite

    For someone who says they don’t understand PHP, you managed to get that done nicely.

    I have released version 2.3.2 which fixes a small bug in the default settings, as well as adds the space between the ‘1 Like0 Dislikes’ text you pointed out. That’s the only change in the voting-types.php file, so as long as that’s the only file you edited, you should be able to back it up, update the plugin, and overwrite the voting-types.php file with your backup.

    Let me know if you have any more questions or problems.

    Thread Starter Tigerbite

    (@tigerbite)

    Had an issue with my images showing up, but I reuploaded the images and everything started working again. There’s no delete button, so you get to read this message. XD

    Hi Tigerbite,

    I have the same problem – trying to get the like buttons to appear side by side instead of on top of each other. Could you please tell me how you fixed that?

    Which css or php file and what line in particular? That would help a lot.

    Also, if you could share your website, I would like to see what all other customization is possible for the like/dislike.

    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Like/Dislike buttons’ is closed to new replies.