DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:codebutton2

CodeButton2 Plugin

Compatible with DokuWiki

Binky, Weatherwax, Adora Belle, Angua

plugin A plugin for adding custom code buttons into the toolbar with configuration

Last updated on
2013-12-10
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, deprecated, toolbar

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

Download and Installation

Search and install the plugin using the Extension Manager. 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” button
  4. Now you will be able to see the code block and buttons at your toolbar

ScreenShots

Configuration

Configuration

Result: new buttons in the toolbar

Result

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: 2023-05-04 20:39 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki