[pmwiki-users] Skin

H. Fox haganfox at users.sourceforge.net
Tue Aug 29 00:28:15 CDT 2006

On 8/28/06, pmwiki at 911networks.com <pmwiki at 911networks.com> wrote:
> Hi,
> I need to start a new wiki. There 2 types of users:
> * Internal users which are allowed to do editing, and create new
> pages
> * External users [Internet] that are only allowed to read some
> of the groups
> What skin do you suggest that will support the (:noaction:)
> conditionally? Or is there a better way to control access?

You can use the default skin.  :-)

Make a logo at http://cooltext.com/ (use a background color of
247/247/247) and install the cmsb-cmsmode.php recipe script.[1], then
set a default sitewide edit password and add this near the end of your
config.php file:

  ## Put the wiki in "CMS Mode".
  $pagename = ResolvePageName($pagename);

  ## Apply a "CMS effect" to the default PmWiki skin
  if (! CondAuth($pagename, 'edit')) {
    $HTMLStylesFmt['CMSMode'] = '
   .headnav, #wikicmds, .pagegroup, .footnav { display:none }
   .pagetitle { margin-top:8px; } div.lastmod { color:#cccccc; }

For some other minor embellishments, add this too:

 $HTMLStylesFmt['ShouldBeInACSSFile'] = '
   #wikihead { margin-top:5px; }
   #wikihead a { text-decoration:none; color:black; }
   #wikihead a:hover { text-decoration:underline; color:blue; }
   .inputbox { background-color:#fcfcfc; margin-right:3px; padding-left:3px; }
   .inputbutton { background-color:#e7e7e7; font-weight:bold; padding:1px; }
   .wikimessage { background-color:#ffffcc; }

I started out using this for "throw-away wikis" (mostly for event
planning) and those ended up working so well I've started doing it
elsewhere.  The default skin looks quite "clean" read-only.


Here's some wikitext to paste at the bottom of your Sidebar (5
lines... pardon the wrapping):

%right% [-[[Site.SideBar?action=edit | edit SideBar]]-](:if ! auth admin:)\\
%right color=#cccccc padding-right=1em% [-[[Main.HomePage?action=login
| Log in]]-][[<<]]
(:if auth admin:)\\
(:if auth edit:)
%right color=#cccccc padding-right=1em%
[-[[Main.HomePage?action=logout | Log out]]-][[<<]]


[1] http://www.pmwiki.org/wiki/Cookbook/CMSBundle

More information about the pmwiki-users mailing list