[pmwiki-users] problem with utf-8 chars and TimeFmt
Sebastian Siedentopf
schlaefer at macnews.de
Fri Mar 3 04:01:38 CST 2006
Am 02.03.2006 um 19:51 schrieb Patrick R. Michaud:
> On Thu, Mar 02, 2006 at 12:47:23PM -0600, Patrick R. Michaud wrote:
>> 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.
>
> ...except it probably needs to be '$DiffTimeUTF8' without the
> hyphen, otherwise it won't get recognized as a page variable
> (page variables cannot contain hyphens).
Oh yes, I totally forgot the $GLOBALS variable. This works fine. Thanks.
Sebastian
For the archive, it looks now like this after the XLPage() call:
$CurrentTime = utf8_encode(strftime($TimeFmt,$Now));
$FmtPV['$LastModified'] = 'utf8_encode(strftime($GLOBALS
["TimeFmt"], $page["time"]))';
if ($action == 'diff') {
$DiffStartFmt = "<div class='diffbox'><div class='difftime'>\
$DiffTimeUTF8
\$[by] <span class='diffauthor' title='\$DiffHost'>\
$DiffAuthor</span> - \$DiffChangeSum</div>";
$FmtPV['$DiffTimeUTF8'] = 'utf8_encode($GLOBALS["FmtV"]
[\'$DiffTime\'])';
}
More information about the pmwiki-users
mailing list