/** * Block Plugin Main Function */ function convert() { sonots::init_myerror(); do { // try global $vars, $defaultpage; $args = func_get_args(); $line = csv_implode(',', $args); $options = PluginSonotsOption::parse_option_line($line); list($options, $unknowns) = PluginSonotsOption::evaluate_options($options, $this->conf_options); $current = isset($vars['page']) ? $vars['page'] : $defaultpage; $page = isset($options['page']) ? $options['page'] : $current; $page = PluginContentsx::check_page($page, $current); $options = PluginContentsx::check_options($page, $current, $options, $unknowns); if (sonots::mycatch()) { break; } $html = PluginContentsx::display_toc($page, $options); if ($html != '') { $html = '<table border="0" class="toc"><tbody>' . "\n" . '<tr><td class="toctitle">' . "\n" . '<span>' . _('Table of Contents') . "</span>\n" . "</td></tr>\n" . '<tr><td class="toclist">' . "\n" . $html . "</td></tr>\n" . "</tbody></table>\n"; } return $html; } while (false); if (sonots::mycatch()) { // catch return '<p>#contentsx(): ' . sonots::mycatch() . '</p>'; } }
/** * Block Plugin Main Function */ function convert() { sonots::init_myerror(); do { // try $args = func_get_args(); $argline = csv_implode(',', $args); $argoptions = PluginSonotsOption::parse_option_line($argline); list($options, $unknowns) = PluginSonotsOption::evaluate_options($argoptions, $this->conf_options); $options = $this->check_options($options, $unknowns, $this->conf_options); if (sonots::mycatch()) { break; } if (isset($options['tag'])) { $plugin_tag = new PluginSonotsTag(); $pages = $plugin_tag->get_taggedpages($options['tag']); } elseif (isset($options['prefix'])) { $pages = sonots::get_existpages($options['prefix']); } else { $pages = get_existpages(); } $pagelist = $this->pagelist($pages, $options, $argoptions); $navipages = $this->get_navipages($pagelist, $options); $html = $this->display_navi($navipages, $options['look'], $options['border'], $this->conf['printcss']); return $html; } while (false); if (sonots::mycatch()) { // catch return '<p>#' . $this->plugin . '(): ' . sonots::mycatch() . '</p>'; } }
/** * Action Plugin Main Function */ function action() { sonots::init_myerror(); do { // try global $vars; $argoptions = PluginSonotsOption::parse_uri_option_line($vars); $argoptions = array_intersect_key($argoptions, $this->conf_options); list($options, $unknowns) = PluginSonotsOption::evaluate_options($argoptions, $this->conf_options); $options = $this->check_options($options, array(), $this->conf_options); if (sonots::mycatch()) { break; } if (isset($options['tag'])) { $plugin_tag = new PluginSonotsTag(); $pages = $plugin_tag->get_taggedpages($options['tag']); $title = _('List of pages tagged by "') . htmlspecialchars($options['tag']) . '"'; } elseif (isset($options['prefix']) && $options['prefix'] !== '') { $pages = sonots::get_existpages($options['prefix']); $title = _('List of pages under "') . htmlspecialchars($options['prefix']) . '"'; } else { $pages = get_existpages(); $title = _('List of pages'); } $html = $this->pagelist($pages, $options, $argoptions); if (empty($html)) { $html = '<p>' . _('No page found.') . '</p>'; } return array('msg' => $title, 'body' => $html); } while (false); if (sonots::mycatch()) { // catch return array('msg' => $this->plugin, 'body' => '<p>' . sonots::mycatch() . '</p>'); } }
/** * Convert Plugin Main Function */ function convert() { global $vars, $defaultpage; sonots::init_myerror(); do { // try $args = func_get_args(); $inclpage = array_shift($args); $current = isset($vars['page']) ? $vars['page'] : $defaultpage; $this->visited[$current] = TRUE; $inclpage = PluginIncludex::check_page($inclpage, $current, $this->visited); if (sonots::mycatch()) { break; } $this->visited[$inclpage] = TRUE; $argline = csv_implode(',', $args); $argoptions = PluginSonotsOption::parse_option_line($argline); list($options, $unknowns) = PluginSonotsOption::evaluate_options($argoptions, $this->conf_options); $options = PluginIncludex::check_options($options, $unknowns, $argoptions); if (sonots::mycatch()) { break; } $html = PluginIncludex::display_include($inclpage, $options, $this->syntax); return $html; } while (false); if (sonots::mycatch()) { // catch return '</p>#includex(): ' . sonots::mycatch() . '</p>'; } }
/** * Action Plugin Main Function */ function action() { sonots::init_myerror(); do { // try global $vars; $argoptions = PluginSonotsOption::parse_uri_option_line($vars); $argoptions = array_intersect_key($argoptions, $this->conf_options); list($options, $unknowns) = PluginSonotsOption::evaluate_options($argoptions, $this->conf_options); $options = $this->check_options($options, array(), $this->conf_options); if (sonots::mycatch()) { break; } $pages = get_existpages(); $title = $this->plugin; $html = $this->pagelist($pages, $options, $argoptions); return array('msg' => $title, 'body' => $html); } while (false); if (sonots::mycatch()) { // catch return array('msg' => $this->plugin, 'body' => '<p>' . sonots::mycatch() . '</p>'); } }