Hi,
I'm new to wikimedia and I have a few questions about modifying and designing skins:
1) Are the interfaces for the Skin/SkinTemplate class families documented anywhere?
2) Do the Skin interfaces actually provide any facilities for abstracting page design? Looking at MonoBook.php, all of the work seems to be done in the execute method, and it looks like pretty standard html/php/css - there doesn't seem to be a particular wikimedia code idiom.
3) Is there perhaps an existing skin with a more transparent design I might use for study and modification?
Thank you, Jay
- Are the interfaces for the Skin/SkinTemplate class families
documented anywhere?
Not as far as I know.
- Do the Skin interfaces actually provide any facilities for
abstracting page design?
Again, not as far as I know. Indeed, some things are even hardcoded; for example, I'm having a hard time figuring out how to change the output of the category links (I need a proper list - i.e. LIs inside an UL element)...
- Is there perhaps an existing skin with a more transparent design I
might use for study and modification?
I've recently started creating my own skin, and went through MonoBook, labeling the respective PHP parts with their respective function. If you're interested, I could send that to you - though it might be messy... I could also send you my current skin, but that's in its very early stages still.
-- F.
On 13/07/07, Frederik Dohr fdg001@gmx.net wrote:
Again, not as far as I know. Indeed, some things are even hardcoded; for example, I'm having a hard time figuring out how to change the output of the category links (I need a proper list - i.e. LIs inside an UL element)...
I'm almost certain I've given the answer to this one out twice; you refer to your own Skin derivative, which can therefore override the Skin::getCategoryLinks() method to construct a real list as opposed to our current, loose string (which sucks).
Rob Church
I'm almost certain I've given the answer to this one out twice; you refer to your own Skin derivative, which can therefore override the Skin::getCategoryLinks() method to construct a real list
I know you did - but I still can't get it done. I've spent a lot of time trying to figure it out, but I'm simply not skilled enough when it comes to PHP...
as opposed to our current, loose string (which sucks)
Indeed. ;)
-- F.
I'm almost certain I've given the answer to this one out twice; you refer to your own Skin derivative, which can therefore override the Skin::getCategoryLinks() method to construct a real list
I know you did - but I still can't get it done.
I've had some help with this issue, and am happy (and relieved) to proclaim that this has been fixed now. Apparently the key was to use "$skin = $wgUser->getSkin();"...
-- F.
Frederik Dohr wrote:
I'm almost certain I've given the answer to this one out twice; you refer to your own Skin derivative, which can therefore override the Skin::getCategoryLinks() method to construct a real list
I know you did - but I still can't get it done.
I've had some help with this issue, and am happy (and relieved) to proclaim that this has been fixed now. Apparently the key was to use "$skin = $wgUser->getSkin();"...
Didn't work using $this as $skin?
Apparently the key was to use "$skin = $wgUser->getSkin();"...
Didn't work using $this as $skin?
To be honest, I'm not sure; I don't really remember what exactly I'd tried before giving up - but a friend helped me fix it eventually, and I'll just trust his judgment there...
If you're interested, I'd posted the entire code as a sample here: http://www.mediawiki.org/wiki/Manual:Skinning/Example
-- F.
Indeed, some things are even hardcoded; for example, I'm having a hard time figuring out how to change the output of the category links (I need a proper list - i.e. LIs inside an UL element)...
If you want to do this the "right way", then your best bet is to overload some method.
However, if you want to do it the fast-and-dirty hack way, see this:
http://jimbojw.com/wiki/index.php?title=How_to_display_MediaWiki_Categories_...
-- Jim R. Wilson (jimbojw)
On 7/16/07, Frederik Dohr fdg001@gmx.net wrote:
Apparently the key was to use "$skin = $wgUser->getSkin();"...
Didn't work using $this as $skin?
To be honest, I'm not sure; I don't really remember what exactly I'd tried before giving up - but a friend helped me fix it eventually, and I'll just trust his judgment there...
If you're interested, I'd posted the entire code as a sample here: http://www.mediawiki.org/wiki/Manual:Skinning/Example
-- F.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On 16/07/07, Jim Wilson wilson.jim.r@gmail.com wrote:
If you want to do this the "right way", then your best bet is to overload some method.
...which is precisely the solution I gave out.
Rob Church
If you want to do this the "right way"
I certainly do!
then your best bet is to overload some method
I thought that's what I (or my friend) had done... !? Would you mind taking a quick look: http://www.mediawiki.org/wiki/Manual:Skinning/Example
http://jimbojw.com/wiki/index.php?title=How_to_display_MediaWiki_Categories_...
I guess I should be glad I didn't know about this before - otherwise I would certainly have gone for the easy but dirty way...
-- F.
Apparently the key was to use "$skin = $wgUser->getSkin();"...
Correction; apparently the key was to use $this->set('catlinks', $this->getCategories()); inside the execute() method.
I've updated the example accordingly: http://www.mediawiki.org/wiki/Manual:Skinning/Example
(I'm still composing my skin, that's why didn't notice this omissions before.)
-- F.
- Is there perhaps an existing skin with a more transparent design I
might use for study and modification?
I've recently started creating my own skin, and went through MonoBook, labeling the respective PHP parts with their respective function. If you're interested, I could send that to you
I've created a page outlining the basic structure of a typical MediaWiki skin file: http://www.mediawiki.org/wiki/Manual:Skinning It's not perfect (and the code listed there is partly untested), but I hope it will help you get started - and also serve as a reference for myself.
Corrections and improvements are of course welcome...
-- F.
On Sun, 2007-07-15 at 10:43 +0200, Frederik Dohr wrote:
I've created a page outlining the basic structure of a typical MediaWiki skin file: http://www.mediawiki.org/wiki/Manual:Skinning It's not perfect (and the code listed there is partly untested), but I hope it will help you get started - and also serve as a reference for myself.
Corrections and improvements are of course welcome...
Thank you. I don't have time to look at in detail now, as I'm about to head out on vacation, but i look forward to looking it over when I get back.
Thanks again, Jay
mediawiki-l@lists.wikimedia.org