Advanced Reputation System

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

Previous topic - Next topic

Croco

no i mean there are options in the Features and Options

How many points per post?
How many points per thread?

how do they work ?
I am back. I will try to catch up with some stuff soon.
Regards,
Croco

My sites
Andareena.com
Andareen.net(Under Constraction :P)

New plans coming soon


Good links for you to visit:
Docs
Search

Fustrate

It'll give rep points for every post and thread made, if you want it to
Steven Hoffman
Former Team Member, 2009-2012

Croco

ah you mean when someone get points for new topics and posts

ok got it thank you :)
I am back. I will try to catch up with some stuff soon.
Regards,
Croco

My sites
Andareena.com
Andareen.net(Under Constraction :P)

New plans coming soon


Good links for you to visit:
Docs
Search

Croco

another small bug in Display.php


'can_send_karma' => empty($message['is_repped']) && ($user_info['id'] != $message['member']['id']),


should be like this:


'can_send_karma' => empty($message['is_repped']) && ($user_info['id'] != $message['id_member']),


because $message['member'] will give you Undefined index error
I am back. I will try to catch up with some stuff soon.
Regards,
Croco

My sites
Andareena.com
Andareen.net(Under Constraction :P)

New plans coming soon


Good links for you to visit:
Docs
Search

ekfaysal

Hi brother
i m using silent wave theme on my smf 2 version 3
my theme file is using only index.templete.php from silentwave rest of files are used by default by this them

now i have installed mod successfull
nnow when someone click on reputation
it looks like this



then if it click on add reputation like said in this page



then this windows appear in this area.



my point is that the place is empty in every post just look at first picture
Please see and solve my problem


Fustrate

For the "Add Reputation" under the post - make sure  all of the images got uploaded into your theme's image folder.

The huge white space and no popup seems to be a javascript problem. Is there a url I go to to look at this?
Steven Hoffman
Former Team Member, 2009-2012

Croco

another bug and fix to it (RemoveTopic.php)

            while ($rowMembers = $smcFunc['db_fetch_assoc']($requestMembers)){
                updateMemberData($rowMembers['id_member'], array('posts' => 'posts - ' . $rowMembers['posts']));
                if(!$user_info['is_guest'] && $modSettings['karmaValueThread'] > 0){
                    $request = $smcFunc['db_query']('', '
                        UPDATE {db_prefix}members
                        SET karma_good = karma_good - {int:newkarma}
                        WHERE id_member = {int:member}',
                        array(
                            'newkarma' => $modSettings['karmaValueThread'],
                            'member' => $user_info['id']
                        )
                    );
                }
            }


there is no $user_info['id'] you need to use $rowMembers['id_member']
therefore, the code should be like this


            while ($rowMembers = $smcFunc['db_fetch_assoc']($requestMembers)){
                updateMemberData($rowMembers['id_member'], array('posts' => 'posts - ' . $rowMembers['posts']));
                if(!$user_info['is_guest'] && $modSettings['karmaValueThread'] > 0){
                    $request = $smcFunc['db_query']('', '
                        UPDATE {db_prefix}members
                        SET karma_good = karma_good - {int:newkarma}
                        WHERE id_member = {int:member}',
                        array(
                            'newkarma' => $modSettings['karmaValueThread'],
                            'member' => $rowMembers['id_member']
                        )
                    );
                }
            }
I am back. I will try to catch up with some stuff soon.
Regards,
Croco

My sites
Andareena.com
Andareen.net(Under Constraction :P)

New plans coming soon


Good links for you to visit:
Docs
Search

Croco

about this condition same file RemoveTopic.php


