News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Advanced Reputation System

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

Previous topic - Next topic

N i g h t m a r e

Labradoodle-360 ,can you come to my forum and help me fix everything?
i need help getting this code away: function reputation_action(&$actionArray) { $actionArray['reputation'] = array('Karma.php', 'SendKarma'); }

and all the images and stuff fixed back to normal

hcfwesker

#2421
Quote from: -♦-Zeum-♦- on October 28, 2012, 04:46:21 PM
so i installed the "Advanced Reputation System" mod and now i have this code at the bottom of my forum:

function reputation_action(&$actionArray) { $actionArray['reputation'] = array('Karma.php', 'SendKarma'); }

From my guess you have accidentally pasted the code to a file at the very bottom.  that's why it's appearing.

Since it appears on every page of your forum , Check these files. 

index.php in the root folder
Sources/Load.php

Sources/Subs.php
Themes/(Theme name)/index.template.php
Themes/(Theme name)/languages/modifications.english.php (english or whatever language you use)

scroll to the very bottom of these files and see if that code appears after the ?> at the bottom.

EDIT::

Clicking View source on your forum I see this towards the bottom.

</body></html>function reputation_action(&$actionArray)
{
$actionArray['reputation'] = array('Karma.php', 'SendKarma');
}


check index.template.php or index.php  If you manually did these edits then you either did it wrong, did it on the wrong file, or both.

Also

QuoteMost Online Today: 1. Most Online Ever: 988,945,275,323 (November 02, 2012, 10:55:45 AM)
LOL!  You really expect people to believe that almost a trillion people viewed your website at the same exact time.



N i g h t m a r e

i didnt do anything to put that code there,it just appeared when i installed the mod :l

&& that was on accident,now i can't change it back to 1 lol

SirSacrifyx

#2423
Does anyone know of a way to get rep comments to show up at the bottom of the posts they're attributed to? Basically putting some of the same info you would get when viewing from your profile into the post itself: the user who gave the rep, the pos or neg icon, and the comment.

rizkirprod

working fine on SMF 2.0.2 with manual installation
great mod, thanks

LP

Quote from: mnmlt on April 12, 2011, 03:49:21 AM
Hi everyone, After installing advance reputation, everything works for the mod however I keep get an undefined error.


Today at 10:16:40 AMType of error: Undefined

http://www.indigoroots.com/index.php?action=profile;area=reputation;u=7
e
8: Undefined variable: num_given

File: /home/indigoro/public_html/Sources/Profile-View.php
Line: 2119


My guess is that the error is something limiting my pages to 1 whenever user is viewing their reputation via profile info, anyone can help me on this?

Something similar is :

when viewing a user profile and log karma

error
http://.../index.php?action=profile;area=reputation;u=12

8: Undefined variable: num_given

Файл: ........./www/Sources/Profile-View.php
line: 2119
2115:      list ($total_actions) = $smcFunc['db_fetch_row']($request);
2116:      $smcFunc['db_free_result']($request);
2117:   
2118:      // Construct the page index
==>2119:      $context['page_index'] = constructPageIndex($scripturl . '?action=reputation', $_REQUEST['start'], $num_given, 50);


Can anyone help me on this? Or can I know if this is fatal or harmful to the forum?

I'm using SMF 2.0 RC 5 and Theme is Actualism by Crip.

Thanks in advance!

I've had this same error.  It occurs when you "View Reputation" in the profile of any member.

For anyone else that comes across this problem and wants to do something about it, it is an easy fix.  Replace "$num_given" with "$total_actions" in this line of Profile-View.php:
$context['page_index'] = constructPageIndex($scripturl . '?action=reputation', $_REQUEST['start'], $num_given, 50);

novill

Quote from: LP on November 15, 2012, 12:26:01 PM
I've had this same error.  It occurs when you "View Reputation" in the profile of any member.

For anyone else that comes across this problem and wants to do something about it, it is an easy fix.  Replace "$num_given" with "$total_actions" in this line of Profile-View.php:
$context['page_index'] = constructPageIndex($scripturl . '?action=reputation', $_REQUEST['start'], $num_given, 50);

With this solution is just one problem. When i modify the Profile-View.php with this solution.
In the error log in no more error when a member looks the profile reputation, but when a member has lot of reputation points than is showing up the scroll bar. When i look the second page, than i get a new error.


http://*******.forum.hu/index.php?action=reputation;start=502: Division by zeroFájl: /*******.forum.hu/Sources/Subs.php
Line: 716


Example pictures attached.

LP

Quote from: novill on November 16, 2012, 04:10:05 AM
Quote from: LP on November 15, 2012, 12:26:01 PM
I've had this same error.  It occurs when you "View Reputation" in the profile of any member.

For anyone else that comes across this problem and wants to do something about it, it is an easy fix.  Replace "$num_given" with "$total_actions" in this line of Profile-View.php:
$context['page_index'] = constructPageIndex($scripturl . '?action=reputation', $_REQUEST['start'], $num_given, 50);

With this solution is just one problem. When i modify the Profile-View.php with this solution.
In the error log in no more error when a member looks the profile reputation, but when a member has lot of reputation points than is showing up the scroll bar. When i look the second page, than i get a new error.


http://*******.forum.hu/index.php?action=reputation;start=502: Division by zeroFájl: /*******.forum.hu/Sources/Subs.php
Line: 716


Example pictures attached.


Yes, you are right.  My edits above completely screwed things up, wish I could delete that post now. 

I can't figure out exactly what was originally intended to happen in that line of code by the programmer, but I changed my last line of Profile-View.php to this and it works for my forum now with no errors at all:
$context['page_index'] = constructPageIndex($scripturl . '?action=profile;area=reputation;u='.$memID, $_REQUEST['start'], $total_actions, $amount);

