Extension talk:StyleByHeaderTree

From MediaWiki.org
Jump to navigation Jump to search

Hi François Moreau.
I think this extension is very practical. Could you give me some more example on using and installing it?

For example,the example in the extension page have to put insert to Localsetting.php or Mediawiki.Common.css page. Installing it, we should use

include_once('extensions/StyleBySection/StyleBySection.php');

or

require_once( "$IP/extensions/StyleBySection/StyleBySection.php" );

or like following

require_once( "$IP/extensions/StyleBySection/StyleBySection.php" );
$rules = array(
         'rule-one' => array('title=' => 'Example',
                            'attr'   => array('class' => 'section-h##LEVEL##')),
         'rule-two' =>array('title-match' => '/^Second/',
                            'attr'  =>  array('id' => 'second-##COUNTER##',
                                              'class' => 'second')));
 
$wgHooks['OutputPageBeforeHTML'][] = array(
    new StyleBySection(),
    'apply',
    $rules);

Thinks!--Roc michael 20:38, 6 May 2008 (UTC)

Hi Roc michael,

Thanks for your interest. I have updated the extension and clarified its usage. If something remains unclear, I'll be glad to help!

Lampyridae 01:45, 21 October 2008 (UTC)