View Full Version : Getting my head round IPB
JonnyH
December 6th, 2007, 18:13
I'm making a p2h module for my cP Creator Script, the thing is to get this working fully I need to get the time for each post made by the user etc. When checking the IPB DB one of the dates posted was:
1196976148
The actual date for this was:
Today, 09:22 PM
Anyone good with numbers and time? Could you work this out please. Match em up.
krakjoe
December 6th, 2007, 19:24
jesus, that's the long way around Johnny ... think about it ... you store when the user signed up, count the total posts and divide it by days since signup, result: posts per day
that's a unix timestamp ... http://php.net/date
DanTheMan
December 6th, 2007, 22:10
sorry this is off topic, but is there going to be multiple forums interation or just IPB?
JonnyH
December 7th, 2007, 03:11
Dan;939626']sorry this is off topic, but is there going to be multiple forums interation or just IPB?
Yep, there's going to be phpBB, myBB, vB, IPB.
@Joe: I saw that in yours, the thing is I wan't a accurate sort of p2h system. It would be a lot easier to do that but I really don't want to.
PS: That date is now 6th December
krakjoe
December 7th, 2007, 05:00
I didn't do that, I used an average from when they signed up on the forum, if you store when the user creates their account then your result will be accurate ...
JonnyH
December 7th, 2007, 14:29
This is the way I was thinking about.
So record the date they signed up, match it against the date today. If that is true for a month after, then select all the posts which are between that date and the date today. If the amount of posts <= monthly, suspend.
krakjoe
December 7th, 2007, 14:31
right ....
JonnyH
December 7th, 2007, 14:32
lol yeah, but to get the times of the post I need to correctly understand the dates which IPB enters in the DB. So that's why I made this thread ;)
krakjoe
December 7th, 2007, 14:33
I told you it's a unix timestamp, the thing that time( ) returns ....
JonnyH
December 7th, 2007, 15:24
Sorry, was early when I read this. Cheers.
JohnN
December 7th, 2007, 17:33
if you want to find out if a user has done a certain amount of posts within a month just query the database for results where the user is that user and the post date is more than a month ago.
AMC
December 8th, 2007, 04:32
What we looked into doing which might be useful for you Jonny, was awarding points per post, and then deducting them as a kind of cost for the hosting once a month. Then you wouldnt need the time, if they had the points, they stay, if not, they dont etc...
krakjoe
December 8th, 2007, 12:06
That's a good idea that, however it's not the conventional post2host system, as Johnny is writing code for release best to stick to conventions no ??
JonnyH
December 8th, 2007, 17:04
Points is a a commonly used mod but there is so many out there. Since I'd have to work with each board and only one mod. Forcing the user to work with that, it's not pratical.
AMC
December 8th, 2007, 17:45
I see what you mean, I forgot we were focusing solely on vB
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.