• Resolved BidBoxUSA

    (@bidboxusa)


    I have read the FAQ and I can’t get the voting for the single pictures to work. Here is my code in the /nextgen-gallery/view/gallery.php

    <?php
    /**
    Template Page for the gallery overview
    
    Follow variables are useable :
    
    	$gallery     : Contain all about the gallery
    	$images      : Contain all images, path, title
    	$pagination  : Contain the pagination content
    
     You can check the content when you insert the tag <?php var_dump($variable) ?>
     If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
    **/
    ?>
    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
    
    <div class="ngg-galleryoverview" id="<?php echo $gallery->anchor ?>">
    
    <?php if ($gallery->show_slideshow) { ?>
    	<!-- Slideshow link -->
    	<div class="slideshowlink">
    		<a class="slideshowlink" href="<?php echo $gallery->slideshow_link ?>">
    			<?php echo $gallery->slideshow_link_text ?>
    		</a>
    	</div>
    <?php } ?>
    
    <?php if ($gallery->show_piclens) { ?>
    	<!-- Piclense link -->
    	<div class="piclenselink">
    		<a class="piclenselink" href="<?php echo $gallery->piclens_link ?>">
    			<?php _e('[View with PicLens]','nggallery'); ?>
    		</a>
    	</div>
    <?php } ?>
    
    	<!-- Thumbnails -->
    	<?php foreach ( $images as $image ) : ?>
    
    	<div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> >
    		<div class="ngg-gallery-thumbnail" >
    			<a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
    				<?php if ( !$image->hidden ) { ?>
    				<img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
    				<?php } ?>
    			</a>
    		</div>
    	</div>
    	<?php echo nggv_imageVoteForm($image->pid); ?>
    	<?php if ( $image->hidden ) continue; ?>
    	<?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
    		<br style="clear: both" />
    	<?php } ?>
    
     	<?php endforeach; ?>
    
    	<!-- Pagination -->
     	<?php echo $pagination ?>
    
    </div>
    
    <?php endif; ?>

    Here is a link to my site. Type it in the browser. www [dot] actionfigurefury [dot] com/test-page

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

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter BidBoxUSA

    (@bidboxusa)

    I was using the shorcode:

    [nggallery id=1 template=caption]

    and I changed it to

    [nggallery id=1]

    and the other buttons show up. There are some major issues with this plugin though. It says there is already 1 vote, which there is not. And the styles are way off for where the buttons should be appearing.

    Any suggestions?

    Plugin Author shauno

    (@shauno)

    Hi BidBox
    If you specify the template that NGG is going to use to display your gallery, then it makes sense that you would need to add the voting tag to that template.
    If you want to use the template gallery, add the tag to /nextgen-gallery/view/gallery-caption.php.

    If the plugin says there is a vote, I really think there is a vote. You can look at the database table wp_nggv_votes, to confirm the date and time that vote is recorded.

    What other problems are you having? There are thousands of happy active users that have no issues, but sometimes the fact that WordPress installs can be so varied, little things can get through. Let me know what they are and I will try sort them our for you.

    Thread Starter BidBoxUSA

    (@bidboxusa)

    Ok I added the coded to the /nextgen-gallery/view/gallery-caption.php file. Works with the shortcode that I want to use. Great.

    I went into the database and deleted the vote. I don’t know why it wasn’t showing the vote for me in my backend? Do you know why this might happen?

    If you go to the page where the gallery is currently on at

    www [dot] actionfigurefury [dot] com/test-page

    You should be able to see what the other problems that I am having are.

    There is an extra voting button and the 2 voting buttons for the pictures are appearing in odd positions. How can I fix this?

    Plugin Author shauno

    (@shauno)

    There seems to be broken javascript on the page, which will interfere with the AJAX voting. Javascript is very fragile, and any errors with other code on the page can affect all the javascript.
    It also seems jQuery isn’t included, and the voting process (and NGG’s popup) need this.

    I also see you have caching with W3 Total Cache. There is a good chance that will interfere with the voting, as the voting process needs to make page loads with parameters to log the votes. I have tried to make the plugin compatible with the caching plugins before, but there are so many options are variations that it’s tough to catch them all.
    I would suggest turning it off for the pages you have voting on.

    Thread Starter BidBoxUSA

    (@bidboxusa)

    I tried making the page full width to remove the sidebar to take off any conflicting Java and the like buttons are still in the wrong places. I don’t think this plugin is going to work on my site. I’ll just have to find one that does.

    Plugin Author shauno

    (@shauno)

    The positioning is purely a CSS change dude. The plugin can’t magically know how your theme looks, and adapt itself to fit perfectly. That’s why there are so many classes and ids on the elements, so you can customize it to suit your site.

    It would be cool to know what plugin you settle with, so I can have a look and see if I can improve mine with anything it does better.
    Good luck ??

    Thread Starter BidBoxUSA

    (@bidboxusa)

    Even if I got the CSS correctly there is still an extra like button there.

    Plugin Author shauno

    (@shauno)

    No there isn’t. There are the 2 voting options for the 2 images, plus the voting option for the gallery as a whole. If you don’t want the gallery voting option there, untick the option under the gallery in the backend.

    Thread Starter BidBoxUSA

    (@bidboxusa)

    Ok thanks for clearing that up. I don’t know CSS very well. Do you know how I could make it work with my theme so that they like buttons are below the pictures?

    If I can do this then the plugin would work perfectly how I want it to.

    Plugin Author shauno

    (@shauno)

    Put the voting tag inside the div wrapping each image:

    <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> >
    	<div class="ngg-gallery-thumbnail" >
    		<a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
    			<?php if ( !$image->hidden ) { ?>
    				<img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
    			<?php } ?>
    		</a>
    	</div>
    	<?php echo nggv_imageVoteForm($image->pid); ?>
    </div>

    You could even wrap the voting tag in it’s own div, and tweak it’s position so it’s centered under the image:

    <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> >
    		<div class="ngg-gallery-thumbnail" >
    			<a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
    				<?php if ( !$image->hidden ) { ?>
    				<img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
    				<?php } ?>
    			</a>
    		</div>
    		<div style="text-align:center">
    			<?php echo nggv_imageVoteForm($image->pid); ?>
    		</div>
    	</div>

    My CSS is not good either, so I’m not sure if there are browser issues or anything obscure why that wouldn’t work.

    Thread Starter BidBoxUSA

    (@bidboxusa)

    ANNNNNNDDDDD…. that works!!!!

    Thanks! I really appreciate the help.

    P.S. The only thing I could suggest is making the votes easily sortable for each gallery. For small galleries this isn’t much of a problem but for what I plan on using the plugin for (photo contest) it could be a major problem sorting out the votes.

    Plugin Author shauno

    (@shauno)

    Do you mean sorting the images via the highest/lowest rated? You can in the backend, under the ‘NGG Voting->Top Voted’ page. It’s not perfect, in that you can’t limit it to a specific gallery, and that it only shows ratings out of 10, but it’s something ??

    It’s definitely something that is on the to-do list to improve at some point.

    Thread Starter BidBoxUSA

    (@bidboxusa)

    That. That is pretty bad. But I will give it to you that it is something. But it is bad.

    Besides that great plugin.

    Plugin Author shauno

    (@shauno)

    Hey, sometimes you get what you pay for ??

    Glad the plugin ended up being useful to you. Let me know if there is anything else you need help with at any stage.

    Freedom in Christ

    (@freedom-in-christ)

    I just updated the plug-ins for the Next Gen Gallery and the Next Gen Voting. Now when I go to the gallery I have on our webpage, the voting options under the individual photos are gone. I’ve tried several times to get them back. I guess I’m missing something…Can you help me out?

    https://ficprisonministry.com

    If you click on the link under Quilting contest on the home page, you’ll go to where the gallery is.

    Thanks!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Can't Get voting for single pictures to work’ is closed to new replies.