yellow card, and points mod

In fact this as a Image Image Image Image Red/yellow/Green and blue mod, also known as the ban user / repport post to moderator system

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

yellow card, and points mod

Postby Niels on Sun 20. Apr, 2003 20:54

I have recived this per email, from one of my users

yes that's ok now, thanks.

I just wish that now I can make the system to take few points out of the one who gets a warning


This is posible if you find this in the card.php

Code: Select all
//update the warning counter
$sql = 'UPDATE ' . USERS_TABLE . ' SET user_warnings=user_warnings+1 WHERE user_id="'.$poster_id.'"';


change this to something like
Code: Select all
$sql = 'UPDATE ' . USERS_TABLE . ' SET user_warnings=user_warnings+1, user_points=user_points-10 WHERE user_id="'.$poster_id.'"';


This will make users points go 10 less on every warning, I asume the points are stored in a field named users_points - this can be differently depending on the mod you are using, but the principle is the same

you could also consider change the "mouse over" text, witch is displayed while hoover over the yellow card, so moderators (or other witch have permission to give yellow card, know how meny points are removed from the user
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Re: yellow card, and points mod

Postby zak on Sun 20. Apr, 2003 23:47

Great !! I applied it and it is working fine.

thanks Niels !
zak
Poster
Poster
 
Posts: 21
Joined: Mon 24. Mar, 2003 12:41

Postby Dunne on Tue 22. Apr, 2003 15:59

Nice!
Thanks!

I must change: "user_points" to "user_posts" and it works now... :lol:
Dunne
Poster
Poster
 
Posts: 8
Joined: Tue 04. Feb, 2003 07:24

Postby Madsen on Tue 22. Jul, 2003 08:46

I installed it too, works perfect..
Mange hilsner Anakin
- Very funny Scotty! Now beam down my clothes!
- Generals Zero Hour 628:1
Madsen
Poster
Poster
 
Posts: 19
Joined: Sat 19. Jul, 2003 21:53
Location: Holstebro, Denmark

Postby joncurtis199 on Mon 25. Aug, 2003 22:06

does this work with the cash mod?
joncurtis199
Poster
Poster
 
Posts: 9
Joined: Mon 25. Aug, 2003 19:12

Postby Niels on Tue 26. Aug, 2003 23:46

I am not aware of how the cash mod works, but asuming the "cash" is storred in something like "user_cash", so you should replace the user_points with user_cash in above mentioned code
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby joncurtis199 on Tue 26. Aug, 2003 23:48

its strange the field (checked in mySQL) is user_karma but it doesnt work. I guess its not compatible or something
joncurtis199
Poster
Poster
 
Posts: 9
Joined: Mon 25. Aug, 2003 19:12

Postby Niels on Sun 21. Sep, 2003 21:08

I asume you change it to
Code: Select all
$sql = 'UPDATE ' . USERS_TABLE . ' SET user_warnings=user_warnings+1, user_karma=user_karma-10 WHERE user_id="'.$poster_id.'"';
it should not be a "compability" problem
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Next

Return to Yellow card [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron