Viewing 15 replies - 1 through 15 (of 23 total)
  • Thread Starter acowboyswife

    (@acowboyswife)

    Thread Starter acowboyswife

    (@acowboyswife)

    Also, while I’m here. I can’t figure out how to edit anything I put into the second box….I can go to the post to edit what I put in the first box, can edit the dates but can’t edit the second box info nor how many photos to upload.

    If some of these things can get fixed, I’m willing to make a donation.

    I have checked yor site, but I think you don’t use the plugin right now.

    Please provide your WP version and WP PhotoContest version!

    Found the bug, version 1.5.1 should be fixing this!

    NOTE:
    Reminder about autoupgrading:
    ==============================================
    Autoupgrading can remove all my contests and files.
    Please make sure you have a copy of the contest_folder and the skin folder!

    Hi,

    First off, congrats on a great plugin.

    Second, the issue posted above seems to have resurfaced.

    You can view the problem in the wild here:

    https://www.thepassagesamui.com/blog/wp-content/plugins/wp-photocontest/play.php?post_id=25

    https://www.thepassagesamui.com/blog/test/

    I first set the max photos to 1 … after uploading 1 photo noone could add anymore. Ok – maybe i made a mistake or it just occurs when max is 1.

    So I created another competition and tried with 3 max (it’s supposed to be per user right? It is actually limiting the total photos allowed by EVERY user!)

    Then uploaded 3 entries into the competition and the same problem occurred.

    Any suggestions on a quick fix to the php?

    Cheers,

    Dominic

    Have you tried to use the force upgrade link in the settings page of the contests (WordPress admin panel –> Photocontest –> Settings) ?

    If that doesn’t work, please send me a username/password for a user who can log into your wordpress (admin panel)

    You can find my emailaddress in the readme file!

    Greets,
    Frank

    Sorry, found the problem:

    You have set the role for uploading to None, right?

    Change the following:
    in play.php on line 149:

    $total_nr 	= (int) $wpdb->get_var( $wpdb->prepare( "SELECT count(img_id) as total_nr from ".$wpdb->prefix."photocontest WHERE wp_uid = %d and visibile=1 and contest_id = %d", $current_user->ID, $photo_contest_id) );

    to

    $total_nr   = 0;
    if (isset($current_user->ID))
    {
    	$total_nr 	= (int) $wpdb->get_var( $wpdb->prepare( "SELECT count(img_id) as total_nr from ".$wpdb->prefix."photocontest WHERE wp_uid = %d and visibile=1 and contest_id = %d", $current_user->ID, $photo_contest_id) );
    }

    Yes Frank, you are correct in the role for uploading is set to None.

    I am on a really slow connection right now, and am trying to implement your fix but it’s slow going. will let you know how it goes when I have results.

    I did notice the above code had a possible typo

    $total_nr   = 0;
    if (isset($current_user->ID))
    {
    	$total_nr 	= (int) $wpdb->get_var( $wpdb->prepare( "SELECT count(img_id) as total_nr from ".$wpdb->prefix."photocontest WHERE wp_uid = %d and visibile=1 and contest_id = %d", $current_user->ID, $photo_contest_id) );
    }

    visibile should be visible right?

    Ok my mistake, I see the visibile variable is already declared so it isn’t a mistake after all.

    Ok my mistake, I see the visibile variable is already declared so it isn’t a mistake after all.

    Changed the code as per your post above and was able to add another entry so it looks like that did the trick!

    Brilliant Frank! Thank you so much for your fast response.

    My next task is to refine the text for usability reasons – I think the current text after clicking “Enter the competition” can be improved to ensure the next step is very clear.

    e.g.
    Change
    ———————————————————-
    Post photos | Recently added | Most views | Top rated

    PHOTOTABLE
    ———————————————————-
    to
    ———————————————————-
    Enter competition – Upload your photo now! (Bold, large font)

    View Current Entries:
    Recently added | Most views | Top rated

    PHOTOTABLE
    ———————————————————-

    I’m hoping this is a simple job with the templating functionality – will report back if I have issues!

    Open lib/wp-photocontest.class.php and look for the function get_top_menu()

    or open localizations/wp-photocontest.pot and translate

    • Post photos
    • Recently added
    • Most views
    • Top rated

    enter the translation in the msgstr “”

    (so Post photos is: msgstr “Enter competition”)
    and send me the pot file by mail (see my email in the readme.txt file)

    Thanks Frank, those pointers saved me a ton of time.

    Frank – strangely I just checked thisand the change I made had reverted to the old version.

    Now there is the chance that my host restored some old backups…

    …but is there any other way that you can send plugin updates and you neglected to make the change you describe above in the core code?

    Odd.

    Cheers,

    Dominic

    Can you tell me which changes you are referring to?

    Thanks,
    Frank

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘[Plugin: PhotoContest Plugin] Sorry, You have already uploaded one photo’ is closed to new replies.