Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-22-2001, 07:19 AM
eva2000's Avatar
eva2000 eva2000 is offline
 
Join Date: Oct 2001
Location: Brisbane, Australia
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #2  
Old 03-22-2001, 07:48 AM
Guest
 
Posts: n/a
Default

$jointime

But it displays a little bit long number.
Reply With Quote
  #3  
Old 03-22-2001, 07:53 AM
Guest
 
Posts: n/a
Default

i see it displays something like

113.63356481481

hmmm so is it possible ?
Reply With Quote
  #4  
Old 03-22-2001, 08:03 AM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #5  
Old 03-22-2001, 08:12 AM
Guest
 
Posts: n/a
Default

thanks but it came out the same length ?


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

113.65
Reply With Quote
  #6  
Old 03-22-2001, 08:16 AM
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #7  
Old 03-22-2001, 08:24 AM
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #8  
Old 03-22-2001, 08:40 AM
Guest
 
Posts: n/a
Default

thanks that worked
Reply With Quote
  #9  
Old 03-30-2001, 08:03 PM
Guest
 
Posts: n/a
Default

I needed this too, so I used:
PHP Code:
$jointime round($jointime); 
Reply With Quote
  #10  
Old 12-13-2001, 08:19 AM
obs obs is offline
 
Join Date: Oct 2001
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how would you do this for version 2.2.0 ?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:20 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04180 seconds
  • Memory Usage 2,234KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete