[pmwiki-users] problem with utf-8 chars and TimeFmt
Patrick R. Michaud
pmichaud at pobox.com
Thu Mar 2 12:47:23 CST 2006
On Thu, Mar 02, 2006 at 11:28:45AM +0100, Sebastian Siedentopf wrote:
> > $FmtPV['$LastModified'] =
> > 'utf8_encode(strftime($GLOBALS["TimeFmt"], $page["time"]))';
> > $CurrentTime = utf8_encode(strftime($TimeFmt,$Now));
>
> This was my solution for $CurrentTime too. {$LastModified} works
> also. The history is a little bit tricky and I haven't found a
> solution without modifying one of the core files. Beside just putting
>
> $FmtV['$DiffTime'] = utf8_encode(strftime($TimeFmt,$diffgmt));
>
> into the pagerev.php the most flexible I can think of is
>
> $DiffStartFmt = "<div class='diffbox'><div class='difftime'>\
> $DiffTimeUTF-8 ...";
> $FmtPV['$DiffTimeUTF-8'] = 'utf8_encode($FmtV[\'$DiffTime\'])';
>
> in the config.php, if $FmtV would be a global variable in PageVar().
Oh, you can always get to a global variable via $GLOBALS:
$FmtPV['$DiffTimeUTF-8'] =
'utf8_encode($GLOBALS["FmtV"][\'$DiffTime\'])';
This is probably the best bet for now.
At some point I'm hoping to come up with a totally new module for
displaying page history, but it's not the highest priority at the
moment.
Pm
More information about the pmwiki-users
mailing list