Welcome, Guest. Please Login or Register.
June 03, 2024, 04:57:18 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  General Category  |  Feedback  |  Smite/applaud bug « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Smite/applaud bug  (Read 1477 times)
Nemesis
What's an Admin?
Global Moderator
YaBB God
*****
Posts: 2199


WWW
Smite/applaud bug
« on: March 11, 2002, 10:29:32 AM »
Reply with quote

Brought to my attention by one of my members of my site

If you smite, then applaud, you can then smite again, and so forth and so-on. (Figures they would try and find away to cheat it.  ::) )

Check it out...
http://gamerzalliance.com/community/index.php?board=3;action=display;threadid=504;start=2
Logged


Want to say thanks?
*************************************
DONATE or check out my WishList
*********************************
Nemesis
What's an Admin?
Global Moderator
YaBB God
*****
Posts: 2199


WWW
Re:Smite/applaud bug
« Reply #1 on: March 11, 2002, 06:00:39 PM »
Reply with quote

Okay it is fixed now...

(at least on my site, I submitted it to bug tracker and in the bugs notes I posted the fix)

For all who want to fix their's here it what we did.

One of the karma SQL queries was updating instead of inserting.

fixed: ( Modified Karma.php )  Sql query was doing UPDATE instead of INSERT INTO

Line 79
This is how it should read.
$request = mysql_query ("INSERT INTO {$db_prefix}log_karma SET action='$dir', logTime='$nowtime' WHERE (ID_TARGET='$uid' && ID_EXECUTOR='$ID_MEMBER') $doLimitOne");

The problem was that it was updating the last action they did instead of making a new entry.  Say I appluaded username?, it would add an entry to the log_karma table saying I appluaded him.  Then I go and smite him, instead of making a new entry it just changed to last one to a smite action.  Then I could go applaud again and the cycle would continue.   ::)


Thanks to my partner Indy for finding this and fixing the code.
« Last Edit: March 11, 2002, 06:01:49 PM by Nemesis » Logged


Want to say thanks?
*************************************
DONATE or check out my WishList
*********************************
Nemesis
What's an Admin?
Global Moderator
YaBB God
*****
Posts: 2199


WWW
Re:Smite/applaud bug
« Reply #2 on: March 11, 2002, 06:15:54 PM »
Reply with quote

Ahh a new bug has developed from our new coding. Now it's the opposite.

If you applaud then applaud again it wont let you.

if you applaud and smite then applaud again it wont let you.

but then you can just go back to smite and smite all day long if you want. We trying to find a fix for it again.   :'(
Logged


Want to say thanks?
*************************************
DONATE or check out my WishList
*********************************
Jeff Lewis
Global Moderator
YaBB God
*****
Posts: 10149


I'm a llama!

WWW
Re:Smite/applaud bug
« Reply #3 on: March 12, 2002, 02:15:05 PM »
Reply with quote

it is designed to work the first way so that a user can change his mind.  They can smite or applaud...
Logged

Nemesis
What's an Admin?
Global Moderator
YaBB God
*****
Posts: 2199


WWW
Re:Smite/applaud bug
« Reply #4 on: March 12, 2002, 04:37:02 PM »
Reply with quote

I see your point but they should only be allowed to maybe chage there mind once. And if they change their mind it should minus from the opposite not add to what they pressed example.

If someone press smite it adds to smite if they chage their mind they press applaud it should minus what they add from smite and maybe add one to applaud.

What it is doing is everytime you press smite then applaude and smite it just keeps adding up. One guy had +6 karma and -1 smite. Then a member exploited the smite/appluad and next thing I know the guy had +105 karma and -101 smite.
Logged


Want to say thanks?
*************************************
DONATE or check out my WishList
*********************************
Jeff Lewis
Global Moderator
YaBB God
*****
Posts: 10149


I'm a llama!

WWW
Re:Smite/applaud bug
« Reply #5 on: March 12, 2002, 05:07:29 PM »
Reply with quote

But the difference is still the same, he is +4 :)
Logged

Nemesis
What's an Admin?
Global Moderator
YaBB God
*****
Posts: 2199


WWW
Re:Smite/applaud bug
« Reply #6 on: March 13, 2002, 04:03:59 AM »
Reply with quote

 :P

Wasn't the point, O'Well I figure out how to prevent it.
Logged


Want to say thanks?
*************************************
DONATE or check out my WishList
*********************************
Jeff Lewis
Global Moderator
YaBB God
*****
Posts: 10149


I'm a llama!

WWW
Re:Smite/applaud bug
« Reply #7 on: March 13, 2002, 01:25:15 PM »
Reply with quote

I see what you're saying :)  Talk to Joseph, it's how he wanted it to function by design :)
Logged

Joseph Fung
Global Moderator
YaBB God
*****
Posts: 4512


Keep smiling: it makes others nervous.

WWW
Re:Smite/applaud bug
« Reply #8 on: March 13, 2002, 04:37:38 PM »
Reply with quote

Ahh - so that's the issue.  I completely missed that you were using the +/- display.  I hadn't really thought about that, as originally Karma was only a net total thing.  I only added the +/- display after.

So while originally it made no difference (it only showed that net of 4) I guess the +105/-101 is a bit of an issue.

I'll take a look at it.
Logged

Pages: [1] Reply Ignore Print 
YaBB SE Community  |  General Category  |  Feedback  |  Smite/applaud bug « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.032 seconds with 16 queries.