The Arcive of vBulletin Modifications Site. |
|
2 Things Details »»
|
|||||||||||||||||||||||||
Number one.. how can i make numbers riound offf..... is floor got somehting to do withit??
and is there a way to make things happen at a certain time evryday Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
1) use the round() function
2) you have to use cronjobs as i know |
|
#3
|
||||
|
||||
|
ok thanks.... ill look up round()
|
|
#4
|
||||
|
||||
|
With round(), 2.4 becomes 2 and 2.6 becomes 3. If you want 2.4 to become 3, use ceil(). If you want 2.6 to become 2 use floor().
|
|
#5
|
||||
|
||||
|
round() works fine thanks... any help on the second one?
|
|
#6
|
||||
|
||||
|
for example.. say i wanted to put a max post per day.. id add another field... and every time u post it would add to the field as well.. when that got to max u cant post anymore... but the field gets reset to 0 evry midnight
i know there is probably a hack for this but this isnt exactly wat i want.. its just an example (the bit of code that says if time = midnight update userfield set field=0 where userid!=0 |
|
#7
|
||||
|
||||
|
Use a cron job or wait for vB3.
|
|
#8
|
||||
|
||||
|
hwo do i use cronjobs?
|
|
#9
|
||||
|
||||
|
i mena.. wat do i put in the command part, and how do i call it up?
|
|
#10
|
||||
|
||||
|
thanks chen, but everything is possible with the round()-function too round(x-0.5)=floor(x) isn't it
|
![]() |
|
|