Browse files

Abstracted more values out of comments.pl so that simple changes in

slashdotrc.pl are all that will be needed rather than messing with
code.

More of this will be done with metamod.pl when I can finally start
working on it.

Added to slashdotrc.pl: goodkarma_limit, badkarma_limit
  • Loading branch information...
1 parent 142dcdd commit fbd1e407dfe50e41c9966ee7022cebedafd57d12 @Xliff Xliff committed Jun 23, 2000
Showing with 6 additions and 4 deletions.
  1. +2 −2 public_html/comments.pl
  2. +2 −0 slashdotrc.pl
  3. +2 −2 themes/slashcode/htdocs/comments.pl
View
4 public_html/comments.pl
@@ -650,8 +650,8 @@ sub submitComment {
if($I{U}{uid} > 0 && !$I{F}{postanon} ) {
$pts = $I{U}{defaultpoints};
- $pts-- if $I{U}{karma} < -10;
- $pts++ if $I{U}{karma} > 25 and !$I{F}{nobonus};
+ $pts-- if $I{U}{karma} < $I{badkarma_limit};
+ $pts++ if $I{U}{karma} > $I{goodkarma_limit} and !$I{F}{nobonus};
# Enforce proper ranges on comment points.
$pts = $I{comment_minscore} if $pts < $I{comment_minscore};
$pts = $I{comment_maxscore} if $pts > $I{comment_maxscore};
View
2 slashdotrc.pl
@@ -76,6 +76,8 @@
authors_unlimited => 1, # authors have unlimited moderation
comment_minscore => -1, # Minimum score for a specific comment.
comment_maxscore => 5, # Maximum score for a specific comment.
+ goodkarma_limit => 25, # Users get bonus points for posts if karma above this value
+ badkarma_limit => -10, # Users get penalized for posts if karma is below this value
metamod_sum => 3, # sum of moderations 1 for release
maxtokens => 40, # Token threshold that must be hit to get any points
tokensperpoint => 8, # Number of tokens per point
View
4 themes/slashcode/htdocs/comments.pl
@@ -650,8 +650,8 @@ sub submitComment {
if($I{U}{uid} > 0 && !$I{F}{postanon} ) {
$pts = $I{U}{defaultpoints};
- $pts-- if $I{U}{karma} < -10;
- $pts++ if $I{U}{karma} > 25 and !$I{F}{nobonus};
+ $pts-- if $I{U}{karma} < $I{badkarma_limit};
+ $pts++ if $I{U}{karma} > $I{goodkarma_limit} and !$I{F}{nobonus};
# Enforce proper ranges on comment points.
$pts = $I{comment_minscore} if $pts < $I{comment_minscore};
$pts = $I{comment_maxscore} if $pts > $I{comment_maxscore};

0 comments on commit fbd1e40

Please sign in to comment.