LightPressPlugin($frontend, $args, $dummy_run); } function run($hook, &$hook_data) { $f =& $this->_frontend; $tpl =& $f->tpl; $db =& $f->db; // cache code starts here $cache =& $this->_frontend->cache; if ($cache && $cache->active) { // try to fetch the cached snippet $result = $cache->getCache('_plugin_archiveslist',''); if ($result) { $tpl->setVar('PLUGIN_ARCHIVESLIST', $result); return; } } $archives =& $this->_frontend->getArchives(); if (count($archives) == 0) return $this->hide(); $tpl->setFile('plugin_archiveslist', 'plugins/archives_list.xml'); $tpl->parseBlock( 'PLUGIN_ARCHIVESLIST_ARCHIVE', 'plugin_archiveslist_archive', $archives, 'plugin_archiveslist'); $tpl->parse('PLUGIN_ARCHIVESLIST', 'plugin_archiveslist'); if ($cache && $cache->active) $cache->setCache($tpl->_vars['PLUGIN_ARCHIVESLIST'], '_plugin_archiveslist',''); } } ?>