Comments (6)
If I add the extra pagemenu-entries from plugins with the code from example at:
arsava/dokuwiki-template-vector#64
This snippet add the pagemenu-entries from plugins to list with links in the sidebar.
Furhermore, I made some changes to the last version of bookcreator, which support these links now as well.
from dokuwiki-plugin-bookcreator.
Hi
I have the same problem. I don't see the icon in all pages
The version is DokuWiki version: Release 2018-04-22b "Greebo"
Can anybody help us?
Thank you
from dokuwiki-plugin-bookcreator.
Do you have any error message? In web server log, or in console of your browser (reachable via 'Inspect' in right-mouse-button menu)
Does it make a difference if you use a different browser?
from dokuwiki-plugin-bookcreator.
I don't see anything unusual in the browser console or the server logs. It does seem to be an issue where style="display:none"
is being added to the list item. Maybe something to do with this?
from dokuwiki-plugin-bookcreator.
I was receiving this error into "Vector" template.
It was happening because the jQuery associates the Bookcreator link/button with the "plugin_bookcreator__addtobook" class. In my case, it was happening because jQuery (throught script.js
file available at Bookcreator plugin root directory) couldn't find any HTML element with "plugin_bookcreator__addtobook" class (add/remove pages to the book), so instead of adding/remove pages to the book on-the-fly (without reloading the page, as it happens with any other template), the web browser was redirecting to the page https://wiki.example.com/doku.php?id=[pageid]&do=plugin_bookcreator__addtobook
. Apparently the javascript doesn't trigger any error to the console when the class element "plugin_bookcreator__addtobook" doesn't exists into the page.
It was working with any other template because the Bookcreator link/button is created hooking MENU_ITEMS_ASSEMBLY
DokuWiki event (this event add the Bookcreator link/icon into the page and appends the "plugin_bookcreator__addtobook" class to the Bookcreator "li" [list item] element), but the Vector template doesn't handle this event, so I was using the code below to add the Bookcreator manually at my template at /lib/tpl/vector/user/tabs.php
:
//custom plugin tab
$items = (new \dokuwiki\Menu\PageMenu())->getItems();
foreach($items as $item) {
$query = parse_url($item->getLink(), PHP_URL_QUERY);
parse_str($query, $params);
if(!(empty($params['do'])) and !preg_match("/\b(&do=edit|&do=revisions|&do=backlink|&do=export_odt|&do=export_pdf|dokuwiki__top)\b/", $item->getLink())) {
$_vector_tabs_right["tab-" . $params['do']]["text"] = $item->getLabel();
$_vector_tabs_right["tab-" . $params['do']]["href"] = $item->getLink();
$_vector_tabs_right["tab-" . $params['do']]["nofollow"] = true;
}
}
This code parses the PageItems and add the third-party plugins to the Vector template tab. The Bookcreator link was showing as expected, but wasn't working with the "Failed to handle action: plugin_bookcreator__addtobook" error. The solution was adding the following line to the code:
$_vector_tabs_right["tab-" . $params['do']]["class"] = $params['do'];
This last line added the class "plugin_bookcreator__addtobook" to the link and it started working normally. I did tried to use a user custom JS to append the "plugin_bookcreator__addtobook" class after the page loading, but it fails, probably because the Bookcreator "script.js" file was trying to hook the element with "plugin_bookcreator__addtobook" class before the parsing my user custom JavaScript, so it fails. So yeah, if you're receiving this error with your template, you'll need to edit your template file directly to add a reference to Bookcreator "plugin_bookcreator__addtobook" class into it.
from dokuwiki-plugin-bookcreator.
Ah, I haven’t tested templates which doesn’t use the newest page tool menus. This is worth a look.
from dokuwiki-plugin-bookcreator.
Related Issues (20)
- automatic export of pdf using cron - partial solution - featurerequest HOT 3
- Feature Request: Include Media Files in eBook HOT 1
- add to book HOT 1
- Selection not user specific HOT 1
- Feature Request: list from namespace, media files, exclude ns & specific files, file selector HOT 2
- No "Add/remove to book" link in DW 2018-04-22c "Greebo" and Bootstrap3 template HOT 8
- List of pages by data or struct aggregation
- Plugin assumes that main content from the page is into #dokuwiki__content element HOT 1
- Aggregation of Struct plugin fails
- Template artictut and bookcreator HOT 1
- SNAPSHOT OF A NAMESPACE - dokuwiki for documentation: just export the content of a current namespace (no saved selections) HOT 3
- Maximum execution time of 30 seconds exceeded HOT 3
- Support for Igor HOT 2
- bookcreator and farmer plugin HOT 4
- Bookcreator appearing on a few pages HOT 1
- bookcreator missing on pages HOT 2
- Bookcreator and Move plugin HOT 3
- resolve_pageid is deprecated HOT 2
- Feature Request : choose position of the bookbar in the config
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dokuwiki-plugin-bookcreator.