[TYPO3-dev] Hook for site stats

Christian Lerrahn typo3 at penpal4u.net
Tue Jun 16 07:52:41 CEST 2009


Hi,
> > > is there a hook in the core which gets executed every time any
> > > page gets accessed. I used
> > > $TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['sys_stat-PreProcClass']
> > > for that purpose very long time ago but it doesn't seem to do the
> > > trick any more.
> > 
> > Since when? Does the standard logging still work? Do you have other
> > extension installed that may interfere?
> 
> My extension stopped working long time ago but I never got around to
> testing it. I actually used it only on one install and therefore never
> bothered much correcting it.
> 
> However, now that you challenged me, I played around a bit and made an
> interesting discovery. Just to test, I installed sys_stat and found it
> working. But the side effect was that suddenly my extension started
> working again. Don't ask me why but it definitely didn't work before
> and it's working now.

I investigated this further and found out that the hook really shows up
within an if block with the condition

if (t3lib_extMgm::isLoaded('sys_stat') &&
 $this->config['config']['stat_mysql'])        {

That explains why my extension only works when sys_stat is loaded.
However, is there another hook that gets executed every time a page is
rendered (from scratch or cache) that does not depend on another
extension being loaded? I remember looking for one long time ago but
back then I couldn't find any.

Cheers,
Christian




More information about the TYPO3-dev mailing list