plugin:npd
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
plugin:npd [2014-01-23 15:58] – created cstuder | plugin:npd [2022-07-29 23:22] (current) – Klap-in | ||
---|---|---|---|
Line 6: | Line 6: | ||
email : cstuder@existenz.ch | email : cstuder@existenz.ch | ||
type : action | type : action | ||
- | lastupdate : 2014-01-23 | + | lastupdate : 2015-11-05 |
- | compatible : weatherwax, binky | + | compatible : weatherwax, binky, ponder stibbons |
depends | depends | ||
conflicts | conflicts | ||
Line 13: | Line 13: | ||
tags : button, form, create | tags : button, form, create | ||
- | downloadurl: | + | downloadurl: |
- | bugtracker : # eg. http:// | + | bugtracker : https:// |
- | sourcerepo : # eg. http:// | + | sourcerepo :https:// |
donationurl: | donationurl: | ||
Line 23: | Line 23: | ||
===== Installation ===== | ===== Installation ===== | ||
- | Install | + | Search and install |
==== Add Button to Template ==== | ==== Add Button to Template ==== | ||
Line 61: | Line 61: | ||
===== Configuration and Settings ===== | ===== Configuration and Settings ===== | ||
+ | Note: Configuration settings of plugins can be controlled by the [[plugin: | ||
==== Plugin NTP Link Type ==== | ==== Plugin NTP Link Type ==== | ||
- | If set to '' | ||
- | <code html> | + | This setting controls the appearance of the page creation action: |
+ | |||
+ | * The value '' | ||
+ | |||
+ | * The value '' | ||
< | < | ||
- | | + | <div class=" |
- | <input class=" | + | <input class=" |
- | </ | + | </ |
</ | </ | ||
- | </code> | + | </html> |
- | Choose this according to your template. | + | Choose this setting |
===== Development ===== | ===== Development ===== | ||
Line 79: | Line 83: | ||
=== Change Log === | === Change Log === | ||
+ | * **2015-11-05** | ||
+ | * Fixes an issue with adding a page below two levels, by thylacine222 | ||
+ | * Updates spanish localization by Patricio Parraguez | ||
+ | * Updates korean localization by Myeongjin | ||
+ | * Adds bulgarian localization by Neli Dimitrova | ||
+ | |||
+ | * **2014-06-16** | ||
+ | * Adds japanese localization by Hideaki SAWADA | ||
+ | * Adds informal german localization | ||
* **2014-01-23** | * **2014-01-23** | ||
Line 87: | Line 100: | ||
===== FAQ ===== | ===== FAQ ===== | ||
+ | ===== Known issues ===== | ||
+ | Adding this button to a template is rather cumbersome and breaks when a template is updated. There must be a better way to do this. | ||
===== Discussion ===== | ===== Discussion ===== | ||
+ | |||
+ | ==== No-name behaviour and integration ==== | ||
+ | |||
+ | Dear author of this plugin, thanks for the plugin and some feedback: I like the general idea and I tried it for our local wiki, because I see the same problem for new users as you. However, two points finally stopped me using it, and I would like to inform you about them : | ||
+ | * **Plugin accepts "no name" creation**: The more important point. In the dialog box, creation of a page is possible without typing the name. A default name is then assumed (I think it was "page title" | ||
+ | * The integration into the template proved to be a bit difficult, although I got more or less there in the end. ((Using the default " | ||
+ | |||
+ | Best, Nøk (@2014-03-12) | ||
+ | |||
+ | |||
+ | Hi @all, | ||
+ | |||
+ | my simple complete solution of adding new pages is to show a little text-input field to give a name. | ||
+ | The value will be sent by jQ to DW. | ||
+ | |||
+ | See the simple script to put in the main.php of your theme: | ||
+ | |||
+ | < | ||
+ | // 2 lines of php (of course in a php area ;-) | ||
+ | |||
+ | $uriinput = ($_SERVER[' | ||
+ | $urioutput = basename($uriinput); | ||
+ | |||
+ | |||
+ | // and the following inside a html area | ||
+ | |||
+ | <script type=" | ||
+ | //< | ||
+ | if (typeof jQuery == ' | ||
+ | var script = document.createElement(' | ||
+ | script.type = " | ||
+ | script.src = " | ||
+ | document.getElementsByTagName(' | ||
+ | }; | ||
+ | |||
+ | $("# | ||
+ | event.preventDefault(); | ||
+ | name = $("# | ||
+ | if (name <> 0) | ||
+ | { | ||
+ | window.location.href = "/? | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | alert(" | ||
+ | } | ||
+ | }); | ||
+ | //]]> | ||
+ | </ | ||
+ | |||
+ | <form method=" | ||
+ | <input class=" | ||
+ | <input type=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Onload value of field will be actual site and if you type something in and press go, the script will send you to the page or if its not existing, to a blank. | ||
+ | |||
+ | Cheers | ||
+ | |||
+ | ==== Adjusting the action appearance to the toolbar of the dokuwiki template ==== | ||
+ | |||
+ | The '' | ||
+ | |||
+ | Changing the '' | ||
+ | |||
+ | <code php> | ||
+ | case ' | ||
+ | $ret .= '< | ||
+ | break; | ||
+ | </ | ||
+ | |||
+ | Using '' | ||
+ | |||
+ | Happy adjusting! | ||
+ | |||
+ | |||
plugin/npd.1390489125.txt.gz · Last modified: 2014-01-23 15:58 by cstuder