I've sort of hacked together templates for Tarquin's Paddington and Montparnasse proposed skins as Smarty templates, and stuffed and prodded it into the development branch of MediaWiki.
Go on down to test.wikipedia.org, log in, and pick the new skins. (Warning: very VERY incomplete! Lots of links not showing pretty text yet.)
Smarty templates get compiled down to PHP scripts, so "in theory" it shouldn't be slower than writing the interface in raw php. The advantage is in maintainability; I've attached the 4k Paddington template file for comparison against the current combined 96k of OutputPage and Skin which contain, amongst many other things, the HTML layout in scattered dribs and drabs.
To get the Smarty template working, I swapped a chunk of OutputPage::output() into Skin::outputPage(), so the widest pieces of page layout could be done by the template.
I think it'd be a good thing to separate out the functional groups in OutputPage and Skin: wikitext->HTML conversion, RecentChanges layout, history page layout, image upload history layout, HTTP magic, and full-page layout (at the least!).
Skin discussion: http://meta.wikipedia.org/wiki/Skins
General info on Smarty: http://smarty.php.net/
Installation notes: get the Smarty download from the above site (Smart is under LGPL license), untar it, and make sure its "libs" subdirectory is in your PHP include path. Put the *.tpl files into a "templates" directory under the wiki script directory (ie, /w/templates) and make also a templates_c directory writeable by the web server, where it stores the PHP scripts compiled from the templates.
-- brion vibber (brion @ pobox.com)
Brion Vibber wrote:
I've sort of hacked together templates for Tarquin's Paddington and Montparnasse proposed skins as Smarty templates, and stuffed and prodded it into the development branch of MediaWiki.
Yikes! I'd better get back to work on designs!
I've been looking around and it seems there is no solution to the problem of the page footer only occupying space beneath the article -- ie not filling the full width because of the quicklink bar.
The problem is that we cannot guarantee which of the two columns (article & quickbar) will always be the longest. All the CSS layouts I've seen that put a footer beneath columns require one to be longer than the other to do the "pushing down" of the footer -- and stub articles are often shorter than the quickbar.
Anyway, I'm going to look at the skins I made with a critical eye -- comments on them would be welcome :)
On Thu, 2003-09-11 at 15:33, tarquin wrote:
Yikes! I'd better get back to work on designs!
Mwooh-haa-haa-haaaaa! My evil plan for making other people work has come to fruition!
I've been looking around and it seems there is no solution to the problem of the page footer only occupying space beneath the article -- ie not filling the full width because of the quicklink bar.
The problem is that we cannot guarantee which of the two columns (article & quickbar) will always be the longest. All the CSS layouts I've seen that put a footer beneath columns require one to be longer than the other to do the "pushing down" of the footer -- and stub articles are often shorter than the quickbar.
Hmm, that shouldn't be necessary...
The simplest thing is to make the sidebar column a float, and give the footer a clear: both (see attached file for example). There are a couple problems with this, though: the sidebar has to come before the body in the source (which is bad for keyboard users & voice browsers). Also if you have a clear inside the body div, it seems to zip all the way down to the bottom of the sidebar. Bah!
Another possibility is to use Javascript to reposition the sidebar. (Ewwww!)
Or, of course, you could use a table. ;)
Anyway, I'm going to look at the skins I made with a critical eye -- comments on them would be welcome :)
Broadly speaking, I quite like Montparnasse. It's got the feel of what I liked from Cologne Blue, but things don't run together so much.
From a technical standpoint I have to say that right-handed sidebars are
more problematic than left-handed sidebars; oversized images, tables, or preformatted text can overflow into the sidebar, either under/over it or pushing it offscreen. Putting the default sidebar on the left may be cleaner.
-- brion vibber (brion @ pobox.com)
Brion Vibber wrote:
On Thu, 2003-09-11 at 15:33, tarquin wrote:
Yikes! I'd better get back to work on designs!
Mwooh-haa-haa-haaaaa! My evil plan for making other people work has come to fruition!
:(
Hmm, that shouldn't be necessary...
The simplest thing is to make the sidebar column a float, and give the footer a clear: both (see attached file for example). There are a couple problems with this, though: the sidebar has to come before the body in the source (which is bad for keyboard users & voice browsers).
and also for slow modems and text browsers -- this option is not good for a default skin.
Also if you have a clear inside the body div, it seems to zip all the way down to the bottom of the sidebar. Bah!
yuck!
Another possibility is to use Javascript to reposition the sidebar. (Ewwww!)
Eww indeed!
Or, of course, you could use a table. ;)
double ewww!
From a technical standpoint I have to say that right-handed sidebars are
more problematic than left-handed sidebars; oversized images, tables, or preformatted text can overflow into the sidebar, either under/over it or pushing it offscreen. Putting the default sidebar on the left may be cleaner.
I agree. I suggest we remove the user option for quickbar float / left / right. It's a considerable amount of hassle to implement, since several things in the HTML and the CSS depend on the quickbar alignment. It would be easier IMO to make a second template with a right-aligned bar! (Though pedias with right-to-left text would probably want a quickbar on the right.)
wikitech-l@lists.wikimedia.org