if(!$user_info['is_guest'] && $modSettings['karmaValueThread'] > 0){


if you are checking the is_guest you need to add to global $user_info variable
I am back. I will try to catch up with some stuff soon.
Regards,
Croco

My sites
Andareena.com
Andareen.net(Under Constraction :P)

New plans coming soon


Good links for you to visit:
Docs
Search

Croco

for the huge white space you can specify height="0px" and replace the span with a div

also you need to adjust the showhide() javascript function so when hide set height to 0 and when show set to maybe 250px for example (changes are in display.template.php & scripts.js files)
I am back. I will try to catch up with some stuff soon.
Regards,
Croco

My sites
Andareena.com
Andareen.net(Under Constraction :P)

New plans coming soon


Good links for you to visit:
Docs
Search

ekfaysal

Quote from: YodaOfDarkness on April 17, 2008, 02:27:56 AM
For the "Add Reputation" under the post - make sure  all of the images got uploaded into your theme's image folder.

The huge white space and no popup seems to be a javascript problem. Is there a url I go to to look at this?

as i am testing it on  a test forum using easy php on my pc i havnt tried it on my running forum coz i want to test it first so i cant give you any link
please let me know how to add poopup instead of this white space

Fustrate

Quote from: ^_^ on April 15, 2008, 07:47:39 PM

// Find out if this user has done this in the past $longenough.
      $request = $smcFunc['db_query']('', '
         SELECT log_time
         FROM {db_prefix}log_karma
         WHERE id_executor = {int:current_member}
            AND log_time >= {int:waittime}
         LIMIT 1',
         array(
            'current_member' => $user_info['id'],
            'waittime' => $longenough,
         )
      );


i added "id_target = {int:id_target}" to the conditions

so it should be like this

        // Find out if this user has done this in the past $longenough.
        $request = $smcFunc['db_query']('', '
            SELECT log_time
            FROM {db_prefix}log_karma
            WHERE
                id_target = {int:id_target}
                AND id_executor = {int:current_member}
                AND log_time >= {int:waittime}
            LIMIT 1',
            array(
                'current_member' => $user_info['id'],
                'waittime' => $longenough,
                'id_target' => $uid,
            )
        );

Just finished fixing up the code, and I wanted to elaborate on this one. That specific code block checks for whether or not they've done any rep action in the last x amount of time, not just for that specific person. There's another block that handles "can't repeat a person until" checks... it's in there along side all of the other things ;)
Steven Hoffman
Former Team Member, 2009-2012

LiamTheDuck

Im gonna have to wait until my laptop gets fixed (smf 1.1.4 -A.R files are on there)
I am back, its been like a year... so yeah.... how has it been? :D


Hot Rides

Quote from: NIBOGO on April 19, 2008, 08:27:52 PM
Quote from: [●ριмρєя12●] on April 19, 2008, 06:56:33 AM
Im gonna have to wait until my laptop gets fixed (smf 1.1.4 -A.R files are on there)

wow nice work i am expecting your mod , i like to test in my forum :)
waiting as well, just upgarding to 2.0 is not easy. I have spent many hours getting my site ready and just launched. I am not rady to go thru all that again for 1 mod, lol. my g/f is already upset at all the time I have spent on this one.

iceman~

Great mod mate, works nice and no problems or errors uploading.
Just read the entire thread ... but ... this post hasn't been answered

Quote from: waremock on March 25, 2008, 08:47:48 PM
Also can people get credit for their current posts?

Just wanted to know .... what if members already have 500 to 600 post to there credit, would there karma be changed after you install this mod. In other words if you have the per post and per thread feature on would they get credit for the post they have already made. After installing this mod every members karma starts showing zero but there profile still shows there previous karma.

Any help ?

Thanks again mate.
A wise monkey never monkies with another monkey's monkey

Fustrate

#95
GiveReputation.php
Pretty much gives out rep points for posts and threads that were made before you installed this mod. If you're going to use values different than the default (1 per post, 3 per thread), please make those changes in the admin panel before running this script. Also make sure to delete this file after you use it, just in case another of your admins stumbles upon it and executes it (only admins can run it, anyways). One mooooore thing... for large forums, you can bump up the number it does at one time by changing 100 to something else in there.

To use it, just upload it to your forum root and navigate to the file in your browser. You have to be logged in as an admin for this to work, fyi.
Steven Hoffman
Former Team Member, 2009-2012

iceman~

Great YodaOfDarkness ... Will try and get back to you. Would it make the changes in the profile also.
Thanks mate ...
A wise monkey never monkies with another monkey's monkey

Fustrate

Do you mean erase all prior reputation in action=profile;sa=viewKarma? no. For that, you need to go into your database and run this query:
DELETE * FROM `smf_log_karma` WHERE 1=1
replace smf_ with your database prefix.
Steven Hoffman
Former Team Member, 2009-2012

LiamTheDuck

I need to make it up to you guys for the delay (still getting fixed O0 >:( >:D :( :'( )

what do you suggest? :P
I am back, its been like a year... so yeah.... how has it been? :D

PrizeLive.com

Will this work at all on version 1.1.4?
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

Advertisement: