Lens

Note: the additional pages (headers and footers) provided with this skin need the variable $EnableRelativePageVars set to 0 in config.php.

Super-configurable

You do not need to know HTML or CSS to customize Lens. Most skin furniture, such as the footer and action list, are now stored in wikipages. Group-specific pages are supported in most of these blocks, especially the sidebar, action list, and footer. There are also options to hide or show links relevant to certain PmWiki features, such as uploads or feeds. Here are some of the other options you get out of the box:

3 colour schemes

7 common web font faces, and you can choose different fonts for headers vs body text

Many feature and layout overrides -- see skin.php for details

Liquid, elastic, or fixed-width layout

Sidebar width and orientation

Choice to use absolute positioning or floats to create columns

You can also add your own CSS files, and choose whether they should be loaded during both lo-fi and hi-fi mode, or during hi-fi mode only. Please read the included implementation.txt file for more information.

Multiple custom themes

You can save as many themes for Lens as you like. Try out another one:

Edit the skin.php file -- inside the new theme's directory -- to select options for the new theme.

Accessible

Lens is compatible with all kinds of devices and browsers, including older browsers, mobile phones, PDAs, text-based browsers, or screen readers. You'll automatically get hi-fi mode in a modern browser, and lo-fi mode in most anything else. Content comes before navigation, and internal navigation links let you jump around the page instantly.

ViewModes -- I called this skin Lens because it can help you focus on your task. If you aren't using views, you'll get the equivalent of author view. You can change this by editing Site.Footer and Site.TitleBlock to suit you.

Version History

April 30, 2007

I have finally gotten round to updating Lens to be compatible with PmWiki 2.2.0 beta 44, especially the page variable changes that Pico kindly pointed out.

Because I'm not as active with PmWiki anymore and the editing help and features keep changing/improving, I've turned off the custom editform and edit quick reference.

I don't expect to be doing much more development on Lens unless Pm brings out sufficiently good blogging support soon. I want to have a combined portfolio and blog site where everything Just Works, and another blog or two, and I've been waiting so long that I'm thinking it'll be less painful to learn some other system than to keep working around PmWiki's nonblogginess.

Sometime back in 2005

Original version. It worked well for a long time, so I left it alone.

Installation

Download the skin package.

Unzip it into your skins directory (usually pmwiki/pub/skins).

If you want to, add a wiki tagline (a short phrase describing your site) by setting $WikiTagline = ' - My tagline here'; in local/config.php. To display it, comment out the 'feature-wikitagline-off', line from the skin.php of the relevant theme (or all of them, if you like).

Install the ViewModes recipe. If you want to be able to switch views, put this in your config.php:

$View = 'author';
include_once("$FarmD/cookbook/views.php");

If you don't want anyone to change the view, then use

include_once("$FarmD/cookbook/views.php");
$View = 'author';

And if you want to use standard view instead of Author view (it's a bit simpler), the line $View = 'author'; should be $View = 'standard';.

Notes on included wikipages

Wikipages specific to Lens live in /pub/skins/lens/shared/wikilib.d, using the trick from SkinGuidelines. You don't have to do anything special to use them, and they won't overwrite any of your own pages. Certain preferences and translation information can be found in Site.LensPreferences.

If you are using the SharedPages recipe, you'll be glad to know that your shared pages take precedence over Lens's built-in versions. So if you want, for example, to use a modified version of Site.Copyright across your entire farm, you can. Just edit the relevant pages while in the appropriate farm field. And, as usual, pages in the field's wiki.d take precedence over the built-in pages. To get the opposite effect -- Lens's pages overriding your shared pages -- you could explicitly set $WikiLibDirs, or copy Lens's original pages over the versions in your shared directory. Be warned that I'm not certain exactly what you ought to set $WikiLibDirsto -- it probably depends on your particular configuration, so I recommend asking the pmwiki-users mailing list.

If you're using an old version, or have re-enabled the editform customizations: to stop users from creating their own edit form preferences for Lens, set $EnableEditFormPrefs = FALSE; in a local/config.php file. You can also override the skin's default value by setting $PageEditForm in config.php, or disable site preferences entirely with $EnablePrefs = 0; in config.php.

Horizontal navigation lists aren't getting all the borders and padding/margins, but seem to be otherwise ok

liquid layout: seems to be happiest with window maximized. Window resizing not only jerky, but may cause browser to become confused over which background colour to apply to what. When you hover over a non-visited link, browser changes to correct background colour, but only for the block element containing the link.

Won't even guess about:

Internet Explorer for Mac

Lo-Fi or Flowed mode

Every browser with any CSS support can cope with lo-fi mode, though there may be minor rendering errors, e.g. in Internet Explorer 4 (none actually obscured content). There are no columns, and more internal navigation links are visible. Browsers without CSS support will see an unstyled but still functional page, in this order: masthead, titleblock, content, footer, sidebar.

Contributors

Comments & Fixes

Fixes for PmWiki Version 2.2.0-betas

Update from Bronwyn: I've incorporated Pico's fixes into the new version, including the backward compatibility snippet.

The beta series of PmWiki 2.2.0 has changed the way that relative links from included pages are handled and skins, such as Lens, that use
included pages, such as TitlBlock-standard and Footer-standard, will need to change the included links to make sure that they explicitly
over-ride the new behavior under PmWiki 2.2.0

The basic changes are simple: add an asterisk to PageVariables that should return the value from the page being viewed (as opposed to the value of the page in which the markup was added).

Specifically, {$Name} should be changed to {*$Name} in edit links, with similar changes to {$Group} and {$FullName}, {$Title}, {$Titlespaced} etc.

That will make the skin work as intended under PmWiki 2.2.0, but it will break the links under prior versions. To fix that, Pm has suggested that the following markup definition be added (to config.php, or, better yet, to skin.php) to test the PmWiki versionand define the new markup form for prior versions:

Workaround for file_get_contents() function

For security reason, some web hosts may disable file_get_contents() function, which causes cssconfigurator.php in lens/shared/ directory unable to run. If it happens, replace the function with an alternative as below:

Use as a Field-local skin.

I've been experimenting with installing skins that are local to a particular field of the farm, since the webserver that hosts PmWiki services a number of virtual domains, and I'm the only one with write access to the farm configuration directory. I want to be able to tell the other users how to install a skin locally, so I don't have to be invovled. In any case, I had to make a few minor changes to skin.php for Lens to work right. At the top, it was changed to read: