Open TimoKramer opened 9 years ago
Hi there. I installed npd plugin on "Hrun" successfully. But I used manual install - create path_to_dokuwiki/lib/plugins/npd folder and copy all files of the plugin there. You must change owner and rights of the folder and files in it. I used:
chown -R wwwrun:www path_to_dokuwiki/lib/plugins/npd
chmod -R 755 path_to_dokuwiki/lib/plugins/npd
Inserting
if (!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) {
$npd->html_new_page_button();
}
is not in /lib/tpl/default/main.php because there is no such file. You can add it in /lib/tpl/dokuwiki/tpl_header.php in section In Hrun:
<!-- SITE TOOLS -->
<div id="dokuwiki__sitetools">
<h3 class="a11y"><?php echo $lang['site_tools']; ?></h3>
<?php tpl_searchform(); ?>
<div class="mobileTools">
<?php tpl_actiondropdown($lang['tools']); ?>
</div>
<ul>
INSERT HERE
<?php
tpl_action('recent', 1, 'li');
tpl_action('media', 1, 'li');
tpl_action('index', 1, 'li');
?>
</ul>
</div>
In Detritus:
<!-- SITE TOOLS -->
<div id="dokuwiki__sitetools">
<h3 class="a11y"><?php echo $lang['site_tools']; ?></h3>
<?php tpl_searchform(); ?>
<div class="mobileTools">
<?php tpl_actiondropdown($lang['tools']); ?>
</div>
<ul>
INSERT HERE
<?php
tpl_toolsevent('sitetools', array(
tpl_action('recent', true, 'li', true),
tpl_action('media', true, 'li', true),
tpl_action('index', true, 'li', true)
));
?>
</ul>
</div>
This will lead to appearance of "Create New Page" button on the right side of the "Recent Changes" link. I changed style of button to be "link" from plugin settings and I added this change - font-size:85%; in file path_to_dokuwiki/lib/plugins/npd/helper.php
switch ($link_type) {
case 'link':
$ret .= '<a rel="nofollow" href="'.$url.'" style="font-size:85%; display:none;" id="npd__create_button" class="action npd">'.$label.'</a>';
break;
You can add button/link somewhere else of course but for me there is the best place for it and it look really nice.
I hope that this information will help you. Have a nice day. :)
Hi,
I tried to install this plugin using the dokuwiki-template with 'Hrun' and failed. I really tried to read properly and to understand the code but in the end I switched to DokuBook-template because it was too much of a hustle. I would write a manual for that myself but without succeeding, I cannot. Thanks anyway for the plugin, my coworkers really needed it.