The Forum Shop has been balanced

Started by Legend, Feb 19, 2015, 06:50 AM

0 Members and 1 Guest are viewing this topic.

Xbro

Quote from: Legend on Feb 24, 2015, 06:36 AM
Yeah they are ints, but view counts and thread credits could be calculated daily in order to get around that.

Which is what I was thinking as well. I just didn't know if it was ideal to wait to award the points.

Do you have a database for the forum?
3 people like this

Legend

Quote from: Xbro on Feb 24, 2015, 06:48 AM
Which is what I was thinking as well. I just didn't know if it was ideal to wait to award the points.

Do you have a database for the forum?

Yeah I have a database and full access to everything.

BasilZero

Quote from: Legend on Feb 24, 2015, 04:34 AM
I gave you some! :)

woman...........plz
Spoiler for Hidden:
and thanks

Xbro

Quote from: Legend on Feb 24, 2015, 03:03 PM
Yeah I have a database and full access to everything.
I believe there is an SQL command that allows you to display something you pull without decimals. It might even come down to a regular round when pulling from the database. Like so.

Select round(u.points, 0) from users u where user_name = 'Xbro'

Should do it. Assuming I understand everything. This will pull the double from the database and display it as '222' when you have '222.34'. Because it's just calling it, it won't really affect the actual data in the database.

Not sure if the implementation is worth the effort though. Because you would need to set up the where clause with a parameter for each user. The parameter would need to be pulled from the user number, and the user number would need to be extracted from the URL. On top of that you would need to get the query to place the data in any place that you display the user's points. Unless you have it hard-coded in from the beginning.

But if you think it's worth it, then go for it.
3 people like this

Legend

#34
Quote from: Xbro on Feb 24, 2015, 03:18 PM
I believe there is an SQL command that allows you to display something you pull without decimals. It might even come down to a regular round when pulling from the database. Like so.

Select round(u.points, 0) from users u where user_name = 'Xbro'

Should do it. Assuming I understand everything. This will pull the double from the database and display it as '222' when you have '222.34'. Because it's just calling it, it won't really affect the actual data in the database.

Not sure if the implementation is worth the effort though. Because you would need to set up the where clause with a parameter for each user. The parameter would need to be pulled from the user number, and the user number would need to be extracted from the URL. On top of that you would need to get the query to place the data in any place that you display the user's points. Unless you have it hard-coded in from the beginning.

But if you think it's worth it, then go for it.

That's actually a lot more complicated than it would need to be.

I'd just switch the database to a float, and then in PHP round it before displaying. Wouldn't have to mess with anything per user or the like.



However I think it might be better to just display cent values in the pocket. That way users can see all the little things add up.

Xbro

Quote from: Legend on Feb 24, 2015, 03:44 PM
That's actually a lot more complicated than it would need to be.

I'd just switch the database to a float, and then in PHP round it before displaying. Wouldn't have to mess with anything pure user or the like.



However I think it might be better to just display cent values in the pocket. That way users can see all the little things add up.
Might have been a bit more complicated then it needed, but at least I got more points for it lol. I was just showing how it could be done solely using SQL, because I find SQL fun to use.
3 people like this

Xbro

Do you plan to use the points/views idea?
3 people like this

Legend

Quote from: Xbro on Feb 24, 2015, 03:53 PM
Do you plan to use the points/views idea?

I'll have to think about it a little more. Definitely a good idea though.