It's better when it's simple

User Tools

Site Tools


Toplist Plugin

Compatible with DokuWiki

No compatibility info given!

plugin Insert status image into your DokuWiki page

Last updated on

The missing download url means that this extension cannot be installed via the Extension Manager. Please see Publishing a Plugin on Recommended are public repository hosts like GitHub, GitLab or Bitbucket.

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

The following security issue was reported for this extension: XSS vulnerability allows arbitrary JavaScript insertion. Author informed on 2009-11-08.

It is not recommended to use this extension until this issue was fixed. Extension authors should read the plugin security guidelines

Tagged with status


With this plugin you can insert a Toplist status image (counter) to your page. The format is


This will insert code

<img SRC=";logo=mc" border="0" alt="TOPlist" WIDTH="88" HEIGHT="60"/>



Create a new folder lib/plugin/toplist/ and place the following file in it: syntax.php.


 * Plugin Toplist: Show Toplist Status.
 * @license    GPL 2 (
 * @author     Mario Lacko <mario [dot] lacko [at] gmail [dot] com>
if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
 * All DokuWiki plugins to extend the parser/rendering mechanism
 * need to inherit from this class
class syntax_plugin_toplist extends DokuWiki_Syntax_Plugin {
     * return some info
    function getInfo(){
        return array(
                'author' => 'Mario Lacko',
                'email'  => 'mario [dot] lacko [at] gmail [dot] com',
                'date'   => '2006-04-09',
                'name'   => 'Toplist Plugin',
                'desc'   => 'Show your statistic from . Syntax: ~~toplist:000000~~',
                'url'    => '',
     * What kind of syntax are we?
    function getType(){
        return 'substition';
    function getSort(){ return 129; }
    function connectTo($mode) {
     * Handle the match
    function handle($match, $state, $pos, &$handler){
        $match = substr($match,10,-2); // Strip markup
        // Check alignment
        $ralign = (bool)preg_match('/^ /',$match);
        $lalign = (bool)preg_match('/ $/',$match);
        if ($lalign & $ralign) $align = 'center';
        else if ($ralign)      $align = 'right';
        else if ($lalign)      $align = 'left';
        else                   $align = NULL;
        return array(trim($match),$align);
     * Create output
    function render($mode, &$renderer, $data) {
        if($mode == 'xhtml'){
            $renderer->doc .= '<img SRC="'.$data[0].'&amp;logo=mc" border="0" alt="TOPlist" WIDTH="88" HEIGHT="60"/>';
            return true;
        return false;
//Setup VIM: ex: et ts=4 enc=utf-8 :


It's insert counter image from , like this ⇒

Hello, There's so many plug-ins, so please, think to include a Demo Link, just to have an idea…
plugin/toplist.txt · Last modified: 2018-06-06 00:14 by Klap-in

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