doddsey_65 Posted February 26, 2011 Share Posted February 26, 2011 im working on a point system for my forum where points are awarded based on actions taken. $scores = array( 'login' => 1, 'editor' => 10 ); so if a user logs in then they will be awarded 1 point, if they edit their post then they get 10 points etc. So in my login process page i process the login then award the points that it is worth with $score['login']. Everything works fine. My problem is that this is a forum package like phpbb and mybb where people download the package and can install their own forum. So i want them to be able to add to the points list. For example the admin chooses to award 10 points for every post that is made. how would i go about implementing this? the points categories would be in the database but what happens in the post processing page when i add the post to the database? how would i know that the admin wants some points awarded? the database would look like so: id title points 1 post 10 but the title can change based on the admins choosing of words. I hope i explained this ok. Quote Link to comment https://forums.phpfreaks.com/topic/228930-point-system/ Share on other sites More sharing options...
doddsey_65 Posted February 28, 2011 Author Share Posted February 28, 2011 any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/228930-point-system/#findComment-1180966 Share on other sites More sharing options...
PaulRyan Posted February 28, 2011 Share Posted February 28, 2011 I can't really think of a way to do this the way you want. The best bet would to have preset ways to award points, such as logging in, posting threads, replies etc. Have the database set-up so it already has the possible options in it, then have the value set to 0 like this: ----------------------------------- | ID | TYPE | POINTS | | 1 | newTopic | 0 | | 2 | newPost | 0 | | 3 | login | 0 | | 4 | another | 0 | | 5 | another | 0 | ----------------------------------- Then allow for the admin to change these in the Admin Area, other than that I wouldn't know. Then when doing any of the actions, check the table to see if they are awarded points, if so then award them that amount of points. Regards, PaulRyan. Quote Link to comment https://forums.phpfreaks.com/topic/228930-point-system/#findComment-1180986 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.