Bi-monthly Competition

Discussion in 'News & Announcements' started by Peter, Feb 26, 2011.

  1. Pikachu

    Pikachu New Member

    It should be pretty easy from a development point of view to keep things simple. Theres no need for specific account creation, its a backend thing. The coding should look something like this. NOTE: I have not been in the Vbulletin backend yet, this is just a logical temporary option to the solution.

    Query should be already on the page (just need the keywords from the string)

    On the poll screen (would remove the "(by Username)") from the poll screens and anywhere else for that matter, which means the image would be displayed, and it wont show the username next to it. People can still visit any user's area tho if they wanna snoop around to see who's image it really is.

    The other alternative would be to create a temp database table to store these competition entries in, and automatically move them into the original database tables after the poll finished. Running a cron job after the poll finished would be difficult. Unless you code to the area where the poll does the end date check (complicated in my opinion).


    PHP:
    <?php
     
    // Retreive characters 1 2 3 4 from the keywords field, to use in a check for 'bmc_'
    // $keyword_check is a manually created variable, and $image_info['img_key_words'] should be whatever the variable
    // is for the query array containing the image's keyword field (i dont know how the coding REALLY looks)
     
    $keyword_check substr($image_info['img_key_words'],0,3); 
     
    // Set up a date checker to varify the poll's end date, is highter than the current date
    // This is just to see if the poll is still running, our next variable to be created (a check to see if the username should be
    // displayed, should be set to false.
    // $date is manually created, and $poll_info['poll_end_date']; should be the variable retreived from the query array containing
    // the poll's end date (which idk how the query looks like, so variables are just dummy code)
     
    $date date ('Y-m-d');
    $poll_info['poll_end_date'];
     
    // Check if the poll is still running! Ie, the poll's end date hasnt been reached yet.
    // If the poll is active, create $poll_is_active variable and set it to 1
     
    if ($date <= $poll_info['poll_end_date'])
     
        {
         
    // echo 'Yes poll is still active!!';
         
    $poll_is_active '1'//The poll IS still running!
        
    }
     
    // Here we check if the poll is running, and the image contains a bmc_ in the keyword string, we set the username to invisible!
    // Set $display_user_name (a new variable) equal to 0 (for false)
     
    if ( $keywords_check == 'bmc_' && $poll_is_active == '1' )
    {
        
    // echo 'Yes this is a competition entry with bmc_ in keywords, and the poll is still running!!';
     
    $display_user_name '0'
    }
    ?>
    Obviously the two if's at the top could be nested, this is just to show step by step what the process should* look like. Also note that there should already be built in functions to check for poll active etc.. or even if the keywords contains bmc_ (which SHOULD exist already because once there are enteries they automatically gets displayed in the competition section).

    Once you have the variable $display_user_name, you can use that in all other areas where it displays an image, just wrap this around
    the code that displays the $username

    PHP:
    <?php 
    if ($display_user_name != '0')
    {
    // the original code goes between HERE
     
    echo '(Uploaded by: ' $vbulletin_info['username'] . ')'// or whatever the code is?? 
     
    // and HERE
    }
    ?>
    Like i said before, I have no clue how the backend of Vbulletin works, so this is merely a logical idea to temporarily fix* the issue.
     
    Last edited: Aug 18, 2011
  2. NoHints

    NoHints Active Member

    Personally I find it more fun to see what people come up with themselves (which I would say is part of the art); rather than see who can make the best technical copy of something.

    I'm sure others would be in to it though, and there's aboslutely no reason you couldn't start this competition yourself. Just post it in user-competitions (if you build it, they will come).
     
  3. Peter

    Peter Administrator

    The architecture of the gallery strongly linked to account information so anonymising gallery uploads would require quite a lot of coding.

    Besides, it still wouldn't stop Joe Bloggs from telling his/her friends "my entry is number 3 ;D"

    New theme up.
     
  4. Jmac

    Jmac New Member

    Just an fyi Peter... in the other thread you say "voting is private" but I can see who voted in the poll and for which option, don't know if you want to fix that or if its fine that way.
     
  5. elfy

    elfy Little Spoon

    yayy well done Pikachu :)
     
  6. Pikachu

    Pikachu New Member

    Thanks elfy!!! I hope to see you enter the next one too hey! Seriously tho ok!? More people more people!
     
    Last edited: Aug 18, 2011
  7. Peter

    Peter Administrator

    Hi everyone, just a quick word to say sorry I didn't get a new competition up last week (and maybe the week before). I got offered a job and had about 7 days to get all my stuff, buy shirts, buy a bike and move to Plymouth. So things have been pretty hectic. I'll have a new theme up soon!
     
    2 people like this.
  8. Ouch!

    Ouch! Banned

    Hi Peter in the mirror! I guess you accepted the job offer? ;p

    Good luck with it buddy! I hope it goes well.

    I was kinda waiting for the new theme, and also looking at the new pics posted.

    They are kinda ace as usual.

    Maybe we should vote on them? Although I would find it difficult to choose?

    A certain South African might get my vote? No guesses who it is!
     
    Last edited: Aug 14, 2011
  9. db1986

    db1986 Super Moderator

    Good luck in the new job, Peter, does this mean your location will change to Devon? :wink:

    Back on track: Looking forward to the new theme, hopefully I can find some time this week :)
     
  10. iSnack2.0

    iSnack2.0 New Member

    Congrats Peter! Looking forward to a new theme but take your time! Stress is a killer.
     
  11. iSnack2.0

    iSnack2.0 New Member

    Can I chuck up a random BMC category for people to do for fun whilst we wait?

    "Cover Up" - Book, CD, Vinyl cover art. You may even create your own.
     
    1 person likes this.
  12. iSnack2.0

    iSnack2.0 New Member

    I WIN! jk. No-one interested in BMC'ing anymore or just sheety subject? xD
     
  13. Arrisdaroldi

    Arrisdaroldi Forum Junkie

    Guess the forum has slowed down?
     
  14. db1986

    db1986 Super Moderator

    I think Peter's either busy, hiding, or both :lol:

    Or he could be designing a new forum style for Christmas, like the Halloween one we have *cough* :razz:
     
  15. iSnack2.0

    iSnack2.0 New Member

    Lovin' the Halloween one!
     
  16. goose

    goose Active Member

    hey i tried.. still wont load :((((((((( and :(
     
  17. iSnack2.0

    iSnack2.0 New Member

    I knowwww, yours was looking amazing (Y) sucks ball-bags!
    Since it's muck-around, I will allow screenshot edited in a Photoshop-type program if you're that keen :p (lolol)
     
    Last edited: Oct 29, 2011
  18. goose

    goose Active Member

    nah, not that keane (lolol).. ill wait until one day it magically loads
    only thing ive got is paint.
     
  19. iSnack2.0

    iSnack2.0 New Member

    Baint. Baiiinnntt.
     
  20. Peter

    Peter Administrator

    Ahh, not hiding but yes busy. Still it's a poor excuse! I'm going to start getting on during my lunchbreaks I think. Also I did some more reading on the use of "bi-monthly" and seems like I've been using it wrong all along. Shame though as BMC sounds quite catchy.

    Also gahh! I completely forgot about doing anything Halloweeny for the forum. Maybe we could do a Christmas logo comp or something...
     

Share This Page