Not logged in. · Lost password · Register
Forum: General Help and Support Features and Functionality RSS
toolbar button position
Avatar
xrfang #1
Member since Jul 2010 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: toolbar button position
I am setting up a new dokuwiki installation and installed a bunch of plugins I consider useful.   Now I have a question:

Many plugins install buttons on the toolbar which is of course very convenient for users. But as more plugins get installed, buttons get crowded and cluttered on the toolbar.

How can I arrange button positions on the toolbar, and further, can I group buttons into a dropdown box like the smiley button do?

I am a programmer and happen to know PHP and javascript. I just need some directions about where to start.  Of course if this could be done without programming, fantastic...


Thanks a lot!
Avatar
andi (Administrator) #2
User title: splitbrain
Member since May 2006 · 3393 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by xrfang:
I am a programmer and happen to know PHP and javascript. I just need some directions about where to start.

http://www.dokuwiki.org/devel:toolbar should give you a starting point
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
xrfang #3
Member since Jul 2010 · 2 posts
Group memberships: Members
Show profile · Link to this post
Thanks Andi,  I read the document and some samples, which gave me an idea of this task.  

I successfully modified the "notes" plugin to let its buttons be a dropdown (picker), but now still have some problems:

1) in the note's script.js file, I see this:
        "icon": "../../plugins/note/images/tb_note.png",
    I think it could be changed to:
        "icon": "images/tb_note.png",
    but this does not work (toolbar does not show icon)!  I don't know why. Apparently the above 2 relative paths are pointing to the same place.

2) it is quite chaotic to control position of icon on toolbar (actually I failed on doing this), mainly because I don't know the sequence of button loading (i.e. which plugin gets loaded first and which later).  I wonder, is it possible to write a piece of javascript which gets called AFTER all plugins are loaded, to modify the button positions on-the-fly?  If there is such a "hook", what is the name of this javascript?

3) is the userscript's name fixed (script.js)?  If not, is doku loading all javascript files in the plugin's folder?

Thanks!
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-02-19, 20:24:40 (UTC +01:00)