• I am helping a client set up a photo contest and this plugin was a quick and easy way to do it. The only problem was we wanted all the photos in BEFORE we opened up the voting. But we did want folks to be able to view the other entries. The plugin didn’t have any native functionality so here’s what we did. (You will want to be comfortable mucking around in the code.)

    Open the viewimg.php file and comment out the Vote form so that it doesn’t show on the rendered page. We added a line of text to let viewers know when the voting would open up.

    Lines 665-666 now look like:

    <div class="wp-photocontest_detailstext">
    						<p>Voting begins August 1 and ends August 31. Winner will be announced September 2.</p>

    [Please post code snippets between backticks or use the code button.]

    And to hide the voting form lines 716-826 now look like:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    When ready to open up the voting, remove the comment code.

    Hope this is helpful. It’s a great plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I really suck at code but I REALLY need to do what you are describing. I’m a little confused in the way that you wrote it. I realize it’s probably frustrating because I’m ignorant but I could really use your help. Thanks

    Thread Starter jannmirch

    (@jannmirch)

    No worries. I see that the code got removed…

    But the idea is to add a comment code to “hide” the voting from visitors. That would look like:
    <!-- [code goes here] -->

    So you see from the first post where I added a line letting visitors know what the deal is with the voting. That text is getting added in the "wp-photocontest_detailstext" div as a paragraph.

    Then, since I added a line of code, everything else gets bumped down. Now I'm looking at line 716 to add the open comment code '<!--' in front of the voting form so it looks like this:

    <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" id="photocontest-vote_form">

    But now that I've added it, everything that follows is commented out, meaning the browser won't read it. So I need to close the comment which will happen on line 826 which will now look like:

    ?> -->

    When I'm ready to open up the voting, I will just take out the comment code.

    Let me know if you still have questions.

    Plugin Author frekel

    (@frekel)

    I really like you posting solutions! Thanks!

    This is a functionality I can add into the next version.

    Thanks again,
    Frank

    I have ended my contest (have all the photos submitted), now I want to open it to community voting. How do I do this?

    Disregard my last post. I figured it out. It was right in front of me, the contest end date and upload dates can be two separate dates. DOH!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disallowing voting while entries are being collected’ is closed to new replies.