Author Topic: Points per word?  (Read 3538 times)

Offline nathan42100

Points per word?
« on: November 09, 2006, 06:23:23 am »
Is it possible to make this points per word rather than points per post? My forum rewards for longer posts (www.psp-programming.com) such as a tutorial. :uglystupid2: :crazy2:

Offline matkins70

Re: Points per word?
« Reply #1 on: November 09, 2006, 06:36:58 am »
A common request, its not actually implemented at the moment.  Basil or Daniel15 might be able to steer you in the right direction, but i believe they haven't actually used this method before.

Offline nathan42100

Re: Points per word?
« Reply #2 on: November 09, 2006, 09:31:38 am »
Now its time to play the waiting game...

Offline matkins70

Re: Points per word?
« Reply #3 on: November 09, 2006, 07:31:47 pm »
Well daniel15 has got exams coming up, dunno where Basil is

Offline Basil Beard

Re: Points per word?
« Reply #4 on: November 10, 2006, 09:38:11 am »
Use the implode($string) function to turn the post string into an array.
Then use the count($array) function to count the number of elements in an array.
That gives you the number of words. From there, you can apply your formula and be happy.
Arrrrr!

Offline Daniel15

Re: Points per word?
« Reply #5 on: November 10, 2006, 12:59:34 pm »
Quote
Use the implode($string) function to turn the post string into an array.
Then use the count($array) function to count the number of elements in an array.
That gives you the number of words. From there, you can apply your formula and be happy.
I'd just count the number of spaces in the message, using substr_count ;) An even easier approach would be to count the number of characters instead.
Of course, an upper limit should apply, otherwise people will just post junk to get more points :P

Quote
Well daniel15 has got exams coming up
Well, 4 done, and 4 more to do next week ;)

Offline Basil Beard

Re: Points per word?
« Reply #6 on: November 11, 2006, 12:58:09 pm »
But thats lame =P. Plus, someone could post alot of spaces. I don't know how implode works(I think you need to give it a string, and a substring to "implode" on), but you would be able to set it to implode on words. Which would fix the problem.

And yeah, when doing this, be very sure your memebers dont just post just and then edit their posts down to normal size. 
Arrrrr!