DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:noblankcells

NoBlankCells Plugin

Compatible with DokuWiki

2009-02-14

plugin XHTML renderer Adds   to all table cells to prevent borders disappearing in IE6.

Last updated on
2009-06-24
Provides
Render

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

Description

experimental

This plugin adds a   to the end of all table cells this is to stop borders for cells disappearing in IE6. It is a replacement for the standard DokuWiki XHTML renderer, as such to use it you must set the renderer_xhtml setting to the plugin's name, 'noblankcells'. For simplicity's sake the plugin uses all of the standard renderers routines with the exception of tablecell_close, where it uses its own routine.

Thanks to xbr for providing a skeleton script to work with.

Download and Installation

Plugin source code is also available below, refer to plugins on how to install plugins manually. After installation set the renderer_xhtml configuration setting (via your wiki's admin panel) to 'noblankcells'.

Revision History

  • 2009-06-24 — released

Source

file: lib/plugins/noblankcells/renderer.php

<?php
/**
 * Render Plugin for XHTML output this prevents any table cells having no data. 
 * In IE6 a cell without data will not have a border. This is a problem for some theams BattleHorse for example
 *
 * @author Kyle Mathers <dokuwiki@mathersit.com.au>
 */
 
if(!defined('DOKU_INC')) die();
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
 
require_once DOKU_INC . 'inc/parser/xhtml.php';
 
/**
 * The Renderer
 */
class renderer_plugin_noblankcells extends Doku_Renderer_xhtml {
 
    /**
     * return some info
     */
    function getInfo(){
      return array(
        'author' => 'Kyle Mathers',
        'email'  => 'dokuwiki@mathersit.com.au',
        'date'   => '2009-24-06',
        'name'   => 'noblankcells',
        'desc'   => 'XHTML renderer Adds &nbsp; to all table cells to prevent borders disappearing in IE6.',
      );
    }
 
    function canRender($format){
      return ($format=='xhtml');
    }
 
    function tablecell_close(){
        $this->doc .= '&nbsp;</td>';
    }
 
 
}
 
//Setup VIM: ex: et ts=4 enc=utf-8 :

Sites Using This plugins

Bugs

To Do (feature requests)

Create Zip for download

Discussion / Requests for help

plugin/noblankcells.txt · Last modified: 2009-06-24 18:05 by 70.103.232.219