Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Website And Forum "points" System, Is there a way to make a Point system?
Trojan
post Jul 11 2005, 07:39 PM
Post #1


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 39
Joined: 12-June 05
From: Anywhere you can be on the web.
Member No.: 6,112



Hi.

I know there's a lot of forums that use things such as Credits, Points etc. that people gain in different ways and can be used for rewards such as hosting, Additional Permissions, etc.

Well, I want to know if there is a simple way to make a Point System similar to this, but works on Websites as well as forums and can be gained or lost by visiting certain pages, making posts, or (maybe) playing games. What is more, while you are on the website youcan always see the points you have at a certan place on the page.

Is there a way of doing this? A thing like this would really boost my website!

Thanks in advance,
-Trojan
Go to the top of the page
 
+Quote Post
Herenvardo
post Jul 11 2005, 09:56 PM
Post #2


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 11
Joined: 8-June 05
From: Bad English
Member No.: 5,975
myCENTs:93.92



There is a way to do what you want with a bit of scripting, assuming you don't need too great security features.
I'll assume some points before starting explanation:
- You should already have a system on your site to track user identification: that is, you need a working 'login' box.
- Even it can also be done using database technologies, i'll give you the easiest way to implement it.
- I'll supose that your site has a server-side scripting technologie such as PHP, ASP or so. I'll also supose that you know the basics about each of them.
Most server side scripting technologies feature file-in/out methods. We may use this methods and some handmade data files to avoid use of databases in simple aplications. The simplest way to implement a points system is to create a folder, named something like 'users' and put a ***.dat or ***.points (or something like that) file for each user do you have, where *** is the user-name/login-name/id or even the email address. Once done that, you'll need to do the following:
- Write a function new_user(username) that creates a username.dat file with '0' as it's only content.
- Write a function get_points(username) that reads the file username.dat and returns its content.
- Write a function set_points(username, points) that sets the content of username.dat to 'points'.
Once you have these functions, you have a 'kernel' for your point system. Then you need a interface, that depends mainly on the use and administration you'll gona apply to this system. For example, you may create a form called 'grant points' that, in adition to login data (to ensure that user is allowed to grant points) gets a username and an amount of points.
Let's assume this example:
CODE
<form name='addpointfrm' action='grantpoints.php'>
Admin log: <input id='admin_log' type='textbox'><br>
Admin password: <input id='admin_pwd' type='password'><br>
Target user log:<input id='user' type='textbox'><br>
Amount of points:<input id='points' type='textbox'><br>
<input id='send' type='submit'>
</form>

Then your grantpoints.php should have a fragment like this:
CODE
// ...
set_points($username, get_points($username)+addpointfrm.points);
// ...

Please note that these are generic examples. Exact codification varies upon technology and even version used on a site. If you post some more details about in wich environment do you run your site and what do you pretend to do, then I'll be able to give you more 'final' code.

Hoping be useful,
Herenvardo, Freakiest among the freaks biggrin.gif
Go to the top of the page
 
+Quote Post
Trojan
post Jul 12 2005, 04:14 PM
Post #3


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 39
Joined: 12-June 05
From: Anywhere you can be on the web.
Member No.: 6,112



That's just the thing, I have three problems there-

1. I don't have Server Side Includes (yes, I do know what they are)
2. All my logging in features (except on my forum) are done using JavaScript, so I don't know if they'd be compatible,
3. I know very little about SSI or their scripting techniques.

...But then again, moving to Astahost should solve the first two problems...

And when I say I know very little about SSI, the only thing I really do understand is how to make a .htaccess file, and how to make custom error pages using it.
Go to the top of the page
 
+Quote Post
Trojan
post Jul 12 2005, 04:20 PM
Post #4


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 39
Joined: 12-June 05
From: Anywhere you can be on the web.
Member No.: 6,112



Right now I'm predicting on the next post being something like "Well you're stuck there, Trojan". I just hope that's not the case...
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. How To Set Up Invitation Only Forum?(6)
  2. Best Way To Promote A Website?(38)
  3. World's Smallest Website(71)
  4. Which Is Your Coolest Website Ever ?(11)
  5. Need Help To Install Live Web Cam On My Site(3)
  6. Don't Click It Website!(17)
  7. Search Engine Website - What Makes Them Famous ?(8)
  8. Meteor Strike Caught On Video ( Clips Website )(9)
  9. Chinese Student Jailed 10 Years For A Website(24)
  10. Looking For Advice.... Should I Change My Website?(8)
  11. Want To Create A Community Website(4)
  12. Free Domain Website!(11)
  13. Links: Free Stuffs Needed For Webmasters!(15)
  14. Selling Website Templates/layouts(10)
  15. Forum Software(6)
  1. Worst Website In History(29)
  2. Another Website Experiencing Problems(4)
  3. I Think One Of The Most Difficult To Srart A Website Is Chossing The Host(9)
  4. Website Directory !(3)
  5. Xistos Qupis Website Issue(8)
  6. Register In Our Forum(0)
  7. Making A Website Easily(7)
  8. Have You Ever...?(17)
  9. Trouble With Opera Website Or Me?(7)
  10. Bulding New Website(7)
  11. How To Drive Traffic To A Forum(3)
  12. Short Url For Your Website(12)
  13. Why Turkey Could Not Open The Website From China?(5)


 



- Lo-Fi Version Time is now: 5th December 2008 - 02:49 PM