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 07-31-2002 10:00 PM

Display Days Registered
 
Display Days Registered
Because we aren't all mathmaticians.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
This hack will add a new way for displaying how long each member has been registered in their profile; in days.

Modifications
=-=-=-=-=-=-=-=-=-=-=-=
* 1 file alteration.
* 1 template alteration.

Add-On
=-=-=-=-=-=-=-=-=-=-=-=
* 1 file alteration.
* 1 template alteration.

The add-on can be found here.

More Information
=-=-=-=-=-=-=-=-=-=-=-=
Compatibility: This hack will work with vB 2.0.3 and higher.
Install Time: 1-3 Minutes.
Screenshot: Click Here
Download: Instructions are in attachment.

afterlab 08-01-2002 03:55 AM

Here's a goody ol' screenshot.

Scrub 08-01-2002 05:27 AM

Fun fun. :D.

SaintDog 08-01-2002 05:34 AM

Another nice little hack by Afterlab :); Good job, keep on hacking ;).

- SaintDog

afterlab 08-01-2002 05:37 AM

Thanks, SaintDog and Billy Cowen, it means a lot to me hearing it from you guys.

Aaow AnD wHiTe 08-01-2002 06:57 AM

Thanx buddy!! It will be nice to have this in our postbit instead of the month you registered. It would be cool if it could display the time registered in years and months, depending on how long you've been registered ;) Just a little sugestion :D

Floris 08-01-2002 08:54 AM

SD is right, another little tweak to our boards! I will try to install it this weekend.

Floris 08-01-2002 08:58 AM

In /member.php I can not find the line if ($userinfo[customtitle]==2) or any of the other two. You sure it is the right file?

Scrub 08-01-2002 09:46 AM

It should be located in this code below.
PHP Code:

// display user info

  
$userinfo=getuserinfo($userid);
  
$usergroupperms getpermissions(0$userinfo['userid'], $userinfo['usergroupid']);

  if (
$userinfo[customtitle]==2)
    
$userinfo[usertitle] = htmlspecialchars($userinfo[usertitle]);
  
$userinfo[datejoined]=vbdate($dateformat,$userinfo[joindate]);

  
$jointime = (time() - $userinfo[joindate]) / 86400// Days Joined
  
if ($jointime 1) { // User has been a member for less than one day.
    
$postsperday "$userinfo[posts]";
  } else {
    
$postsperday sprintf("%.2f",($userinfo[posts] / $jointime));
  }

  if (
$userinfo[homepage]!="http://" and $userinfo[homepage]!="") {
    
$userinfo[homepage]=$userinfo[homepage];
  } else {
    
$userinfo[homepage]="";
  } 


Boofo 08-01-2002 10:09 AM

I have 2 users that registered on the same day yet it shows their days one day apart. The both registered on May 5th and for one it says 88 days and the other says 87 days. Is this calculated by the time of day, too? If so, can it be calcualted by just the day so it makes more sense in a situation like the one I described? :) Thanks for a great little hack! It's the ones like these that make the real difference in a board. :)

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.

Seifer 08-05-2002 07:50 AM

Works great =D

Jean147 08-06-2002 09:43 AM

I don't know why, but it does not work for me. Days are not shown :confused: Any ideas why? member.php was edited successfully.

Jean

Jean147 08-06-2002 09:46 AM

Here is my member.php. Maybe somebidy can figure it out?

Attrox 08-19-2002 11:51 PM

Nice hack, afterlab. Quick and easy, yet very effective. Nice job!

GuruXL 08-21-2002 02:36 AM

This is a wonderful hack Afterlab :-p

Okiewan 08-21-2002 10:01 AM

Very useful hack!
Anyone have this in postbit? Like mentioned above, it would be great in there!

N9ne 08-24-2002 01:34 PM

Very nice hack, got it in getinfo and memberlist, thanks :)

eXtremeTim 08-27-2002 01:47 AM

Quote:

Originally posted by Jean147
Here is my member.php. Maybe somebidy can figure it out?
You need to remove that its illegal to share the vb files themself.

Dynamic One 11-01-2002 07:33 PM

Thanks for this hack. Now I can easy see how long someone is Registered :)

\ \ - Speedy - / / 11-01-2002 09:17 PM

is this hack possible to add just to the postbits? like have it say

Dates Registared: 182 (and that would be it?)

can someone figure that out?

Esdee 11-01-2002 10:04 PM

I was wondering about that as well :(

I tried adding $post[daydays] but that didn't do it -_-

Anyone ??

squawell 11-01-2002 10:20 PM

Quote:

Originally posted by \ \ - Speedy - / /
is this hack possible to add just to the postbits? like have it say

Dates Registared: 182 (and that would be it?)


can someone figure that out?

u can do this

open function.php(in admin folder)

find
PHP Code:

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

above that add

PHP Code:

 // Display Days Registered
  // By: afterlab

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

and put ($regdays $daydays) in ur postbit template

i think it should be work....try it :)

\ \ - Speedy - / / 11-01-2002 10:40 PM

worked like a charm, thankx a million! ;)



The Legend of Speedy

Esdee 11-02-2002 02:32 PM

great man, Thanks :D

Dynamic One 11-11-2002 09:08 AM

Thanks afterlab. For this nice hack.

isoman2kx 11-11-2002 08:43 PM

hey can anyone help me here?

// ###############################
// Open the template: #
// getinfo #
// ###############################
// FIND THIS: #
// ###############################

<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Date Registered:</b></normalfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>$userinfo[datejoined]</normalfont></td>
</tr>

i can't seem to find get info template at ALL

not on the server ftp of my board, or in the admin cp?

does it go by another name or do i not have it?

board version is vb 2.27 btw :?

-ISO

isoman2kx 11-11-2002 08:44 PM

i found member.php btw, but not get info, so i have one at least lol

Bison 11-12-2002 01:24 AM

Looks like a keeper ...

Mr. X 12-04-2002 05:14 AM

Excellent stuff Afterlab. Works like a charm on my local 2.2.9 forum, Im installing this now on my real forums.

/clicks install

Shadow-Sin 12-19-2002 07:35 AM

Good job I think i'll use it :)


All times are GMT. The time now is 03:56 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.01295 seconds
  • Memory Usage 1,833KB
  • 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
  • (5)bbcode_php_printable
  • (3)bbcode_quote_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
  • (40)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