<li></li>
around it, it shows up. Drawback: the icon is the standard “edit” pencil, and I did not see how to change it.A dialog which helps people creating new pages.
Compatible with DokuWiki
weatherwax, binky, ponder stibbons
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to addnewpage, addnewpagedeluxe, new_page_dialog
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Decide where you want to insert the “Create New Page” button in your template and insert the following code:
if (!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) { $npd->html_new_page_button(); }
Most likely you want to do that in the /lib/tpl/default/main.php
inside the <div id="bar__bottomright"/>
as follows:
<div class="bar-right" id="bar__bottomright"> <?php if (!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) $npd->html_new_page_button(); ?> <?php tpl_button('subscription')?> <?php tpl_button('admin')?> <?php tpl_button('profile')?> <?php tpl_button('login')?> <?php tpl_button('index')?> <?php tpl_button('top')?> </div>
Note that the button will only be shown if the browser is JavaScript enabled.
Exception: The template DokuBook has the New Page Dialog-button automatically added.
This plugin solves a pain point for many newcomers to wikis: How to create a new page. It focuses on the way people are used to storing files and aims to resemble a regular “Save As” dialog with “Add Folder” functionality.
Clicking on the button opens this pop-up which allows to create new folders and pages in existing folders.
Note: Configuration settings of plugins can be controlled by the Configuration Manager plugin.
This setting controls the appearance of the page creation action:
link
will cause it to appear as an HTML link element, similar to this: button
(default) will cause it to appear as an HTML form element with a button, approximately like this: <form> <div class=“no”> <input class=“button”/> </div> </form> </html>
Choose this setting according to your template.
This plugin has been adopted from new page dialog plugin by Pierre Spring.
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.
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 :
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['REQUEST_URI']); $urioutput = basename($uriinput); // and the following inside a html area <script type="text/javascript"> //<![CDATA[ if (typeof jQuery == 'undefined') { var script = document.createElement('script'); script.type = "text/javascript"; script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; document.getElementsByTagName('head')[0].appendChild(script); }; $("#create_new_page").on("submit", function(event){ event.preventDefault(); name = $("#jq_read_field").val(); if (name <> 0) { window.location.href = "/?id="+ name +""; } else { alert("Please enter a name for your page."); } }); //]]> </script> <form method="get" id="create_new_page"> <input class="edit" type="text" name="id" id="jq_read_field" value="<?php echo $urioutput; ?>" size="32" maxlength="100" /> <input type="submit" value="Go" /> </form>
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
The dokuwiki
template of the current DokuWiki version (Hrun) has a nice toolbar to the right of each page, with icons that pop out a menu when hovering over them. While the link
appearance of this plugin matches that better than the button
appearance, it still looks inconsistent.
Changing the link
case in the file dokuwiki/lib/plugins/npd/helper.php
as follows lets the “Create New Page” action have the same appearance as the actions in that toolbar:
case 'link': $ret .= '<li><a rel="nofollow" href="'.$url.'" style="display:none;" id="npd__create_button" class="action create" title="'.$label.'"><span>'.$label.'</span></a></li>'; break;
Using class=″action create″
selects the page creation icon from the pagetools icons of the dokuwiki
template, it looks like the pen of the edit icon, with a plus-sign in the lower right corner.
Happy adjusting!
<li></li>
around it, it shows up. Drawback: the icon is the standard “edit” pencil, and I did not see how to change it.