Hi,

thanks for the response...

that would definitely be one way to go about it.

The only issue is that now things have changed quite a lot. There are no more 
css files, instead less files are being used which generate css; also the 
method of working directly on the 'vector' skin doesn't help me trying to 
create a new one.

I think there are some additional steps or changes to be made in 'Vector.php' 
in order for things to work properly...


These are the changes I made already to the php file:

<code>

cat VectorX.php |more
<?php
/**
 * Vector - Modern version of MonoBook with fresh look and many usability
 * improvements.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 * @todo document
 * @file
 * @ingroup Skins
 */

if ( !defined( 'MEDIAWIKI' ) ) {
        die( -1 );
}

/**
 * SkinTemplate class for Vector skin
 * @ingroup Skins
 */
class SkinVectorX extends SkinTemplate {

        protected static $bodyClasses = array( 'vector-animateLayout' );

        var $skinname = 'vectorx', $stylename = 'vectorx',
                $template = 'VectorXTemplate', $useHeadElement = true;

        /**
         * Initializes output page and sets up skin-specific parameters
         * @param $out OutputPage object to initialize
         */
        public function initPage( OutputPage $out ) {
                global $wgLocalStylePath;

                parent::initPage( $out );

                // Append CSS which includes IE only behavior fixes for hover 
support -
                // this is better than including this in a CSS file since it 
doesn't
                // wait for the CSS file to load before fetching the HTC file.
                $min = $this->getRequest()->getFuzzyBool( 'debug' ) ? '' : 
'.min';
                $out->addHeadItem( 'csshover',
                        '<!--[if lt IE 7]><style 
type="text/css">body{behavior:url("' .
                                htmlspecialchars( $wgLocalStylePath ) .
                                
"/{$this->stylename}/csshover{$min}.htc\")}</style><![endif]-->"
                );

                $out->addModules( array( 'skins.vector.js', 
'skins.vector.collapsibleNav' ) );
        }

        /**
         * Loads skin and user CSS files.
         * @param $out OutputPage object
         */
        function setupSkinUserCss( OutputPage $out ) {
                parent::setupSkinUserCss( $out );

                $styles = array( 'skins.vectorx' );
                wfRunHooks( 'SkinVectorXStyleModules', array( &$this, &$styles 
) );
                $out->addModuleStyles( $styles );
        }

        /**
         * Adds classes to the body element.
         *
         * @param $out OutputPage object
         * @param &$bodyAttrs Array of attributes that will be set on the body 
element
         */
        function addToBodyAttributes( $out, &$bodyAttrs ) {
                if ( isset( $bodyAttrs['class'] ) && strlen( 
$bodyAttrs['class'] ) > 0 ) {
                        $bodyAttrs['class'] .= ' ' . implode( ' ', 
static::$bodyClasses );
                } else {
                        $bodyAttrs['class'] = implode( ' ', 
static::$bodyClasses );
                }
        }
}

/**
 * QuickTemplate class for Vector skin
 * @ingroup Skins
 */
class VectorXTemplate extends BaseTemplate {

        /* Functions */

        /**
         * Outputs the entire contents of the (X)HTML page
         */
        public function execute() {
                global $wgVectorUseIconWatch;

                // Build additional attributes for navigation urls
                $nav = $this->data['content_navigation'];

</code>


Unfortunately it doesn't seem enough to work properly :-(


Regards,

Kaya

----- Original Message -----
From: "Dmitrii Kouznetsov" <[email protected]>
To: "MediaWiki announcements and site admin list" 
<[email protected]>
Sent: Friday, December 20, 2013 2:18:06 AM
Subject: Re: [MediaWiki-l] Newbee trying to edit "Vector" skin

Hi, Kaya Saman.
I am novice, and my way is primitive.
I edited the
skins/vector/screen.css
skins/vector/screen-hd.css

I reduced the size of margins, to have more space for the 
articles formulas and figures. You may see the result at
http://mizugadro.mydns.jp/t
I tried to vary all the parameters, one by one.
It took for a while, to understand which change improves the view.
Perhaps, there is more intelligent way to do the same.

On Thu, 19 Dec 2013, Kaya Saman wrote:
> Hi,
>
> I'm wondering if anyone can point me into the right direction of how to edit 
> the 'Vector' skin?
>
> Basically since I'm really new to Mediawiki I just made a copy of the skin 
> folder and php file called vectorx in both cases:
>
> folder: vectorx
> php file: VectorX.php
>
> so far I've been following these pages on the Mediawiki site:
>
> http://www.mediawiki.org/wiki/Manual:Skinning/Tutorial
>
> http://www.mediawiki.org/wiki/Manual:Skinning/Vector
>
> http://www.mediawiki.org/wiki/Manual:Skinning/Vector/Example
>
>
> however, the last two links are the best though unfortunately they're for up 
> to Mediawiki 1.19.
>
> My setup is running Mediawiki 1.22 installed from the Archlinux repos.
>
> Since this is a really basic test setup I'm using, I have elected to go for 
> nginx and sqlite. The wiki is accessible and everything is fine.
>
> Using the modifications described in the links above the new skin shows up as 
> VectorX however, the menus aren't shown??
>
> Just everything from "Main Page" down... with no formatting.
>
> Having no experience with Mediawiki prior to this but reading the 
> man/faq/wiki pages it seems that the 'Vector' skin is now integrated into the 
> core of the wiki. How does this affect editing and replication?
>
> At the moment all I would like to do is replicate 'vector' in 'vectorx' in 
> order to learn how to modify it in terms of menus, backgrounds and other bits 
> and pieces.
>
>
>
> Regards,
>
>
> Kaya 
>
> _______________________________________________
> MediaWiki-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to