UBB.Dev
Posted By: Dalantech [6.2] The year a user registered is missing - 01/15/2003 11:28 PM
On my forum the year a person registered is missing on their posts. The date they registered is under their avitar, but no year. I looked over at Info Pop Threads support and I didn't see it listed as a bug. Is it a known bug, or do I need to enable something to get the year to display?
Are you using the 'long' date/time format?
Yup, so the year is getting "cut off"?
Posted By: Astaran Re: [6.2] The year a user registered is missing - 01/16/2003 12:46 AM
The date format "short5" seems to have a similar display problem!
[6.2]

Here's a fix. Look for $theme['timeformat'] == "long" and replace the if-body which sets $regedon.

showflat.php:

Code
if ($theme['timeformat'] == "long") { <br />   [:"red"]list($one,$two,$three,$four) = split(' ', $postrow[$i]['Registered']); <br />   $regedon = "$two $three $four";[/] <br />} else {


showthreaded.php:

Code
if ($theme['timeformat'] == "long") { <br />   [:"red"]list($one,$two,$three,$four) = split(' ', $Registered); <br />   $regedon = "$two $three $four";[/] <br />} else {
Thx, Dave_L!
Here is the fix for timeformat "long" and "short5". Simply added an elseif statement right under your fix. Has to applied to showflat and showthreaded, also.
Code
if ($theme['timeformat'] == "long") { <br />   list($one,$two,$three,$four) = split(' ', $postrow[$i]['Registered']); <br />   $regedon = "$two $three $four"; <br />} <br />elseif ($theme['timeformat'] == "short5") { <br />   list($one,$two) = split(' ', $postrow[$i]['Registered']); <br />   $regedon = "$two"; <br />} else {


Has this one been reported at Infopop? It should get into 6.2.1, i think.
Thanks Dave!
Posted By: Astaran Re: [6.2] The year a user registered is missing - 01/16/2003 12:11 PM
I reworked the hole block a bit, so that it works with error level 15.
Code
	if (isset($Registered)) { <br />            $postrow[$i]['Registered'] = $html -> convert_time($Registered,$useroffset); <br />	    if ($theme['timeformat'] == "long") { <br />                   list($one,$two,$three,$four) = split(' ', $postrow[$i]['Registered']); <br />                   $regedon = "$two $three $four"; <br />	    } <br />            elseif ($theme['timeformat'] == "short5"){ <br />                   list($one,$two) = split(' ', $postrow[$i]['Registered']); <br />                   $regedon = "$two"; <br />	    } <br />            else { <br />		  list ($one,$two) = split(" ",$postrow[$i]['Registered']); <br />	          $regedon = "$one"; <br />            } <br />            $postrow[$i]['Registered'] = "{$ubbt_lang['REGED_ON']} $regedon"; <br />         }
Update: I wrote up the instructions and reported this on over at Infopop.

See here
Very !
© UBB.Developers