vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   2 Things (https://vborg.vbsupport.ru/showthread.php?t=40927)

E 07-11-2002 07:13 AM

2 Things
 
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

Xenon 07-11-2002 07:27 AM

1) use the round() function

2) you have to use cronjobs as i know

E 07-11-2002 07:29 AM

ok thanks.... ill look up round()

Admin 07-11-2002 07:32 AM

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().

E 07-11-2002 07:39 AM

round() works fine thanks... any help on the second one?

E 07-11-2002 07:41 AM

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

Admin 07-11-2002 07:42 AM

Use a cron job or wait for vB3.

E 07-11-2002 07:42 AM

hwo do i use cronjobs?

E 07-11-2002 07:51 AM

i mena.. wat do i put in the command part, and how do i call it up?

Xenon 07-11-2002 08:04 AM

thanks chen, but everything is possible with the round()-function too round(x-0.5)=floor(x) isn't it ;)


All times are GMT. The time now is 09:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01137 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete