[MODDB] Karma MOD

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Ideas Centre
Locked
User avatar
sixtvs
Registered User
Posts: 215
Joined: Thu Feb 14, 2008 8:39 am
Location: Virginia Beach, VA
Contact:

Re: [BETA] Karma MOD

Post by sixtvs »

peterspliid wrote:I still cant find a solution

I have looked through this thread, but no answer :(
Here, scroll towards the middle, posted by ***Blaze***:
http://www.phpbb.com/community/viewtopi ... &start=420
People sleep peacefully at night only because rough men stand ready to fight for them!
lance.johnsn
Registered User
Posts: 3
Joined: Fri Feb 29, 2008 1:13 am
Location: San Francisco

Re: [BETA] Karma MOD

Post by lance.johnsn »

peterspliid wrote:I get this error when I've edited all files :(
Parse error: syntax error, unexpected ')' in /www/110mb.com/s/t/u/n/t/-/l/a/stunt-landia/htdocs/forum/includes/functions_karma.php on line 623
I saw this as well it is due to a missing ":"

Code: Select all

(($forum_id) ? "f=$forum_id&")
should be

Code: Select all

(($forum_id) ? "f=$forum_id&" : '')
User avatar
sixtvs
Registered User
Posts: 215
Joined: Thu Feb 14, 2008 8:39 am
Location: Virginia Beach, VA
Contact:

Re: [BETA] Karma MOD

Post by sixtvs »

I installed the MOD, no problems other than:

1. The increase/decrease/Karma is not showing up on the user's profile in the forum, but its showing up on the user's profile
2. I shifted the profiles to the left, and now I have nothing.

Anyone have any ideas please?
People sleep peacefully at night only because rough men stand ready to fight for them!
lance.johnsn
Registered User
Posts: 3
Joined: Fri Feb 29, 2008 1:13 am
Location: San Francisco

Re: [BETA] Karma MOD

Post by lance.johnsn »

Got everything working. Tested lowering a karma from a karma of zero and the following error occured:

Code: Select all

SQL ERROR [ postgres ]

ERROR: division by zero []

SQL

UPDATE phpbb_posts SET post_karma = post_karma - 1, post_karma_powered = post_karma_powered - 5, post_karma_count = post_karma_count + 1, post_karma_search = (post_karma / post_karma_count), post_karma_search_powered = (post_karma_powered / post_karma_count) WHERE post_id = 29

BACKTRACE


FILE: includes/db/postgres.php
LINE: 177
CALL: dbal->sql_error()

FILE: includes/functions_karma.php
LINE: 456
CALL: dbal_postgres->sql_query()

FILE: karma.php
LINE: 614
CALL: karmamod->submit_karma()

User avatar
Tripp
Former Team Member
Posts: 1358
Joined: Sun May 20, 2007 5:14 am
Location: G'boro, North Carolina
Name: Tripp
Contact:

Re: [BETA] Karma MOD

Post by Tripp »

Yeah, yo ucan't have negative karma.
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs
lance.johnsn
Registered User
Posts: 3
Joined: Fri Feb 29, 2008 1:13 am
Location: San Francisco

Re: [BETA] Karma MOD

Post by lance.johnsn »

Drugs wrote:Yeah, yo ucan't have negative karma.
which makes sense theoretically. currently the code allows one to get into this state though.
Toffmonster
Registered User
Posts: 37
Joined: Sat Mar 01, 2008 7:23 am

Re: [BETA] Karma MOD

Post by Toffmonster »

Hello.
I've installed this mod on Gold and everything works fine, but the problem is, I can see only two karma comments per page regardless of the setting in the ACP. Total comments value is correct, but the ones displayed are always two last comments, and it always says "Page 1 of 1", so I can't view older comments.
Did I screw up anything? Does anyone know how to fix this?
Thank you.
blauesblut
Registered User
Posts: 42
Joined: Sat Jan 12, 2008 3:25 pm

Re: [BETA] Karma MOD

Post by blauesblut »

hello
i just get error

Parse error: syntax error, unexpected ')' in /kunden/186895_27753/phpBB3/includes/functions_karma.php on line 623

please help me :x
User avatar
Tripp
Former Team Member
Posts: 1358
Joined: Sun May 20, 2007 5:14 am
Location: G'boro, North Carolina
Name: Tripp
Contact:

Re: [BETA] Karma MOD

Post by Tripp »

blauesblut wrote:hello
i just get error

Parse error: syntax error, unexpected ')' in /kunden/186895_27753/phpBB3/includes/functions_karma.php on line 623

please help me :x
Please try searching a few posts first.
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs
blauesblut
Registered User
Posts: 42
Joined: Sat Jan 12, 2008 3:25 pm

Re: [BETA] Karma MOD

Post by blauesblut »

Drugs wrote:
blauesblut wrote:hello
i just get error

Parse error: syntax error, unexpected ')' in /kunden/186895_27753/phpBB3/includes/functions_karma.php on line 623

please help me :x
Please try searching a few posts first.
did someone have the same problem?
User avatar
Tripp
Former Team Member
Posts: 1358
Joined: Sun May 20, 2007 5:14 am
Location: G'boro, North Carolina
Name: Tripp
Contact:

Re: [BETA] Karma MOD

Post by Tripp »

Yes...search back 1-3 pages and there's a link to the fix.
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs
Surf007
Registered User
Posts: 141
Joined: Wed Jun 20, 2007 1:16 pm

Re: [BETA] Karma MOD

Post by Surf007 »

search gives this error

Parse error: parse error, unexpected T_VARIABLE, expecting ')' in /home/content/p/r/a/prateekgupta/html/desi-tadka/search.php on line 79
=D_17
Registered User
Posts: 7
Joined: Thu Feb 28, 2008 7:36 pm

Re: [BETA] Karma MOD

Post by =D_17 »

Is it possible to allow a custom profile field if the user have XX Karma-Points ?
And if it is possible, how to do it ?

=D_17
odriego
Registered User
Posts: 158
Joined: Sat Jan 05, 2008 2:25 pm

Re: [BETA] Karma MOD

Post by odriego »

How is it going with this mod? Do you release a stable version yet? :D

Im looking forvard to it!
RobSkelton
Registered User
Posts: 4
Joined: Thu Jan 26, 2006 2:00 am

Re: [BETA] Karma MOD

Post by RobSkelton »

Regarding the inability to give karma to friends or foes, which is a feature.

I'm not a fan of it, and so when I couldn't find a way of changing it anywhere, I went to karma.php and removed the code from lines 463 to 475:

Code: Select all

		// Is this user friend/foe?
		if ($zebra_enabled)
		{
			$sql = 'SELECT *
				FROM ' . ZEBRA_TABLE . '
				WHERE user_id = ' . (int) $user->data['user_id'] . "
					AND zebra_id = $user_id";
			$result = $db->sql_query($sql);
			if ($row = $db->sql_fetchrow($result))
			{
				trigger_error('KARMA_CAN_NOT_KARMA_ZEBRA');
			}
		}
And my board now lets users give karma to friends or foes.

VERY IMPORTANT: I know nothing about php at all, so I accept no responsibility for if this change wrecks anything. All I did was search the main file for the word foe. I have no understanding of how that code works, or what it does, other than the clue in the comment line
2012Forum.com
Locked

Return to “[3.0.x] MODs in Development”