Warning: I am an amateur and you make this change at your own risk.  Making this or any other changes to this modification's code will result in a failure of the package to uninstall (except by manual means) if you should wish to do so.

Robertjones6

i uploaded the mod and it didnt have the images, so i manually installed the images and tested it and it takes you to the agree/disagree & comment screen but then it doesnt work when confirming it

here is my forums

www.assentedorder.com/forums

twinklewitch

Love this mod, but was wondering if I could remove the line "reputation power: " on the post/topics pages. I only want the bar to show, I have no need for this line. Thanks!

enen92

I've just installed this mod and it's not working. In the admin section I get this error in the top of the forum (I am using the default curve theme):

Quote/* What's this? LOLz I DonT NO wUT UR tAlkING 'bout. $helptxt['karmaSendPMContents'] = 'In addition to BBC and smileys being allowed in the PM, there are a built-in few variables that can be used in the PM which will automatically be substituted with the appropriate information. These are:
Variable ->   Value
{sender}   The sender\'s display name
{posneg}   Depending on which it is, "positive" or "negative"
{receiever}   The receiver\'s display name
{comment}   The reputation comment left by {sender}
';*/// Advanced Reputation System $txt['karmaBarPower'] = 'Users gain 1 power for every __ points?
Default 100'; $txt['karmaBarPoints'] = 'Users gain 1 bar image for every __ points?
Default 1000'; $txt['karmaDescriptions'] = 'Reputation descriptions - one per line!
These are the text that appears when you hover over a bar image.'; $txt['karmaDisabledDescription'] = 'Description for members who disable their reputation display.'; $txt['karmaNegativeDescription'] = 'Description for members who have negative reputation.'; $txt['karmaValuePost'] = 'How many points per post?'; $txt['karmaValueThread'] = 'How many points per thread?'; $txt['karmaRegistration'] = 'Welcome new members with how many points?'; $txt['karmaBirthday'] = 'Surprise a member with how many points on their birthday?'; $txt['karmaSpreadAround'] = 'How many people does a user have to give reputation to before they can repeat a person?'; $txt['karmaMaxPerDay'] = 'How many times a day can a person give reputation?'; /* To be used later... :P $txt['karmaSendPM'] = 'Send a PM when a user receives reputation?'; $txt['karmaSendPMContents'] = 'What should the reputation PM say?'; */ $txt['karma_settings_desc'] = 'Reputation Points: The individual points that are received when a user makes a post, creates a thread, or is given reputation by another user.

Reputation Power: The strength with which a person can give another member reputation. A member with a reputation power of 0 will not affect another user\'s reputation at all.';/* What's this? LOLz I DonT NO wUT UR tAlkING 'bout. $helptxt['karmaSendPMContents'] = 'In addition to BBC and smileys being allowed in the PM, there are a built-in few variables that can be used in the PM which will automatically be substituted with the appropriate information. These are:
Variable ->   Value
{sender}   The sender\'s display name
{posneg}   Depending on which it is, "positive" or "negative"
{receiever}   The receiver\'s display name
{comment}   The reputation comment left by {sender}
';*/

Does anyone have a hint of what can be causing it?

Matthew K.

There was a problem in your language file from the looks of it. Check ./Themes/default/languages/Modifications.english.php and make sure that ?> is on the very last line, and not before Advanced Reputation System's language strings.

enen92

Quote from: Labradoodle-360 on February 07, 2013, 08:58:07 PM
There was a problem in your language file from the looks of it. Check ./Themes/default/languages/Modifications.english.php and make sure that ?> is on the very last line, and not before Advanced Reputation System's language strings.

Thanks. Very noob question: Can I modify it from the admin panel (without accessing the file from the server)?

Matthew K.

You are not able to modify the language files via the SMF Admin Panel, no, sorry.

faran100

How to increase Rep power with every reputaion?
i didn't find this setting
thanks

4LP3RUZ1

you really dont wanna do that unless you want like people with 1 billion rep after about a month :)
Frozen frogs are back :(

d_ace_shines

#2436
hello
I use this mod, and I dont know why but the "How many times a day can a person give reputation?" setting didn't do a thing. Even if i set it to 3 or other numbers, members still able to add reputations without  limit.
The "How many people does a user have to give reputation to before they can repeat a person?" is still working though.
How to fix this?
thanks for your help

edit: the only value that work is if I set  "How many times a day can a person give reputation?" to 1

chq

Quote from: Zarquad on August 12, 2012, 10:07:15 PM
I installed this mod, and enabled reputation. But when I tried to give somebody a reputation, I got this:
An Error Has Occurred!
Session verification failed. Please try logging out and back in again, and then try again.

Can anyone help?

I, too, am getting this error when attempting my first rep. I'm running 2.0.4 and have these packages installed:

1.     SMF 2.0.3 Update    1.0    
2.    Ohara YouTube Embed    1.0    
3.    SMF 2.0.4 Update    1.0    
4.    Advanced Reputation System    1.8.3

Any suggestions how to make this work?

I'd REALLY appreciate it!!


In my error logs it says the two errors I'm getting are:

8: Undefined variable: context
Apply Filter: Only show the errors from this file
File: /home/mysite/public_html/forum/Sources/Karma.php
Line: 215

8: Undefined variable: num_given
Apply Filter: Only show the errors from this file
File: /home/mysite/public_html/forum/Sources/Profile-View.php
Line: 2108

Matthew K.

I'd have to look into the second error - but it should be as easy as: global $num_given; and global $context; (for the first one) at the top of both of those functions.

Scareface


Advertisement: