vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   postbit template to show number of days registered ? (https://vborg.vbsupport.ru/showthread.php?t=12032)

eva2000 03-22-2001 07:19 AM

How can i add under the post count of each user the number of days they have been registered on my forum ?

i.e.

[b]Username]/b]
User title:

Registered:
Location:
Post count:

Days since registration: XXX

where XXX is the number of days they have been registered..

i'd like to have this available in beta 4 where it can be added with some varibale like $daysregistered

so that it can be used as an alternative or additional to the post count.

easy to do ?

03-22-2001 07:48 AM

$jointime

But it displays a little bit long number. :)

03-22-2001 07:53 AM

i see it displays something like

113.63356481481

hmmm so is it possible ?

03-22-2001 08:03 AM

Find in showthread.php:
PHP Code:

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

Directly below it place:
PHP Code:

$jointime intval($jointime); 

It's not as accurate but really shorter. :)

03-22-2001 08:12 AM

thanks but it came out the same length ?


how would you round it to 2 decimal places
i.e.

113.65

03-22-2001 08:16 AM

ah there are two instances of
Code:

$jointime = (time() - $post[joindate]) / 86400; // Days Joined
in showthread.php

i put the extra line after each of the 2 instances and it works

03-22-2001 08:24 AM

Find in showthread.php:
PHP Code:

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

Directly below it place:
PHP Code:

$jointime intval(($jointime 100) + 0.5) / 100

Now it will be shown as x.xx

03-22-2001 08:40 AM

thanks that worked :)

03-30-2001 08:03 PM

I needed this too, so I used:
PHP Code:

$jointime round($jointime); 


obs 12-13-2001 08:19 AM

how would you do this for version 2.2.0 ?

Scott MacVicar 12-13-2001 02:49 PM

add the code within the getpostbit function in /admin/function.php


All times are GMT. The time now is 05: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.01093 seconds
  • Memory Usage 1,731KB
  • 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)bbcode_code_printable
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete