Raised This Month: $2 Target: $400
 0% 

I Can't give karma?!?!?!


Post New Thread Reply   
 
Thread Tools Display Modes
Proach
Veteran Member
Join Date: Jan 2005
Location: The Netherlands
Old 10-13-2005 , 11:22  
Reply With Quote #21

smells like IPB
__________________

www.psmod.net (the better psychostats)
PAOL
Proach is offline
Send a message via ICQ to Proach
BAILOPAN
Join Date: Jan 2004
Old 10-13-2005 , 18:08  
Reply With Quote #22

Okay, it seems there's popular demand for this. It's pretty simple:

The JavaScript side:
http://www.amxmodx.org/forums/karma.js
The Reply script:
http://www.amxmodx.org/forums/karma_ajax.phps
The Karma API:
http://www.amxmodx.org/forums/karma_api.phps
The SQL Schema:
http://www.amxmodx.org/forums/karma_schema.sql

I'll leave phpBB integration to the implementor because it's annoying, but basically you just add this:
+/-

PS! Beware that "amxx_karma_usage" table gets very big, right now it has 410,000 rows.
__________________
egg
BAILOPAN is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 10-13-2005 , 18:35  
Reply With Quote #23

gaben came out
Freecode is offline
eFrigid
Senior Member
Join Date: Aug 2005
Location: 3o3
Old 10-13-2005 , 19:10  
Reply With Quote #24

Quote:
Originally Posted by BAILOPAN
Okay, it seems there's popular demand for this. It's pretty simple:

The JavaScript side:
http://www.amxmodx.org/forums/karma.js
The Reply script:
http://www.amxmodx.org/forums/karma_ajax.phps
The Karma API:
http://www.amxmodx.org/forums/karma_api.phps
The SQL Schema:
http://www.amxmodx.org/forums/karma_schema.sql

I'll leave phpBB integration to the implementor because it's annoying, but basically you just add this:
+/-

PS! Beware that "amxx_karma_usage" table gets very big, right now it has 410,000 rows.
Aw man this is awsome!
__________________
lol
eFrigid is offline
Send a message via AIM to eFrigid Send a message via MSN to eFrigid Send a message via Skype™ to eFrigid
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 10-14-2005 , 02:34  
Reply With Quote #25

w00t. thanks bailey .

i'll attempt to make an admin feature for it and of course the viewable ones

[edit] Okay. I'm 1/4 done on it. Making all your files dbal compliant and stuff like that ;).

I even gave you credit in the install.txt file. Haven't made a topic in phpBB's DEV forum yet.

I have a question here.

Code:
`hits` tinyint(3) unsigned NOT NULL default '0',
May I know whats `hits` for?
__________________
Plugins:
none

n0obie4life is offline
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 10-14-2005 , 12:16  
Reply With Quote #26

Hmm, Bail.

Code:
			$sql = "SELECT * 
					FROM amxx_karma_usage 
					WHERE pk_id = $pk 
					AND pv_id = $pv";
			$row = $db->sql_query($sql);
			if (!$db->sql_numrows($row))
			{
				$query = "INSERT INTO amxx_karma_usage VALUES($pk, $pv, 0, 0)";
				$db->sql_query($query);
				return 1;
			}
			$pData= $db->sql_fetchrow($pRes);
			if ($pData['last'] + 86400 >= time() && $pData['hits'] >= 3)
			{
				return 0;
			}
			$affect = 0;
			if ($pData['hits'] == 0 || $pData['last'] + 86400 < time())
			{
				$affect = 1;
			} else {
				$affect = 2;
			}
			$db->sql_freeresult($pRes);
			return $affect;
Why repeat that function? Didn't you check it above? And what is $affect?

lol. Sorry for that "alot" of questions .
__________________
Plugins:
none

n0obie4life is offline
BAILOPAN
Join Date: Jan 2004
Old 10-14-2005 , 15:04  
Reply With Quote #27

They're slightly different and I don't think I wanted to abstract them further.

"Affect" has three values:
0 - You cannot affect
1 - You can affect
2 - You can affect, but it'll hurt you, so display the red warning
__________________
egg
BAILOPAN is offline
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 10-15-2005 , 02:23  
Reply With Quote #28

Quote:
Originally Posted by BAILOPAN
They're slightly different and I don't think I wanted to abstract them further.

"Affect" has three values:
0 - You cannot affect
1 - You can affect
2 - You can affect, but it'll hurt you, so display the red warning
I see. Thanks for telling me. I'll get on with the mod
__________________
Plugins:
none

n0obie4life is offline
Gunny
Senior Member
Join Date: Mar 2004
Location: Magnolia, Texas
Old 02-02-2006 , 16:12  
Reply With Quote #29

This is great but does anyone have a README I can use to install this on my forum.

I am using the latest version phpBB2
__________________
TEAM FORTRESS 2 - 70.85.30.25:27015
COUNTER-STRIKE SOURCE - 70.85.30.22:27015
COUNTER-STRIKE SOURCE DEATH MATCH - 70.85.30.23:27015
Gunny is offline
BAILOPAN
Join Date: Jan 2004
Old 02-02-2006 , 16:40  
Reply With Quote #30

If you read the PM I gave you, it's a custom mod. There's no README, and it's up to the implementor on how to integrate it.
__________________
egg
BAILOPAN is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:00.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode