Hello. I would appreciate if someone more capable than me could help me with one little thing. I have customized my old piwik instalation quite a bit and now on v 2.0 all of that is gone.. and so the slow climbing to rebuild it begins :) For instance, in the live widget i was having two different backgrounds colors for actions done in the past 30 minutes, or older. It was eyes-catching and for a small website it`s useful to see instantly what are the "active" visitors doing and bring focus to them.
In lastVisits.tpl i was having this:
style="{if $visitor.serverTimestamp > time()-1800} .....
i tried to insert in getLastVisitsStart.twig
style="{% if visitor.serverTimestamp > time() - 1800 %}
but i get the error
"The function "time" does not exist in "@Live/getLastVisitsStart.twig" at line 8"
So, how can i invoke basic php functions, like current time in unix seconds, in order to calculate "last 30 minutes"? It was working before in the old .tpls, i customized many of them with all sorts of php functions.. now i assume something is different? And what can I do?
In lastVisits.tpl i was having this:
style="{if $visitor.serverTimestamp > time()-1800} .....
i tried to insert in getLastVisitsStart.twig
style="{% if visitor.serverTimestamp > time() - 1800 %}
but i get the error
"The function "time" does not exist in "@Live/getLastVisitsStart.twig" at line 8"
So, how can i invoke basic php functions, like current time in unix seconds, in order to calculate "last 30 minutes"? It was working before in the old .tpls, i customized many of them with all sorts of php functions.. now i assume something is different? And what can I do?