cosmocode / simplenavi Goto Github PK
View Code? Open in Web Editor NEWCreate a simple navigation tree based on DokuWiki namespaces
Home Page: http://www.dokuwiki.org/plugin:simplenavi
License: GNU General Public License v2.0
Create a simple navigation tree based on DokuWiki namespaces
Home Page: http://www.dokuwiki.org/plugin:simplenavi
License: GNU General Public License v2.0
simplenavi plugin for DokuWiki Create a simple navigation tree based on namespaces All documentation for this plugin can be found at https://www.dokuwiki.org/plugin:simplenavi If you install this plugin manually, make sure it is installed in lib/plugins/simplenavi/ - if the folder is called different it will not work! Please refer to http://www.dokuwiki.org/extensions for additional info on how to install extensions in DokuWiki. ---- Copyright (C) Andreas Gohr <[email protected]> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. See the LICENSING file for details
One of my name spaces is a blog feed where all sub documents are posts. If I include the blog namespace in simplenavi, it adds every post in the sidebar and I'd prefer that particular navigation namespace to only show the top level, or somehow provide a dropdown menu or accordion menu so the menu doesn't become overwhelming.
I really appreciate the simplicity of simplenavi, and there may be a way to do this that I have missed or not tried, but would dit be possible to use simplenavi with a generic form to show only the pages below the current namespace for instances where the landing page for the namespace is outside of the namespace
e.g.
:namespace:
:namespace < page outside namespace
as opposed to
:namespace:start < page Inside namespace which works as expected.
Since recent update of simplenavi, I get this error whenever I try to click on the first entry of the simplenavi menu:
2023-08-30 10:44:28TypeError: array_key_last(): Argument #1 ($array) must be of type array, null given/srv/www/vhosts/dokuwiki/lib/plugins/simplenavi/syntax.php(121)
#0 /srv/www/vhosts/dokuwiki/lib/plugins/simplenavi/syntax.php(121): array_key_last(NULL)
#1 /srv/www/vhosts/dokuwiki/lib/plugins/simplenavi/syntax.php(70): syntax_plugin_simplenavi->getSortedItems('systemen', 1, 0, 1, 1)
#2 /srv/www/vhosts/dokuwiki/inc/parser/renderer.php(119): syntax_plugin_simplenavi->render('xhtml', Object(Doku_Renderer_xhtml), Array)
#3 /srv/www/vhosts/dokuwiki/inc/parserutils.php(700): Doku_Renderer->plugin('simplenavi', Array, 5, '{{simplenavi>sy...')
#4 /srv/www/vhosts/dokuwiki/inc/parserutils.php(158): p_render('xhtml', Array, NULL)
#5 /srv/www/vhosts/dokuwiki/inc/parserutils.php(96): p_cached_output('/srv/www/vhosts...', 'xhtml', 'systemen:sideba...')
#6 /srv/www/vhosts/dokuwiki/inc/template.php(1592): p_wiki_xhtml('systemen:sideba...', '', false)
#7 /srv/www/vhosts/dokuwiki/lib/tpl/bootstrap3/tpl/sidebar.php(33): tpl_include_page('systemen:sideba...', 0, 1, 0)
#8 /srv/www/vhosts/dokuwiki/lib/tpl/bootstrap3/Template.php(1383): require('/srv/www/vhosts...')
#9 /srv/www/vhosts/dokuwiki/lib/tpl/bootstrap3/Template.php(1346): dokuwiki\template\bootstrap3\Template->sidebarWrapper('sidebar', 'dokuwiki__aside', 'col-sm-3 col-md...', 'sidebarheader', 'sidebarfooter')
#10 /srv/www/vhosts/dokuwiki/lib/tpl/bootstrap3/main.php(93): dokuwiki\template\bootstrap3\Template->includeSidebar('left')
#11 /srv/www/vhosts/dokuwiki/inc/actions.php(27): include('/srv/www/vhosts...')
#12 /srv/www/vhosts/dokuwiki/doku.php(126): act_dispatch()
#13 {main}
Without fully understanding how the Move Plug-in makes its magic work, it seems to expose an integration method to other plugins.
Integrating Simplenavi would make wiki restructuring much faster and easier.
Hello,
the first indentation when opening a branch does not work. The objects are placed directly under the parent. This behaviour makes the visual aspect confusing.
thx
Hi Gents,
I've found a little annoying problem with the rendering order (LI & UL elements) of sub-namespaces.
Condition of the problem: the name of a sub-namespace matches the name of a page.
[[**test:**first]]
[[**test:**second]]
[[**test:**second:first]]
[[**test:**third]]
[[**second:**first]]
[[**second:**second]]
Note: the name of 2nd level sub-namespace (test -> second) matches the name of the 1st level "second" namespace.
Notice the "second:second" page is displayed as first item instead of "second" namespace.
Notice the missing sub-menu for "second" namespace, and as page names from "second" namespace are displayed in reverse order as 1st level items instead of 2nd level items of "second" namespace.
The problem is caused - IMHO - by the fact that a name of a 1st level namespace matches a name of a page name:
Hope I could clearly demonstrate the issue.
Ciao,
DelD.
It's me again, asking for natural sorting... :)
Please separate the "sort and show the title instead of the ID" into two options. This way I can use the ID to sort and can display the title instead ID.
Hi,
I use Dokuwiki since ca. 6 years.
And i like the plugin simplenavi, because it makes the navigation so much easy.
Thank you so far.
My Dokuwiki runs in a Synology NAS and it is kept uptodate automaticly.
Now I found out, that some of my plugins need an update manualy.
After updating the plugins (the newest update was simplenavi) I get an error-stack shown in the sidebar, where simplenavi used to be present:
The error-stack:
Fatal error: Uncaught Error: Class 'dokuwiki\File\PageResolver' not found in /volume1/web/dokuwiki/lib/plugins/simplenavi/syntax.php:163 Stack trace: #0 /volume1/web/dokuwiki/inc/search.php(59): syntax_plugin_simplenavi->cbSearch(Array, '/var/services/w...', '/linux', 'd', 1, Array) #1 /volume1/web/dokuwiki/lib/plugins/simplenavi/syntax.php(66): search(Array, '/var/services/w...', Array, Array, '/linux', 1, 'natural') #2 /volume1/web/dokuwiki/inc/parser/renderer.php(117): syntax_plugin_simplenavi->render('xhtml', Object(Doku_Renderer_xhtml), Array) #3 /volume1/web/dokuwiki/inc/parserutils.php(673): Doku_Renderer->plugin('simplenavi', Array, 5, '{{simplenavi>}}') #4 /volume1/web/dokuwiki/inc/parserutils.php(142): p_render('xhtml', Array, NULL) #5 /volume1/web/dokuwiki/inc/parserutils.php(89): p_cached_output('/var/services/w...', 'xhtml', 'sidebar') #6 /volume1/web/dokuwiki/inc/template.php(1580): p_wiki_xhtml('sidebar', '', false) #7 /volume1/web/dokuwiki/lib/tpl/dokuwiki/main.php(42): tpl_include_page('sidebar', true, tr in /volume1/web/dokuwiki/lib/plugins/simplenavi/syntax.php on line 163
Can you help me, please?
Namespace lists are currently ordered by their namespace. This leads to strange results, if the option "use_heading" is set and headings differ from namespace-name.
To avoid this, the use_heading option should be honored and if set, the list should be sorted (natural oder ascii) by the headlines of the namespaces start-page.
I made a simple doku and tried to name the page "docker-dokuwiki" and it disapearded in the menu.
If I rename it to "docker-dokuviki" everything is fine. And my page "docker-dokuwiki" could not be found in the search, if I Click on create, the content is displayed in edit mode.
I really like this plugin, it looks good, but it does also show the "sidebar" page in the menu, is it possible to hide it?
I could not find an option for something like that.
How can I hide simplenavi menu entries, if the user has no permission to read the linked page/namespace?
I guess this is a feature request?
I've noticed that ACL is not actually honored.
When you set restrictions to a namespace (for example, you want to restrict access to http://yoursite/admin:\* pages), the link is still visible.
To fix that you need to remove $type=='f' &&
from line 127 of syntax.php resulting this code:
//check ACL
if(auth_quickaclcheck($id) < AUTH_READ){
return false;
}
I use sneaky_index fix plugin to show my sitemap,and the result is I want.
But I'll try simplenavi to show my sitemap in sidebar page that result is different from my sitemap.
I use sneaky_index fix to affect ACL,but simplenavi does not been affected
This is because it uses new page resolving interface PageResolver
, which is not available in the previous DokuWiki releases.
We use URL as fnencode and our namespaces contains Å Ä Ö. This makes the index created by simplenavi look strange (wrong characters). Is there any way for us to correct this on our own or could you in some way "translate" the characters via coding? I saw in the built in Dokuwiki index that it shows up correct as ÅÄÖ.
I would like a way to limit the navigation to only namespaces. Some of our pages have a large number of links and it causes the navigation bar to become very long.
Today I upgraded the simplenavi plugin to 2023-08-03, did not change anything and am left with broken pages: instead of the navbar on the left, there is only a red box with a message
Error: Call to undefined function array_key_last()
An unforeseen error has occured. This is most likely a bug somewhere.
It might be a problem in the simplenavi plugin.
More info has been written to the DokuWiki error log.
and the rest of the page content doesn't show up anymore. The top menu is visible and accessible.
Downgrading only the plugin to 2023-01-09 resolved the issue immediately.
Our dokuwiki is Jack Jackrum since longer, uses the Bootstrap3 template and several plugins, all updated.
The error log, repeated several times, this is the only entry-block
#0 /var/www/html/dokuwiki/lib/plugins/simplenavi/syntax.php(70): syntax_plugin_simplenavi->getSortedItems('', 1, 1, 1, 1)
#1 /var/www/html/dokuwiki/inc/parser/renderer.php(119): syntax_plugin_simplenavi->render('xhtml', Object(Doku_Renderer_xhtml), Array)
#2 /var/www/html/dokuwiki/inc/parserutils.php(700): Doku_Renderer->plugin('simplenavi', Array, 5, '{{simplenavi>}}')
#3 /var/www/html/dokuwiki/inc/parserutils.php(158): p_render('xhtml', Array, NULL)
#4 /var/www/html/dokuwiki/inc/parserutils.php(96): p_cached_output('/var/www/html/d...', 'xhtml', 'wiki:navigation')
#5 /var/www/html/dokuwiki/inc/template.php(1592): p_wiki_xhtml('wiki:navigation', '', false)
#6 /var/www/html/dokuwiki/lib/tpl/bootstrap3/tpl/sidebar.php(33): tpl_include_page('wiki:navigation', 0, 1, 0)
#7 /var/www/html/dokuwiki/lib/tpl/bootstrap3/Template.php(1383): require('/var/www/html/d...')
#8 /var/www/html/dokuwiki/lib/tpl/bootstrap3/Template.php(1346): dokuwiki\template\bootstrap3\Template->sidebarWrapper('wiki:navigation', 'dokuwiki__aside', 'col-sm-3 col-md...', 'sidebarheader', 'sidebarfooter')
#9 /var/www/html/dokuwiki/lib/tpl/bootstrap3/main.php(93): dokuwiki\template\bootstrap3\Template->includeSidebar('left')
#10 /var/www/html/dokuwiki/inc/actions.php(27): include('/var/www/html/d...')
#11 /var/www/html/dokuwiki/doku.php(126): act_dispatch()
#12 {main}
but this is unfortunately nothing obvious to me, sorry.
Scenario:
I created a sidebar page namespace/sidebar
with the content:
{{simplenavi>namespace}}
then I created a page index
under the subnamespace: namespace:subnamespace:index
.
When I access namespace:subnamespace:index
, then i get the following error:
Error: Call to undefined function array_key_last()
An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the simplenavi plugin.
More info has been written to the DokuWiki error log.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.