Code: Select all
function serendipity_smarty_html5time($timestamp) { return date("c", $timestamp); }
$serendipity['smarty']->register_modifier('serendipity_smarty_html5time', 'serendipity_smarty_html5time');Any ideas?
YL
Code: Select all
function serendipity_smarty_html5time($timestamp) { return date("c", $timestamp); }
$serendipity['smarty']->register_modifier('serendipity_smarty_html5time', 'serendipity_smarty_html5time');Code: Select all
|serendipity_smarty_html5timeCode: Select all
$serendipity['smarty']->register_modifier('s9y_smarty_html5time', 'serendipity_smarty_html5time');Code: Select all
$serendipity['smarty']->registerPlugin('modifier', 's9y_smarty_html5time', 'serendipity_smarty_html5time');Pretty much, yes. I don't have the .tpl file on this machine right now, but I did test about everything, and this is the only thing producing this behaviour.garvinhicking wrote:Are you sure the only thing you change is removing a "|@serendipity_smarty_html5time" and nothing else?
1.6, actually.garvinhicking wrote:You're testing on s9y 1.7 I guess?
I'm only sick and tired of how much work it requires us to adapt to Smarty3 when we don't get anything feasible in return. I for one don't feel any speed increase. But that's a different matter, using recent versions of software is always better. I only wish it weren't causing so much pain.Timbalu wrote:<ironic.mode.on>
Stop blaming Smarty3, Garvin! I must really wonder... you don't seem to like it very much....![]()
</i.m.end>
Turns out the commentsearch plugin does some odd things in general like concatenate included avatars etc. (Grischa's working on that already.)garvinhicking wrote:Since YL writes that 1.6 is causing the same behavoir, this strikes me as odd.
The config.inc.php of a template is loaded in serendipity_smarty_init(), and the plugin executes its code later on. So all modifiers should exist there.
Could've been just my subjective impression, you know? AFAIR no one actually confirmed that.Timbalu wrote:YL already stated the Backend being faster than ever...
Code: Select all
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}Doesn't change anything.Timbalu wrote:Code: Select all
if (!is_object($serendipity['smarty'])) { serendipity_smarty_init(); }
A. doesn't put the actual time in the datetime attribute:Timbalu wrote:A. remove the array modifier @B. change name - functionname or v.v.Code: Select all
|serendipity_smarty_html5timeC. use smarty3 syntax testwiseCode: Select all
$serendipity['smarty']->register_modifier('s9y_smarty_html5time', 'serendipity_smarty_html5time');Code: Select all
$serendipity['smarty']->registerPlugin('modifier', 's9y_smarty_html5time', 'serendipity_smarty_html5time');
Code: Select all
<time datetime="Serendipity_smarty_html5time">25.11.2011</time>I will check this in a pristine installation later, but I need a break right now.garvinhicking wrote:*OTHER* involved plugins could be the cause. You might want to test this on an installation without other possibly influencing plugins that use Smarty; some plugins call serendipity_smarty_init() on their own (freetag, AFAIR, and maybe also staticpage). Those could interfer for disregarding the config.inc.php modifiers.
Pristine installation (1.6), only thing I did was activate 2k11. Same result: No entries to print.yellowled wrote:I will check this in a pristine installation latergarvinhicking wrote:*OTHER* involved plugins could be the cause. You might want to test this on an installation without other possibly influencing plugins that use Smarty; some plugins call serendipity_smarty_init() on their own (freetag, AFAIR, and maybe also staticpage). Those could interfer for disregarding the config.inc.php modifiers.
yellowled wrote:B. gives me an error 500 (I did not change the actual function's name, I just modified the line you quoted.)
C. Why should I use Smarty3 in a 1.6 blog?