DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:codebutton2

CodeButton2 Plugin

Compatible with DokuWiki

2013-12-08 "Binky" 2013-05-10 "Weatherwax" 2012-10-13 "Adora Belle" 2012-01-25 "Angua" but need javascript hack in core dokuwiki

plugin A plugin for adding custom code buttons into the toolbar with configuration, mix of codebutton_ext and custombuttons plugins. See screenshots below

Last updated on
2010-12-11
Provides
Action
Repository
Source

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 codebutton_ext, custombuttons

Tagged with button, code, toolbar

:!: need small javascript hacking in DokuWiki version since 2012-10-13 “Adora Belle”.

Download and Installation

Download and install the plugin using the Plugin Manager using the URL given above. Refer to Plugins on how to install plugins manually.

Prerequirements

php gd must be enabled

in debian-based system install with

sudo apt-get install php5-gd

Syntax and Usage

  1. Go to Admin Panel>CodeButton2
  2. Add buttons in a ini file format following this syntax:
    <button_name> = "<code_name>"
  3. Click save
  4. Now you will be able to see the code block and buttons at your toolbar.

ScreenShots

Configuration:

Result: new buttons in toolbar

Troubleshooting

Configuration in genpng.php

On some installation relative path don't work. Configure absolute path to font you want to use in variable $font in file genpng.php

 $font = '/var/www/html/wiki/lib/plugins/codebutton2/DejaVuSans.ttf'; //path to font you want to use 

Disable resizing icons in some dokuwiki releases

Some dokuwiki releases resize icons to 16×16 size. Just comment this resizing in /lib/scripts/edit.js (about line 40)

    // create the icon and add it to the button
 ..
    $ico.attr('src', icon);
    //Disable resizing icons
   // $ico.attr('width', 16);
   // $ico.attr('height', 16);
    $btn.append($ico);

Configuration of php

enable gd in php

plugin/codebutton2.txt · Last modified: 2015-03-17 15:14 by 37.200.79.25