On 12-07-23 6:17 PM, linuxlover wrote:
> Il giorno lun, 23/07/2012 alle 17.54 -0700, Daniel Friesen ha scritto:
>> No, you should have two classes in your skin. The one inheriting from
>> BaseTemplate is your skins template, that one should be {MySkin}Template,
>> not {MySkin}. You need a different class called {MySkin} that inherits
>> from SkinTemplate (which while confusingly named is a Skin class rather
>> than a template). This class is what defines what template and css to use.
>>
> Bokoor.skin.php
> ---------------------------------
> class SkinBokoor extends SkinTemplate {
> var $skinname = 'bokoor', $stylename = 'bokoor',
> $template = 'Bokoor', $useHeadElement = true;
You want $template = 'BokoorTemplate'
> /**
> * @param $out OutputPage object
> */
> function setupSkinUserCss( OutputPage $out ){
> parent::setupSkinUserCss( $out );
> $out->addModuleStyles( "skins.bokoor" );
> }
> }
>
> /**
> * @todo document
> * @ingroup Skins
> */
> class BokoorTemplate extends BaseTemplate {
> -----------------------------------------------------------------------
>
>
>
> bokoor.php
> ------------------------------------
> $wgExtensionCredits['skin'][] = array(
> 'path' => __FILE__,
> 'name' => 'Bokoor',
> 'url' => "http://www.alfredodimaria.it",
> 'author' => '[http://mediawiki.org/wiki/User:Admdebian]',
> 'descriptionmsg' => 'Bokoor skin - mediawiki 1.19.1',
> );
> $wgValidSkinNames['bokoor'] = 'Bokoor';
> $wgAutoloadClasses['SkinBokoor'] = dirname(__FILE__).'/Bokoor.skin.php';
> $wgExtensionMessagesFiles['Bokoor'] =
> dirname(__FILE__).'/Bokoor.i18n.php';
>
> $wgResourceModules['skins.bokoor'] = array(
> 'styles' => array(
> 'bokoor/css/screen.css' => array( 'media' => 'screen' ),
> ),
> 'remoteBasePath' => &$GLOBALS['wgStylePath'],
> 'localBasePath' => &$GLOBALS['wgStyleDirectory'],
> );
> ------------------------------------------------------------
>
>
> Error:
> -------------------------------------------------------------------------
> PHP Fatal error: require_once(): Failed opening required
> '/var/www/mediawiki-1.19.1/skins/Bokoor.php'
> (include_path='.:/usr/share/php:/usr/share/pear') in
> /var/www/mediawiki-1.19.1/includes/Skin.php on line 155
>
>
>
>
> ADM
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l