vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Simple Request (https://vborg.vbsupport.ru/showthread.php?t=17075)

Knoman 05-17-2001 04:40 AM

this should be simple for you guys.... but i'm not a php expert.

you see (right under the avatars) where it says Registered: (registration date). how would i change it from when a person registered to the number of days since he/she registered?

Overgrow 05-17-2001 04:06 PM

Didn't test this, may not work the first time :D

find in showthread:
PHP Code:

$userjoindate=date($registereddateformat,$userinfo[joindate]+(($timeoffset+$bbtimezoneoffset)*3600)); 

change to:
PHP Code:

$userjoindate=(($timenow - ($userinfo[joindate]+(($timeoffset+$bbtimezoneoffset)*3600))) / 86400)." days"


Knoman 05-17-2001 04:11 PM

cool.... thanks man. :)

Knoman 05-17-2001 04:26 PM

actually.... i cant find that in showthread.... are you sure it's there?

Overgrow 05-17-2001 04:47 PM

It may be slightly different depending on what version you are running. Just search for $userjoindate and that should be the only place you find it.

There was a mistake in that first code, instead replace it with:

PHP Code:

$userjoindate=((time() -?($userinfo[joindate]+(($timeoffset+$bbtimezoneoffset)*3600)))?/?86400)."?days"

Still not tested though, just saw an error.

Knoman 05-17-2001 06:07 PM

i'm using rc3 and i still cant find it.

tubedogg 05-17-2001 06:37 PM

try $post[joindate] instead ;)

Overgrow 05-17-2001 07:24 PM

Oops forgot my standard disclaimer:

I don't run 2.x, I doubt I will ever run 2.x, I just own the code for reference. Sorry, seems that variable changed in RC3 which I haven't downloaded yet.

thanks td

Knoman 05-17-2001 11:56 PM

thanks for the help..... but how would i use $post[joindate]

Knoman 05-18-2001 01:23 AM

never mind... i've found an alternative. i'v change in post bits

registered: $joindate.........

to

registered: $jointime

i then edited showthread from

$jointime = (time() - $post[joindate]) / 86400;

to

$jointime = round ((time() - $post[joindate]) / 86400, 0);


All times are GMT. The time now is 01:02 AM.

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.01095 seconds
  • Memory Usage 1,733KB
  • 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
  • (3)bbcode_php_printable
  • (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