function convert() { $args = func_get_args(); $options = $this->conf_options; $options = sonots::parse_options($args, $options); // check_options if ($options['limit'] === "0") { $options['limit'] = NULL; } if ($options['cloud'] === 'off' || $options['cloud'] === 'false') { $options['cloud'] = FALSE; } //print_r($options); $plugin_tag = new PluginSonotsTag(); if ($options['cloud']) { $html = $plugin_tag->display_tagcloud($options['limit'], $options['related']); } else { $html = $plugin_tag->display_taglist($options['limit'], $options['related']); } return $html; }
/** * Clean Tag Caches * * @return string HTML */ function clean_cache() { set_time_limit(0); global $vars; // remove all files $pkwk_tag = new PluginSonotsTag(); $files = $pkwk_tag->get_items_filenames(); $files = array_merge($files, $pkwk_tag->get_tags_filenames()); $files[] = $pkwk_tag->get_tagcloud_filename(); foreach ($files as $file) { unlink($file); } // execute all pages $exec_pages = sonots::exec_existpages('', '/&tag\\([^;]*\\);/'); if (empty($exec_pages)) { $html = ''; } else { $links = array_map('make_pagelink', $exec_pages); $html = '<p>Following pages were executed to assure:</p>' . '<p>' . implode("<br />\n", $links) . '</p>'; } $html .= $pkwk_tag->display_tagcloud(); return $html; }