' . plugin_topicpath_inline() . ''; } function plugin_topicpath_inline() { global $script, $vars, $defaultpage; $page = isset($vars['page']) ? $vars['page'] : ''; if ($page == '' || $page == $defaultpage) return ''; $parts = explode('/', $page); $b_link = TRUE; if (PLUGIN_TOPICPATH_THIS_PAGE_DISPLAY) { $b_link = PLUGIN_TOPICPATH_THIS_PAGE_LINK; } else { array_pop($parts); // Remove the page itself } $topic_path = array(); while (! empty($parts)) { $_landing = join('/', $parts); $landing = pagename_urlencode($_landing); $element = htmlsc(array_pop($parts)); if (! $b_link) { // This page ($_landing == $page) $b_link = TRUE; $topic_path[] = $element; } else if (PKWK_READONLY && ! is_page($_landing)) { // Page not exists $topic_path[] = $element; } else { // Page exists or not exists $topic_path[] = '' . $element . ''; } } if (PLUGIN_TOPICPATH_TOP_DISPLAY) $topic_path[] = make_pagelink($defaultpage, PLUGIN_TOPICPATH_TOP_LABEL); return join(PLUGIN_TOPICPATH_TOP_SEPARATOR, array_reverse($topic_path)); }