plugin:dir:discussion
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:dir:discussion [2012-05-19 08:58] – removed 130.193.147.165 | plugin:dir:discussion [2023-08-10 21:35] (current) – [option collapse_sub] 45.156.242.133 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Plugin Dir - Discussions ====== | ||
+ | |||
+ | [[plugin: | ||
+ | ===== Questions ===== | ||
+ | |||
+ | ==== NDT and namespacename don't work ==== | ||
+ | As the title says: v.2013-12-08 doesn' | ||
+ | The simplest use case always keeps me out of luck. | ||
+ | < | ||
+ | ~~DIR: | ||
+ | |||
+ | ~~DIR? | ||
+ | |||
+ | ~~DIR? | ||
+ | </ | ||
+ | |||
+ | ==== I get all sorts of debug output in red ==== | ||
+ | The dir plugin looks like almost exactly what I want, it outputs a directory just as I need but it also outputs a load of what | ||
+ | appears to be diagnostics in red above the output that I want. | ||
+ | |||
+ | OK, I have just found out that turning the debug flag off stops this appearing but it's still a bit odd. All other code sends | ||
+ | output to debug.log when debug is turned on, it doesn' | ||
+ | |||
+ | Apart from that, brilliant, thank you! | ||
+ | |||
+ | Is there any way to specify how much output appears with the cols=description option? | ||
+ | |||
+ | ==== Skip flag, broken links ==== | ||
+ | Can't get the skip flag to recognize namespaces. [OK Solved] | ||
+ | |||
+ | Also, I get broken links. | ||
+ | |||
+ | |||
+ | |||
+ | --- [[user> | ||
+ | |||
+ | ==== Missing Table-Tag at the end ==== | ||
+ | |||
+ | I'm having a problem with the DIR plugin not inserting a ''</ | ||
+ | |||
+ | |||
+ | ==== Issues with 2007-06-26b ==== | ||
+ | |||
+ | > I'm trying to use this plugin with version 2007-06-26b. | ||
+ | > When I simply insert ~~DIR~~ it properly lists pages on my test install; however, when I try to use a more advanced function (such as ~~DIR: | ||
+ | |||
+ | Not that I know of. In the 2008-02-25 version of the plugin I changed the syntax a little bit, the namespace specification should start with a colon and the specification of any flags should start with a question mark. So, your statement should like like this: --- // jg // | ||
+ | |||
+ | ~~DIR? | ||
+ | |||
+ | |||
+ | ==== Pagename with space instead underscore ==== | ||
+ | |||
+ | > Hello, i install, and work fine.. but, i need the names of pages without underline; example, pagetitle is hello_world, | ||
+ | > but i want show "Hello world" | ||
+ | |||
+ | I would also love to see this implemented! | ||
+ | ==== Dir ignores tags ==== | ||
+ | |||
+ | > Hi, I just can't get tags to work... It lists all the pages and completely ignores the tag parameter (~~DIR? | ||
+ | >> I had the same problem see above. I've now managed to fix it. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Fixes/Bugs ===== | ||
+ | |||
+ | ==== only current namespace will be listed, no matter what I do ==== | ||
+ | Hi, I am trying to use DIR here for creating a sidebar index, but no matter what I try, it always lists the namespace relative to the page from which I call DIR. I tried all possible solutions like: DIR:: DIR:.. DIR: | ||
+ | Additionally it ignores the ego flag and just never displays the ego page in the listing. | ||
+ | |||
+ | Any ideas? PS: i am using URL rewriting, might this be the problem? I tried disabling it in the dokuwiki config with no success, didn´t try removing the rewriting-rules because I don´t have direct access to the webspace. | ||
+ | ==== Level of startpages ==== | ||
+ | |||
+ | > Hi | ||
+ | > 1: Shouldn' | ||
+ | > 2: Could the namespace-names be shown in the tree-view or as a column? I find it confusing to have a tree full of starts, if I have many start-pages. | ||
+ | > ANS: Use ? | ||
+ | > 3: I think there is an issue about security and ACL. Pages not accessible for the current user should not be listed (especially the description can contain confidential information). | ||
+ | > 4: Whats the syntax to get a list of all pages (=root namespace) independent of current namespace? **Solved, its '' | ||
+ | > 5: where does desc come from? Seems to me it's the unformatted content of the page? Shouldn' | ||
+ | > 6: user and userid have valid content only if the specific page had been edited at least once (not only created) | ||
+ | > Thanks for considering | ||
+ | > --- // | ||
+ | |||
+ | |||
+ | > 5: | ||
+ | > change function _tableCellContent in syntax.php to see the page title in description | ||
+ | > modify the line 964: | ||
+ | > to: $this-> | ||
+ | > --- //Ralph Hahn 2009/01/01 09:33// | ||
+ | |||
+ | |||
+ | ==== Filter by tag ==== | ||
+ | |||
+ | |||
+ | > Hi, | ||
+ | > Just been trying out this plugin and noticed a bug/issue. When I filter by using the tag flag it only filters correctly if I actually have tags as a displayed column. If I don't have a tags column it ignores what tags I've asked it to filter on. | ||
+ | > So this works: - | ||
+ | ~~DIR: | ||
+ | > And this doesn' | ||
+ | ~~DIR: | ||
+ | > --- // | ||
+ | |||
+ | > I've now managed to fix this by changing some code in the plug-in. I found that it was only loading the tag plugin if you showed the column, it was not loading it if you just had the flag set. If you open syntax.php in the dir plugin folder and look for the function " | ||
+ | < | ||
+ | case " | ||
+ | $val = split (';', | ||
+ | break ; | ||
+ | </ | ||
+ | > To this: - | ||
+ | < | ||
+ | case " | ||
+ | $val = split (';', | ||
+ | $this-> | ||
+ | break ; | ||
+ | </ | ||
+ | > This should then fix it. Not sure if this is the correct way, but it worked for me. | ||
+ | > --- // | ||
+ | |||
+ | |||
+ | ==== No contributor shown ==== | ||
+ | |||
+ | Greetings. | ||
+ | |||
+ | <code php> | ||
+ | case " | ||
+ | $users = $this-> | ||
+ | if (is_array ($users)) { | ||
+ | $index = 0 ; | ||
+ | foreach ($users as $userid => $user) { | ||
+ | if ($user && $user <> '' | ||
+ | if ($index++ > 0) { | ||
+ | $this-> | ||
+ | } | ||
+ | $this-> | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | else {$this-> | ||
+ | break ; | ||
+ | </ | ||
+ | |||
+ | (I forgot to say thanks for a great plugin! | ||
+ | |||
+ | |||
+ | ==== Respect Namespace Default Linking Rule ==== | ||
+ | |||
+ | |||
+ | Doesn' | ||
+ | It would be nice, if this plugin respect [[: | ||
+ | //---- 2009-07-31, Jorge// | ||
+ | |||
+ | |||
+ | |||
+ | ==== ACL-Bug ==== | ||
+ | |||
+ | There is an ACL bug with this plugin. When you call Dir plugin with relative path, the page, should be able to be seen, is hidden. It comes from auth_quickaclcheck function with relative path. That function checks the path as absolute path. | ||
+ | |||
+ | I make a patch for that, but it's dirty fixing. Please anyone fix it properly. | ||
+ | |||
+ | // | ||
+ | |||
+ | === Situation with the bug === | ||
+ | |||
+ | For example, the pages are: | ||
+ | * namespaceA | ||
+ | * pageA | ||
+ | * namespaceB | ||
+ | * pageB | ||
+ | the acls are: | ||
+ | * * @ALL none | ||
+ | * namespaceA: | ||
+ | and you write this in pageA | ||
+ | < | ||
+ | ~~DIR~~ | ||
+ | </ | ||
+ | Although all user has permission to read pageB, ACL check function compares the acls with string ' | ||
+ | |||
+ | In this situation, the plugin have to call the function with ' | ||
+ | |||
+ | === Diff === | ||
+ | < | ||
+ | --- syntax.php.org | ||
+ | +++ syntax.php | ||
+ | @@ -640,7 +640,7 @@ | ||
+ | | ||
+ | // | ||
+ | $id = pathID ($file) ; | ||
+ | --- if (auth_quickaclcheck ($id) < AUTH_READ) | ||
+ | +++ if (auth_quickaclcheck (substr($ns.$id, | ||
+ | | ||
+ | | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | === Additional === | ||
+ | |||
+ | some lines above is another line | ||
+ | |||
+ | if (auth_quickaclcheck (substr($linkid, | ||
+ | |||
+ | which should be replaced by | ||
+ | |||
+ | if (auth_quickaclcheck (substr($fqid, | ||
+ | | ||
+ | because $linkid is not set | ||
+ | |||
+ | (10.3.2014) | ||
+ | ==== Ego and collapse background ==== | ||
+ | |||
+ | I am using DokuWiki with a sidebar template (the [[template: | ||
+ | |||
+ | So I have implemented an additional flag called " | ||
+ | |||
+ | With this additional flag, I can create only one top-level sidebar and my whole wiki has got the perfect navigation ! | ||
+ | |||
+ | The second flag -**ego**- was added because the philosophy of the [[template: | ||
+ | |||
+ | **Q** //Why not use the DokuWiki index as sidebar ?// This is what the Better Navigation template uses by default. This does show a collapsible and expandable list of all pages in the wiki, but it has some disadvantages for me: | ||
+ | * It doesn' | ||
+ | * It shows namespace names as tree structure items. But namespaces don't have titles. Especially with the philosophy of the Better Navigation template, it makes sense that the navigation uses titles as these have more meaning to the readers than simply the page names. In contrast, the DIR plugin uses the index pages of namespaces (**start** by default) as tree structure items. Each start page can have a title, which makes for potentially better navigation. | ||
+ | |||
+ | === Usage === | ||
+ | |||
+ | Although it works on all kinds of pages, the collapse flag is really designed to be used on a sidebar. | ||
+ | |||
+ | * Install a sidebar template (like [[template: | ||
+ | * Download and install my modified dir plugin: [[http:// | ||
+ | * Create a sidebar page in the root namespace | ||
+ | * Enter this content:< | ||
+ | |||
+ | [[:start]] | ||
+ | |||
+ | ~~DIR::? | ||
+ | </ | ||
+ | |||
+ | And there you go ! | ||
+ | |||
+ | === Comments === | ||
+ | |||
+ | * In addition to the **collapse** and **ego** flags, I have also added some code to hide namespaces that are not readable by the current user's ACL. In a setup where certain subnamespaces are readable for an unreadable namespace, these subnamespaces will be hidden from the navigation. It works quite well with the **collapse** flag, but I haven' | ||
+ | * Some things to note about my proposed sidebar content: | ||
+ | * I set a title in the sidebar: this ensures that the link generated by the DIR syntax to the sidebar itself also has a nice title (Navigation), | ||
+ | * With the collapse flag, this link to the sidebar is only visible on pages in the root namespace. | ||
+ | |||
+ | Any suggestions, | ||
+ | |||
+ | ==== option collapse_sub ==== | ||
+ | |||
+ | I added an option **collapse_sub** which also lists all start pages of the first subnamespace | ||
+ | it's possible to combine it with **collapse* [[user> | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | This version has several bugfixes included (PHP 8.2). | ||
+ | |||
+ | ==== Bug, Page not displayed ==== | ||
+ | |||
+ | If the DIR plugin is used on a page, the pagecontent ist not displayed. \\ | ||
+ | Since update to 2014-09-29 " | ||
+ | |||
+ | --- [[user> | ||
+ | |||
+ | ==== Sidebar, Cannot access protected property Doku_Renderer_xhtml:: | ||
+ | Since update to 2014-09-29 " | ||
+ | |||
+ | [BUGFIX] Do not access protected renderer property | ||
+ | The Renderer counter is not resetted if render mode is not latex. | ||
+ | This prevents a PHP error when the protected _counter property is | ||
+ | accessed. | ||
+ | |||
+ | This issue is fixed with pull request #20 with commit 3589642 | ||
+ | |||
+ | But the pull request has not yet been accepted by the current project maintainer. | ||
+ | |||
+ | You can manually install the commit [[https:// | ||
+ | |||
+ | --- [[user> | ||
plugin/dir/discussion.1337410710.txt.gz · Last modified: 2012-05-19 08:58 by 130.193.147.165