Page Index Toggle Pages: 1
Topic Tools
Normal Topic Days since Registered (Read 3,857 times)
Captain John
Ex Member


Re: Days since Registered
Reply #9 - May 21st, 2010 at 4:28pm
Post Tools
Thank You !
  
Back to top
 
IP Logged
 
MF-B
Development Team
****
Offline



Posts: 2,405
Location: Moscow, Russia

YaBB 2.5
Re: Days since Registered
Reply #8 - May 21st, 2010 at 12:30pm
Post Tools
@ Captain John, no problem Captain Wink
New files in CVS.
  

Stand!
Back to top
IP Logged
 
Captain John
Ex Member


Re: Days since Registered
Reply #7 - May 19th, 2010 at 5:33pm
Post Tools
a small change in the second code replacement above so only admin will see the 'red' dates in the list.  (in MemberList.pl)
   and need the line of code commented out in Profile.pl

   Sorry about that MF-B .. wasn't aware ...
« Last Edit: May 20th, 2010 at 2:44am by »  
Back to top
 
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Days since Registered
Reply #6 - May 19th, 2010 at 5:21pm
Post Tools
I thought I best mention that Carsten made a change to the code since it was posted up on here:

http://www.carsten-dalgaard.dk/cgi-bin/yabb2/YaBB.pl?num=1273885221/3#3

Change this:

Code
Select All
		$dr_regdate = '';
		if (${$uid.$user}{'regtime'}) {
			$dr_regdate = &timeformat(${$uid.$user}{'regtime'});
			$dr_regdate =~ s~(.*)(, 1?[0-9]):[0-9][0-9].*~$1~;
			$tmpforumstart = $forumstart ? &stringtotime($forumstart) : "1104537600";
			if(${$uid.$user}{'regtime'} < $tmpforumstart) {
				$dr_regdate = qq~<span style="color: #AA0000;">$dr_regdate *</span>~;
				if($iamadmin) { $dr_warning = qq~$ml_txt{'dr_warning'} <a href="$boardurl/AdminIndex.$yyaext?action=newsettings;page=main">$ml_txt{'dr_warnurl'}</a>~; }
			}
		} 


To this:

Code
Select All
		$dr_regdate = '';
		if (${$uid.$user}{'regtime'}) {
			$dr_regdate = &timeformat(${$uid.$user}{'regtime'});
			$dr_regdate =~ s~(.*)(, 1?[0-9]):[0-9][0-9].*~$1~;
			$tmpforumstart = $forumstart ? &stringtotime($forumstart) : "1104537600";
			if($iamadmin && ${$uid.$user}{'regtime'} < $tmpforumstart) {
				$dr_regdate = qq~<span style="color: #AA0000;">$dr_regdate *</span>~;
				$dr_warning = qq~$ml_txt{'dr_warning'} <a href="$boardurl/AdminIndex.$yyaext?action=newsettings;page=main">$ml_txt{'dr_warnurl'}</a>~;
			}
		} 

« Last Edit: May 19th, 2010 at 5:31pm by Derek Barnstorm »  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Days since Registered
Reply #5 - May 19th, 2010 at 5:13pm
Post Tools
Quote:
Well the reason the number of days since joining is messed up is because in

Profile.pl, line 2402, this line:
Code
Select All
if ($string_regdate < $forumstart) { $string_regdate = $forumstart }  



Need the above line commented out.
  
Back to top
 
IP Logged
 
MF-B
Development Team
****
Offline



Posts: 2,405
Location: Moscow, Russia

YaBB 2.5
Re: Days since Registered
Reply #4 - May 19th, 2010 at 4:58pm
Post Tools
New Memberlist.pl and MemberList.lng in CVS
  

Stand!
Back to top
IP Logged
 
Matt Siegman
YaBB Legends (Inactive)
*
Offline



Posts: 3,380
Location: Wichita, KS
Re: Days since Registered
Reply #3 - May 19th, 2010 at 4:17am
Post Tools
I'll try to get CVS working on my computer to commit this, but if somebody with access gets a chance: this looks fine to me.
  

-- Matt Siegman 8) Wish List
Back to top
 
IP Logged
 
OH Eng
Past Team Members
Documentation Team
Offline



Posts: 4,026
Location: Pensacola, Florida USA
Re: Days since Registered
Reply #2 - May 19th, 2010 at 1:14am
Post Tools
And the line in Profile.pl in the first post should probably be commented out also so the days since joining will always be based on whatever the stored reg date is.

  

 
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Days since Registered
Reply #1 - May 18th, 2010 at 7:20pm
Post Tools
Member Reg Date

In Memberlist.pl

find
Code
Select All
&LoadLanguage('MemberList');  



and add after:
Code
Select All
$dr_warning = '';  



still in Memberlist.pl find:
Code
Select All
		$dr_regdate = '';
		if (${$uid.$user}{'regtime'}) {
			#my $curtimeformat = ${$uid.$username}{'timeformat'};
			#${$uid.$username}{'timeselect'} = 1;
			$dr_regdate = &timeformat(${$uid.$user}{'regtime'});
			#${$uid.$username}{'timeselect'} = $curtimeformat;
		}
		$dr_regdate =~ s~(.*)(, 1?[0-9]):[0-9][0-9].*~$1~;  



and replace with:
Code
Select All
		$dr_regdate = '';
		if (${$uid.$user}{'regtime'}) {
			$dr_regdate = &timeformat(${$uid.$user}{'regtime'});
			$dr_regdate =~ s~(.*)(, 1?[0-9]):[0-9][0-9].*~$1~;
			$tmpforumstart = $forumstart ? &stringtotime($forumstart) : "1104537600";
			if(${$uid.$user}{'regtime'} < $tmpforumstart) {
				$dr_regdate = qq~<span style="color: #AA0000;">$dr_regdate *</span>~;
				if($iamadmin) { $dr_warning = qq~$ml_txt{'dr_warning'} <a href="$boardurl/AdminIndex.$yyaext?action=newsettings;page=main">$ml_txt{'dr_warnurl'}</a>~; }
			}
		} 



and still in Memberlist.pl find:
Code
Select All
		<div style="float: left; width: 50%; text-align: left;">$pageindex2</div> 



and add after:
Code
Select All
		<div style="float: left; width: 49%; color: #AA0000; font-weight: normal; vertical-align: middle; text-align: right;">$dr_warning</div> 



finally in MemberList.lng find:
Code
Select All
'802' => 'Sorry - no matches found for',  



and add after:
Code
Select All
'dr_warning' => '* Account older than Forum - please verify Forum Start Date:',
'dr_warnurl' => 'Here',  



code provided by Carsten
  
Back to top
 
IP Logged
 
Captain John
Ex Member


Days since Registered
May 14th, 2010 at 6:11pm
Post Tools
OH Eng wrote on May 9th, 2010 at 4:06am:
Well the reason the number of days since joining is messed up is because in Profile.pl, line 2402, this line:

Code
Select All
if ($string_regdate < $forumstart) { $string_regdate = $forumstart }
 



So for purposes of the Profile display, if a user's reg date is less than the forum start date, it gets set equal to the forum start date and then the "days since joining" is calculated based on that.  Sure enough, the profile of this user has joined the exact number of days ago that the forum started.  Commenting out just that line, the "days since joining" displays the correct number of days.


Forum Start Date:  June 1, 2009  (345 days ago)
User's (messed up) Reg Date:  May 1, 2009  (372 days ago)

In users profile perhaps we could display it like this:
show the actual:

Days Since Joining: 372 * Verify Registration Date *

  This would cause an alert to be displayed as above
« Last Edit: May 14th, 2010 at 6:17pm by »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top