|
|
| Team Allegro |
|
Jakub Wasilewski
Member #3,653
June 2003
|
Hm, strange Looks like Operation Mindf*ck strikes again --------------------------- |
|
Oscar Giner
Member #2,207
April 2002
|
There's some bug in BAF code. I voted, but only two of them were counted. -- |
|
Jakub Wasilewski
Member #3,653
June 2003
|
[Danger: a joke]BAF got sure that every third vote not on him gets ruled out --------------------------- |
|
Krzysztof Kluczek
Member #4,191
January 2004
|
BAF: If you want to fix database by hand and don't know where to put these extra votes you can put them on me. ________ |
|
CGamesPlay
Member #2,559
July 2002
|
He's got it rigged so it saves who each user voted for, so if the points were put in the user table properly first but not counted properly second then it'll be fine. Furthermore, .... emm... I forgot. I cycled from the window for a bit and forgot -- Ryan Patterson - <http://cgamesplay.com/> |
|
BAF
Member #2,981
December 2002
|
the 2nd reason was incase someone like cough cgames cough makes many accounts to rig the voting I have been seeing this bug a lot, i am just going to go through the db and tally up who got what votes, and fix the numbers. I shall do that now (its a good thing i made it save who voted for who, i almost didnt) [edit] [edit2] |
|
Krzysztof Kluczek
Member #4,191
January 2004
|
Thanks all so far! Anyway, this isn't main purpose of this post. It's (mainly to BAF): 1) Voting status page is broken - Oscar Giner had 6 votes IIRC and he now has 2. 2) Some people haven't voted yet. Maybe there should be deadline specified? I'd suggest 1th July - date when compo starts. 3) Vote everyone! ________ |
|
ReyBrujo
Moderator
January 2001
|
I keep my saying: I cannot vote until we chose a game genre. -- |
|
Krzysztof Kluczek
Member #4,191
January 2004
|
Hmm, why? Anyway, we can't choose game genre until we know contest rules which will be available when contest starts. ________ |
|
ReyBrujo
Moderator
January 2001
|
Well, I trust some people more for 3D design and programming than others, as I do trust people for doing RPGs more than others, as I do trust some more when making arcades than others. Just my opinion. -- |
|
nonnus29
Member #2,606
August 2002
|
Hey BAF, tell me how to make phpbb look unugly when you figure it out (ie I want to use my logo in place of ugly 'phpbb' logo, yuck!) Like I said somewhere else; I don't expect anyone to actually use this jsgc thing, I put it on sourceforge mainly so I can have free web hosting Edit; oops, thanks, hehe |
|
Krzysztof Kluczek
Member #4,191
January 2004
|
Play with styles. And the logo is in "templates/subSilver/images/logo_phpBB.gif" (quick look at page source revealed this). ________ |
|
BAF
Member #2,981
December 2002
|
Or even edit the templates/subSilver/*.tpl files and/or pagehead.php and pagefooter.php. That is how i am going to make it look good with my site and as far as voting goes, there is a bug in the php script someplace. I'm not fixing it for a cpl people to vote. Tomorrow mornign i will recounstruct the coutns (it stores who votes for who, so i acn tally it manually and change the counts) |
|
ReyBrujo
Moderator
January 2001
|
Votes should be secret -- |
|
Inphernic
Member #1,111
March 2001
|
Quote: I'm not fixing it for a cpl people to vote A simple voting script should NOT have these kinds of bugs in the first place. Next time you're running a vote, ask someone who knows PHP to do the script(s). -- |
|
Oscar Giner
Member #2,207
April 2002
|
BAF, your voting system is crazy. Everytime I look the ranking is completelly different I don't know why you're having so many problems. Don't you just have to do something like: SELECT v.vote, COUNT(*), m.has_voted FROM votes v, members m WHERE v.vote = m.username GROUP BY v.vote
to show the results ? There aren't many places to have bugs, here -- |
|
Evert
Member #794
November 2000
|
Can we just reset the vote? |
|
BAF
Member #2,981
December 2002
|
i encrypt the passwords, i know who voted for who, and i dunno what is wrong with the code. Here is the offending code from ta.php, can anyone spot any bugs?
|
|
Matthew Leverton
Supreme Loser
January 1999
|
Quote:
$row3 = mysql_fetch_assoc($result3); Surely you mean $row3 there. You should make it a habit to run your code on the strictest warning settings, especially during development. It will catch typos, indexes that don't exist, etc. Also, it looks like to me that someone could vote as many times as they wanted. I know you're setting a flag, but you should be checking it before you insert values. Also, you could easily do: UPDATE members SET vote_count = vote_count + 1 WHERE id=$id To do it all in one query. |
|
RallyMonkey
Member #4,615
May 2004
|
Do you really need error checking with the isset? IF it is a dropdown box and they don't change it they vote for the first person. Correct? EDIT: Or is that how you get whether they have gone to that page before? If so. Nevermind. NOTICE: This post's grammar/spelling/puncuation is definitive. English is frequently inaccurate. |
|
BAF
Member #2,981
December 2002
|
ML: I am checking it: elseif($user['voted'] != 0) { print "You have already voted. If you haven't, please email BAF from the main Team Allegro page, or see the BAFSoft contact page"; } else { ... So if it gets stuck in that else if, the voting code is all in the last else, so it wont ever allow it to pass. And thanks for pointing out that error to me [edit] [edit2] Matthew: is there a way to do double ordering in the mysql query? First i want to order by the number of votes there are, Descending. If they are tied i then want to order by username, Ascending. I know i can just do ORDER BY leadervotes,username. But then it will do username descending too. And i dont think ORDER BY leadervotes,username DESC,ASC will work, will it? |
|
Matthew Leverton
Supreme Loser
January 1999
|
Quote: And i dont think ORDER BY leadervotes,username DESC,ASC will work, will it? ORDER BY leadervotes DESC, username ASC |
|
Inphernic
Member #1,111
March 2001
|
The total number of votes given is 58. 19 people have voted. 19 * 3 votes = 57 votes. -- |
|
Oscar Giner
Member #2,207
April 2002
|
BAF, my suggestion: destroy the votefor column. Much neater this way. Probably you won't want to change this at this stage, but anyway for future reference And all the code for updating the number of votes can be reduced to just 1 line (in fact you don't need to store this if you use the previous table): mysql_query("UPDATE ta_members SET leadervotes = leadervotes + 1 WHERE id IN ($vote1, $vote2, $vote3)");
In general, is less probable to have a bug or typo in 1 line of code than in 18 -- |
|
BAF
Member #2,981
December 2002
|
Inphernic: i don't know why. I will be making a php script to fix the db one last time for me. OscarG and Matthew: thank you. |
|
|
|