timeformat_english.mod 1 The Admin can easily select the Way Date and Time are displayed. The way the Data is saved in the Files is not changed, so there will be no Problem with other Parts of YaBB when changing the Time-Format. Frank Wessel http://www.wescomteach.de/download Sources/Subs.pl close(TEMPLATE); foreach $curline (@template) { if($curline =~ /\/) { last; } elsif($curline =~ /\/) { print "$news"; } elsif($curline =~ /\/) { print "$title"; } elsif($curline =~ /\/) { print "$text2"; } elsif($curline =~ /\/) { print "$date"; } close(TEMPLATE); $mydate = &timeformat($date); foreach $curline (@template) { if($curline =~ /\/) { last; } elsif($curline =~ /\/) { print "$news"; } elsif($curline =~ /\/) { print "$title"; } elsif($curline =~ /\/) { print "$text2"; } elsif($curline =~ /\/) { print "$mydate"; } 1; sub timeformat { $oldformat = $_[0]; if ($timeselected eq "1") { return ($oldformat); } elsif ($timeselected eq "2") { $newmonth = substr($oldformat,0,2); $newday = substr($oldformat,3,2); $newyear = substr($oldformat,6,2); $newtime = substr($oldformat,-8,8); $newformat = $newday.".".$newmonth.".".$newyear." ".$txt{'107'}." ".$newtime; return ($newformat); } elsif ($timeselected eq "3") { $newmonth = substr($oldformat,0,2); $newday = substr($oldformat,3,2); $newyear = substr($oldformat,6,2); $newtime = substr($oldformat,-8,8); $newformat = $newday.".".$newmonth.".20".$newyear." ".$txt{'107'}." ".$newtime; return ($newformat); } elsif ($timeselected eq "4") { $newmonth = substr($oldformat,0,2); $newday = substr($oldformat,3,2); $newyear = substr($oldformat,6,2); $newhour = substr($oldformat,-8,2); $newminute = substr($oldformat,-5,2); $newsecond = substr($oldformat,-2,2); if($newhour > 11) {$ampm = "PM";} else {$ampm = "AM";} if($newhour > 12 && $newhour < 24) { $newhour2 = $newhour - 12; } if($newhour eq "24" || $newhour eq "00") { $newhour2 = "12"; } $newmonth2 = $months[$newmonth]; if($newday eq "1" || $newday eq "21" || $newday eq "31") { $newday2 = "st"; } elsif($newday eq "2" || $newday eq "22") { $newday2 = "nd"; } elsif($newday eq "3" || $newday eq "23") { $newday2 = "rd"; } else { $newday2 = "th"; } $newformat = $newmonth2." ".$newday.$newday2." ".$txt{'107'}." ".$newhour2.":".$newminute.":".$newsecond." ".$ampm; return ($newformat); } } 1; Sources/BoardIndex.pl if($lp eq "") { $lp="$btm{'9'}"; } $dlp = &readlog("$curboard"); $new="\"$txt{'334'}\""; if($dlp ne "$lp" && $lp ne "$btm{'9'}" && $username ne "Guest") { $new = "\"$txt{'333'}\""; } print <<"EOT"; if($lp eq "") { $lp="$btm{'9'}"; } else { $lp = &timeformat($lp); } $dlp = &readlog("$curboard"); $dlp = &timeformat($dlp); $new="\"$txt{'334'}\""; if($dlp ne "$lp" && $lp ne "$btm{'9'}" && $username ne "Guest") { $new = "\"$txt{'333'}\""; } print <<"EOT"; Sources/MessageIndex.pl if ($views eq "") { $views = "0"; } print <<"EOT"; $msub[$b] $new $pages $mname[$b] $mreplies[$b] $views $mdate[$b] if ($views eq "") { $views = "0"; } $mydate = &timeformat($mdate[$b]); print <<"EOT"; $msub[$b] $new $pages $mname[$b] $mreplies[$b] $views $mydate Sources/Display.pl $date = "$mdate[$a]"; if($settings[7] eq "Administrator") { $ip = "$mip[$a]"; } $date = &timeformat($mdate[$a]); if($settings[7] eq "Administrator") { $ip = "$mip[$a]"; } Sources/Post.pl ($trash, $tempname, $trash, $tempdate, $trash, $trash, $trash, $trash, $temppost) = split(/\|/,$line); $message = "$temppost"; ($trash, $tempname, $trash, $tempdate, $trash, $trash, $trash, $trash, $temppost) = split(/\|/,$line); $tempdate = &timeformat($tempdate); $message = "$temppost"; Sources/ModifyMessage.pl # Build 9 if ($showmodify==1) { $message.="\\[i\]$txt{'211'}: $realname - $date\[/i\]"; } # /Build 9 # Build 9 $mydate = &timeformat($date); if ($showmodify==1) { $message.="\\[i\]$txt{'211'}: $realname - $mydate\[/i\]"; } # /Build 9 Sources/InstantMessage.pl $name = "$mname[$a]"; $date = "$mdate[$a]"; $subject = "$msub[$a]"; if($subject eq "") { $subject="$txt{'24'}"; } print ""; print "$date"; $name = "$mname[$a]"; $date = "$mdate[$a]"; $mydate = &timeformat($date); $subject = "$msub[$a]"; if($subject eq "") { $subject="$txt{'24'}"; } print ""; print "$mydate"; $mmessage[$a] =~ s/[\n\r]//g; $message="$mmessage[$a]"; $name = "$mname[$a]"; $date = "$mdate[$a]"; $ip = "$mip[$a]"; $postinfo=""; $signature=""; $viewd=""; $icq=""; $star=""; $aim=""; $yim=""; $mmessage[$a] =~ s/[\n\r]//g; $message="$mmessage[$a]"; $name = "$mname[$a]"; $date = "$mdate[$a]"; $mydate = &timeformat($date); $ip = "$mip[$a]"; $postinfo=""; $signature=""; $viewd=""; $icq=""; $star=""; $aim=""; $yim="";  $subject $txt{'30'}: $date  $subject $txt{'30'}: $mydate $name = "$mname[$a]"; $date = "$mdate[$a]"; $subject = "$msub[$a]"; if($subject eq "") { $subject="$txt{'24'}"; } print ""; print "$date"; $name = "$mname[$a]"; $date = "$mdate[$a]"; $mydate = &timeformat($date); $subject = "$msub[$a]"; if($subject eq "") { $subject="$txt{'24'}"; } print ""; print "$mydate"; $mmessage[$a] =~ s/[\n\r]//g; $message="$mmessage[$a]"; $name = "$mname[$a]"; $date = "$mdate[$a]"; $ip = "$mip[$a]"; $postinfo=""; $signature=""; $viewd=""; $icq=""; $star=""; $aim=""; $yim=""; $mmessage[$a] =~ s/[\n\r]//g; $message="$mmessage[$a]"; $name = "$mname[$a]"; $date = "$mdate[$a]"; $mydate = &timeformat($date); $ip = "$mip[$a]"; $postinfo=""; $signature=""; $viewd=""; $icq=""; $star=""; $aim=""; $yim="";  $subject $txt{'30'}: $date  $subject $txt{'30'}: $mydate if ($imconfig[1]==1) { open (FILE, "$memberdir/$FORM{'to'}.dat"); &lock(FILE); @recepient = ; &unlock(FILE); close(FILE); $recepient[2] =~ s/[\n\r]//g; # get eMail-Adress if ($recepient[2] ne "") { &sendmail("$recepient[2]","New Instant-Message ($msubject)","($date) $settings[1] has sent you the following Instant Message:\n\n->*<-\n\n$mmessage\n\n->*<-"); } } if ($imconfig[1]==1) { open (FILE, "$memberdir/$FORM{'to'}.dat"); &lock(FILE); @recepient = ; &unlock(FILE); close(FILE); $mydate = &timeformat($date); $recepient[2] =~ s/[\n\r]//g; # get eMail-Adress if ($recepient[2] ne "") { &sendmail("$recepient[2]","New Instant-Message ($msubject)","($mydate) $settings[1] has sent you the following Instant Message:\n\n->*<-\n\n$mmessage\n\n->*<-"); } } Sources/Recent.pl ($num, $title, $dummy, $dummy, $datetime, $dummy, $dummy, $dummy, $dummy) = split(/\|/, $messages[0]); #### output #### #$post = "$txt{'234'} \"$title\" $txt{'235'} ($month/$day - $hour\:$min $ampm)
\n"; $post = "$txt{'234'} \"$title\" $txt{'235'} ($datetime)
\n"; ($num, $title, $dummy, $dummy, $datetime, $dummy, $dummy, $dummy, $dummy) = split(/\|/, $messages[0]); $mydatetime = &timeformat($datetime); #### output #### #$post = "$txt{'234'} \"$title\" $txt{'235'} ($month/$day - $hour\:$min $ampm)
\n"; $post = "$txt{'234'} \"$title\" $txt{'235'} ($mydatetime)
\n";
for ($a = 0; $a < @messages && $a <= $display; $a++) { ($title[0], $title[1], $title[2], $title[3], $title[4], $title[5], $title[6], $title[7], $title[8]) = split(/\|/, $messages[$a]); #### output #### for ($a = 0; $a < @messages && $a <= $display; $a++) { ($title[0], $title[1], $title[2], $title[3], $title[4], $title[5], $title[6], $title[7], $title[8]) = split(/\|/, $messages[$a]); $mytitle[4] = &timeformat($title[4]); #### output #### Sources/Admin.pl $timeformattxt{'1'} EOT $selected = ""; if ($timeselected == 4) { $tsl4 = " selected" } elsif ($timeselected == 3) { $tsl3 = " selected" } elsif ($timeselected == 2) { $tsl2 = " selected" } else { $tsl1 = " selected" } print <<"EOT"; 1; ~; ########## Timeformat Addon ########## \$timeselected = $FORM{'timeselect'}; # Select the Output of Time and Date 1; ~; english.lng 1; # # added by timeformat_german.mod $timeformattxt{'1'} = "Please choose you Time-Format"; $timeformattxt{'2'} = "01/31/01 $txt{'107'} 13:15:17"; $timeformattxt{'3'} = "31.01.01 $txt{'107'} 13:15:17"; $timeformattxt{'4'} = "31.01.2001 $txt{'107'} 13:15:17"; $timeformattxt{'5'} = "January 12th $txt{'107'} 1:15:17 PM"; #