You should have received a copy of the GNU General Public License, and the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/. You may contact the copyright holder through XOOPS Project: http://xoops.org EOT; echo '<h4>Extracted Description</h4>'; // get the intro of the article to use as the description $description = Metagen::generateDescription($article, 50); echo '<p>' . $description . '</p>'; echo '<h4>SEO Slug</h4>'; // turn title into a slug echo '<p>' . Metagen::generateSeoTitle($title) . '</p>'; // highlight keywords in article echo '<h4>Article with Top 25 Keywords Highlighted</h4>'; // get important words from title $title_keywords = Metagen::generateKeywords($title, 25, 3); //Debug::dump($title_keywords); // get top 25 keywords, but always keep keywords from title $keywords = Metagen::generateKeywords($article, 25, 4, $title_keywords); Debug::dump($keywords, true); echo Highlighter::apply($keywords, $article); // add to the page Metagen::assignTitle($title); Metagen::assignKeywords($keywords); Metagen::assignDescription($description); // dump our source echo '<br /><h2>Source code</h2>'; \Xoops\Utils::dumpFile(__FILE__); $xoops->footer();
/** * dump everything we have */ public function __destruct() { if ($this->activated) { // include any queued time data from Xmf\Debug $queue = \Xmf\Debug::dumpQueuedTimers(true); if (!empty($queue)) { foreach ($queue as $q) { $this->debugbar['time']->addMeasure($q['label'], $q['start'], $q['start'] + $q['elapsed']); } } $this->addToTheme(); $this->addExtra(_MD_DEBUGBAR_PHP_VERSION, PHP_VERSION); $this->addExtra(_MD_DEBUGBAR_INCLUDED_FILES, (string) count(get_included_files())); if (false === $this->quietmode) { if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { // default for ajax, do not initialize a new toolbar, just add dataset $log = $this->renderer->render(false); } else { $log = $this->renderer->render(); } echo $log; } else { $this->debugbar->sendDataInHeaders(); } } }
function debugger($input, $trace = false, $halt = fale) { \Xmf\Debug::dump($input); if ($trace) { \Xmf\Debug::backtrace(); } if ($halt) { exit; } }