Leaves < Skins > Light (talk? | users | test page | RWD? | set as default | unset | validate: HTML, CSS)
Requirements and extras | Version History | Installation instructions | Download 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:
- Lens Green Theme (default for this page)
- Lens Camel Theme
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
Lens requires:
- PmWiki v2 beta 44 or higher.
- ViewModes
Lens supports:
- Core features:
(:noheader:), (:notitle:), (:nofooter:), and (:noleft:)
directives%sidehead%
markup- group-specific sidebars, titleblocks, and footers
- HTMLHeader and HTMLFooter directives. HTMLFooter was placed in the footer div rather than just before the actual close of the HTML, to avoid breaking the layout. Move it if you need to.
- Optional core features:
- Cookbook recipes:
- RenamePage
- 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). - Set
like this:$Skin
$Skin = 'lens/theme_folder';
So to use the sample-green theme, it's $Skin = 'lens/sample-green';
. For SkinChange's
array, you set the values similarly, like so:
$PageSkinList
$PageSkinList = array( 'lens-sample-green' => 'lens/sample-green', 'lens-sample-camel' => 'lens/sample-camel' );
- 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 $WikiLibDirs
to -- 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.
Download
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
- Modern browsers with good CSS support, such as:
- 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.
- Internet Explorer 5.5 for Windows
- 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:
## provide backward compatibility for non-relative urls if ($VersionNum < 2001900) Markup('{*$var}', '<{$var}', '/\\{\\*\\$/', '{$');
I took a stab at making all of the required changes in the attached file.
Pico October 19, 2006, at 06:28 PM
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:
## comment out file_get_contents(), replace with an alternative ## $OldConfig = file_get_contents($file); $OldConfig = implode('', file($file));
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:
global $LensSharedPath, $LensSharedUrl, $LensSharedList , $LoFi, $HiFi, $BaseUrl,$PubDirUrl
,$FarmD
,$FarmPubDirUrl
; SDV ( $LensSharedList , array ( '$FarmD
/pub/skins/lens/shared' =>$FarmPubDirUrl
/skins/lens/shared' , 'pub/skins/lens/shared' => '$PubDirUrl
/skins/lens/shared' ) ); /* ---- STYLES FOR ALL BROWSERS ---- */
And at the very bottom I changed the code following the layout overrides to this:
foreach((array)$LensSharedList as $k=>$v) { $fk = FmtPageName($k,$pagename
); if (file_exists($fk)) { $fv = FmtPageName($v,$pagename
); $LensSharedPath = $fk; $LensSharedUrl = $fv; include_once("$fk/pagestore.php"); include_once("$fk/cssconfigurator.php"); break; } }
Awesomeness
OP really was very serious when he said this theme is highly customizable. Thanks and great job! --RS?
FAQ
- Q : Thank for the work done. Is it possible to add a Save button in Title Block-author ? -- fbab
- A : Not as far as I know. The save buttons need to be inside the editform's form tag, and the titleblock is definitely not inside that. -- Bronwyn