[[{$Name}#reqs | Requirements and extras]] | 
[[{$Name}#install | Installation instructions]] | 
[[{$Name}#download | Download Lens]]

!!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:

* [[Lens Sample Theme -> {$Name}?skin=lens-sample]] (default for this page)
* [[Lens New Theme -> {$Name}?skin=lens-newtheme]]

Here's how to make your own theme:

# Copy the /sample directory inside pub/skins/lens.  
# Rename the copy.  
# 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.

!!Support, requirements and extras [[#reqs]]

Lens requires pmwiki v2 beta 44 or higher, with the most recent version being heartily recommended since that's what I'm developing it on.  The list is incomplete, but Lens supports:

* Core features:
** [@(:noheader:), (:notitle:), (:nofooter:), and (:noleft:)@] directives
** [@%sidehead%@] markup
** group-specific sidebars, titleblocks, and footers
* Optional core features:
** [[PmWiki/Uploads]]
** [[PmWiki/RSS]]
** [[PmWiki/RefCount]]
* Cookbook recipes:
** [[Cookbook/RenamePage]]
** [[Cookbook/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.

!!Installation [[#install]]

# 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).
# Set @@$Skin@@ like this:

[@
	$Skin = 'lens/theme_folder';
@]

So to use the sample theme, it's [@$Skin = 'lens/sample';@].  For [[Cookbook/SkinChange | SkinChange's]] @@$PageSkinList@@ array, you set the values similarly, like so:

[@
	$PageSkinList = array(
		'lens-sample' => 'lens/sample',
		'mylenstheme' => 'lens/mytheme'
	);
@]


!!!Notes on included wikipages

Wikipages specific to Lens live in /pub/skins/lens/shared/wikilib.d, using the trick from [[Cookbook/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 not using the [[Cookbook/ViewModes]] recipe, you may want to either rename or edit the included `LensEditForm, since it contains a couple links only required in standard view, but that appear when you have not got the viewmodes script.  To avoid this, I'd have to require the [[Cookbook/ConditionalExtensions]] recipe.  Right now, it's not worth it for two measly lines that are easily removed if you don't want them.

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.

If you are using the [[Cookbook/UseCommonPagesInAWikiFarm]] 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 $WikiLibDirs ''to'' -- it probably depends on your particular configuration, so I recommend asking the [[PmWiki/MailingLists | pmwiki-users mailing list]].

!!!Download [[#download]]
Attach:lens.zip

!!Browser compatibility

!!!Hi-fi mode (with columns)

* Works well in:
** Firefox 1.0
** Opera 7+ (wrapping on the command tabs in the titleblock can be iffy in liquid mode)
** Internet Explorer 6 for Windows (though it's buggier than the others)

* Likely to work well in:
** Modern browsers with good CSS support, such as:
*** Safari and by extension probably Konqueror
*** Gecko-based browsers like Netscape 6 or up, Mozilla, Camino, Galeon, etc.
*** Opera after version 5 or 6 on a guess

* Buggy but still usable:
** Internet Explorer 5.5 for Windows
*** Window resizing is visibly jerky
*** 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
[[~Bronwyn]]
----
Category: [[!Skins]]
