vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Display Days Registered (https://vborg.vbsupport.ru/showthread.php?t=41754)

afterlab 08-01-2002 02:28 PM

Xiphoid: I rechecked my member.php file, as well a new install of member.php from v2.2.6 and those 3 lines are easily found within there. Maybe you modifying those 3 lines due to a hack.

Boofo: That's because it rounds everything to the nearest full day -- By seconds, minutes, and hours. If that wasn't there, you would get results like "43.715318 Days".

Boofo 08-01-2002 02:43 PM

Quote:

Originally posted by afterlab
Boofo: That's because it rounds everything to the nearest full day -- By seconds, minutes, and hours. If that wasn't there, you would get results like "43.715318 Days".
Oh, ok, I see. that makes sense now. :)

Is there any way to put the actual time the person registered behind the date registered then so it will make more sense to the newbies out there?

afterlab 08-01-2002 02:45 PM

Yeah, i'm working on it. It's my first time using the date() function, so.. :o

DrkFusion 08-01-2002 02:45 PM

Nice, these are very useful thing you are coming out with!
Keep it up

Drk

ZiRu$ 08-01-2002 02:56 PM

that is dope!!!!

Velocd 08-01-2002 03:02 PM

Great job ;)

Velocd 08-01-2002 10:45 PM

It looks quite nice in the memberslist also :p

In memberslist.php, find:
PHP Code:

$userinfo[datejoined]=vbdate($dateformat,$userinfo[joindate]); 

Below add:
PHP Code:

// Display Days Registered
  // By: afterlab

  
$regdays round((time() - $userinfo[joindate]) / 86400); // Days Joined
  
if ($regdays 1) { // Must be registered Today
    
$regdays "1";
    
$daydays "Day";
  }
  if (
$regdays == 1) {
    
$daydays "Day";
  } else {
    
$daydays "Days";
  } 

In template memberlistbit, find:
Code:

<normalfont>$userinfo[datejoined]</normalfont>
Replace it with:
Code:

<normalfont>$userinfo[datejoined]</normalfont> <smallfont>($regdays $daydays)</smallfont>
Here's a pic: ;)

afterlab 08-01-2002 10:48 PM

Good job, looks cool. I'll add a link to your post in the first post for this hack.

Schorsch 08-02-2002 02:51 AM

works fine so far, thank you, but I have a question:

how can I change the word "days" into german "Tage" ?

cu
Schorsch

afterlab 08-02-2002 02:56 AM

Ah, quite easily. Search for this:

Code:

    $daydays = "Days";
Replace it with this:

Code:

    $daydays = "Tage";
You should also make this German too -- Find this (2 instances, find both):

Code:

    $daydays = "Day";
Replace both instances with this:

Code:

    $daydays = "Tag";
Enjoy.


All times are GMT. The time now is 08:10 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.01092 seconds
  • Memory Usage 1,739KB
  • 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
  • (6)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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