Advanced Reputation System

Started by Fustrate, March 25, 2008, 12:51:10 PM

Previous topic - Next topic

Fustrate

linkgamer3: Yes, I'll have to look at the code to tell you.

NEMINI: I currently have no plans for the second part, but I might look into it in the future. The first part is already how this works... your power eventually goes up as you get more points from other people. Make sure a few people have somewhere from 100 to 10,000 points and that will jump start it.
Steven Hoffman
Former Team Member, 2009-2012

ʟink

Obedire est vivere, Vivere est obedire


ʟink

I figured out a solution to making power only cosmetic.
./Sources/Karma.php
Find:

if($karma_which == 'karma_good')
$request = $smcFunc['db_query']('', '
UPDATE {db_prefix}members
SET karma_good = karma_good + {int:power}
WHERE id_member = {int:uid}',
array(
'power' => $power,
'uid' => $uid,
)
);

Replace with:

if($karma_which == 'karma_good')
$request = $smcFunc['db_query']('', '
UPDATE {db_prefix}members
SET karma_good = karma_good + {int:power}
WHERE id_member = {int:uid}',
array(
'power' => 1,
'uid' => $uid,
)
);

Find:

else
$request = $smcFunc['db_query']('', '
UPDATE {db_prefix}members
SET karma_bad = karma_bad + {int:power}
WHERE id_member = {int:uid}',
array(
'power' => 1,
'uid' => $uid,
)
);

Replace with:

else
$request = $smcFunc['db_query']('', '
UPDATE {db_prefix}members
SET karma_bad = karma_bad + {int:power}
WHERE id_member = {int:uid}',
array(
'power' => 1,
'uid' => $uid,
)
);

Hope this is useful!
Obedire est vivere, Vivere est obedire


Quexinos

This mod is truly amazing and totally worth SMF alone.

Here's the thing, I'm sorry to be a total bother but I did the thing to install on all themes, but... it shows their reputation amount but there's no heart, just
QuoteReputation: 0
[approve] [disapprove]
Posts: 8
and the approve and disapprove don't work right obviously.

Anyway I'm sure you've said it a million times but this thread is HUGE, can you show me where to get the instructions to install on all themes?  I'm using a modification of this theme if it helps:
http://custom.simplemachines.org/themes/index.php?lemma=1257

Thanks.
It works awesome on the default theme. 

BTW if all I have to do is add these changes to the files in my custom skin, I can do that:
http://custom.simplemachines.org/mods/index.php?action=parse
The problem was I tried it before with a different mod and it didn't go so well.

Hot Rides

Quote from: Quexinos on January 20, 2009, 06:37:58 AM
This mod is truly amazing and totally worth SMF alone.

Here's the thing, I'm sorry to be a total bother but I did the thing to install on all themes, but... it shows their reputation amount but there's no heart, just
QuoteReputation: 0
[approve] [disapprove]
Posts: 8
and the approve and disapprove don't work right obviously.

Anyway I'm sure you've said it a million times but this thread is HUGE, can you show me where to get the instructions to install on all themes?  I'm using a modification of this theme if it helps:
http://custom.simplemachines.org/themes/index.php?lemma=1257

Thanks.
It works awesome on the default theme. 

BTW if all I have to do is add these changes to the files in my custom skin, I can do that:
http://custom.simplemachines.org/mods/index.php?action=parse
The problem was I tried it before with a different mod and it didn't go so well.
any change made to the default theme should be made to the corresponding files in your custom theme, its not that difficult, I managed to do it

lepard

Can we expect a version compatible with 2.0 RC1 anytime soon?
Rick Lepard

Careful of the simple police

Fustrate

I've got 1 more edit to fix for RC1 (it's a regular expression one, which there's 0 documentation/examples for) and then I'll test it (http://www.fustrate.com/dev/rep/ if you'd like to participate) and hopefully release it along with the public release of RC1 in a week or two.

Oh, and the regexps are for the theme edits that have caused so much trouble... you won't be able to do them by hand anymore, but that shouldn't matter if I get it right this time.
Steven Hoffman
Former Team Member, 2009-2012

Quexinos

Quote from: Hot Rides on January 20, 2009, 11:09:58 AM

any change made to the default theme should be made to the corresponding files in your custom theme, its not that difficult, I managed to do it
Okay that's all I needed to know, thanks.  It shouldn't be a problem, I've done this before I just didn't want to go making a bunch of changes if it wasn't necessary.   ;)

Quexinos

This rep system is made of pure win.  The install went just fine, no problems. 

I do have one question though, is it possible to make it so that there's more than one description for someone with negative points?  Like how it is for the positive ones?  Also is it possible to set when the positive ones come into effect or is it just every 1000 or whatever?

Thanks.  Sorry if it was asked before.

Fustrate

In the admin panel, change the rep bars value from 1000 to whatever you'd like it to be (every 200 points, every 47, etc.)

There aren't multiple descriptions for negative, though. That's something that isn't possible with the current code.
Steven Hoffman
Former Team Member, 2009-2012

Quexinos

All right thanks, is multiple descriptions for negative anything you think you might add?  Not saying you should just wondering if I should check back for it.  and about the bars, I was asking if you can make it like, you reach the first one at 47 but the next one at 103 or something.  I dunno why I want that though, it's kind of weird now that I think about it.  Never mind.   :-X

Fustrate

Steven Hoffman
Former Team Member, 2009-2012

Quexinos

That's okay, it's good the way it is, sorry. 

One more quick question though, I have it set so that users gain a bar every 500... but it seems to be doing it every 1000 regardless.  Is there something else I have to do?


Disregard that, it's working just fine.  My bad.

Mythers

Hey !

I'm using Midnight sun theme on my forum, 2.0 beta 4. And, whenever i install this mod, instead of the images that should be their, theres just text. Like: There is supposed to be a [Rep] button their, but instead it just says: Rep

Anyone that can help me out here ?

Fustrate

did the images get uploaded to the Midnight Sun theme /images/ folder?
Steven Hoffman
Former Team Member, 2009-2012

Mythers

Quote from: YodaOfDarkness on January 23, 2009, 06:27:15 PM
did the images get uploaded to the Midnight Sun theme /images/ folder?

No, but i did it manually, and still didn't show no images =/


Fustrate

Mythers - open /Themes/(midnight sun's name)/Display.template.php and search for the word "pos_rep". Is it there?

KadirX - there are no plans for a 1.1.7 version at this time.
Steven Hoffman
Former Team Member, 2009-2012

Mythers

I've changed theme instead since their was alot of mods not working with the theme.

Anyways, now i've got another error when i try to add rep:
QuoteAn Error Has Occurred!
Session verification failed. Please try logging out and back in again, and then try again.

I've tried to relog at least 5 times, and still isn't working.

Justass00

Quote from: Mythers on January 24, 2009, 06:58:10 AM
I've changed theme instead since their was alot of mods not working with the theme.

Anyways, now i've got another error when i try to add rep:
QuoteAn Error Has Occurred!
Session verification failed. Please try logging out and back in again, and then try again.

I've tried to relog at least 5 times, and still isn't working.
I have the same problem with this mod too.. Tried deleting cookies, clearing browser/forum caches.. Nothing helps...

Advertisement: