Gemini & FixFlow Tips

A collection of admin tips for the Gemini and FixFlow skins

Setting defaults locally

Many default settings can be changed by setting them in local configuration files (config.php, Group.php or Group.Page.php). This allows to have several wikis as part of a farm, using one farm-installed skin, but having different defaults, like color and font schemes. Or having different defaults for different groups or pages. The following variables can be set in local configuration files:

Layout variations

Default styles

  • $DefaultColor
  • $DefaultFont
  • $DefaultRightbar
  • $DefaultSidebar
  • $DefaultMenu (FixFlow)
  • $DefaultLayout (Gemini)

User option switching

  • $EnableStyleOptions (all options)
  • $EnableColorOptions
  • $EnableFontOptions
  • $EnableRightbarOptions
  • $EnableSidebarOptions
  • $EnableMenuOptions (FixFlow)
  • $EnableLayoutOptions (Gemini)

Other Topics

top

Setting different defaults for colors, fonts, sidebar etc

You can set a new default color or font scheme in config.php by setting $DefaultColor = ' keyword '; or $DefaultFont = ' keyword '; for instance $DefaultColor = 'sky-blue'; which will load the sky-blue color scheme from the c-sky-blue.css file by default. If you wish that only the default scheme is used then you need to disable user switching for the option (see next section).

Each option is held in an option list like $PageColorList as a pair of values: the first is the keyword, which is used to set the option, for instance in links on pages, the second is the css filename, which gets loaded when the option is selected.

You can add your own schemes in form of a css file and an associated keyword to this array, and expand the available options, or replace them. You can also restrict options by commenting lines (placing a hash symbol # at the beginning of the line) in the list. But make sure that whatever is set as default with $Defaultcolor or $DefaultFont is available (not commented out) in the $PageColorList or $PageFontList array.

top

Disabling user options (disabling cookie settings)

  • $EnableStyleOptions = 0; disables all user option switching.
  • $EnableColorOptions = 0; disables color switching.
  • $EnableFontOptions = 0; disables font switching.
  • $EnableRightbarOptions = 0; disables rightbar width switching.
  • $EnableSidebarOptions = 0; disables switching sidebar position.
  • $EnableMenuOptions = 0; (FixFlow) disables switching scrolling/fixed sidebar.
  • $EnableLayoutOptions = 0; (Gemini) disables switching standard/small header layout.

top

Restricting the list of options

In skin.php place #-comment symbols at the beginning of each option in the $Page...List option array which should be disallowed. Leave only the options uncommented which are allowed.

top

Adding more color (or font) options

Best is to save a colour (font) css file under a new name, add a line to the $PageColorList ($PageFontList) array, like 'newcolor' => 'c-newcolor.css'; , add the new option as a link to a wiki page like StyleOptions to create a switch to set the new colour scheme, and then edit the css file, changing colours and background images etc till it is right.

top

Setting different default color schemes for different groups

This makes most sense if the color changing option is disabled. See above the first two entries for this. If it is not disabled users will see the colors they have choosen last (unless they have not yet choosen a different colour scheme).
Declare a default color in config.php as the site's default, like adding $DefaultColor = 'blue';, and declare a default color for a specific groups in a local/GroupName.php file. If it does not exist create one in the local directory, like local/MyGroup.php with content for example like:

 
     <?php if (!defined('PmWiki')) exit();
     $DefaultColor = 'red-gold';
     ?>

Likewise any other defaults can be set in a config.php, Group.php or Group.PageName.php file.

top

Using (:theme ...:) markup to display colour and font schemes

A custom markup (:theme colourscheme fontscheme:) can be used to show individual pages or groups with different colour and font schemes. For instance (:theme sand:) will show the current page in 'sand' colour scheme. (:theme red-gold comic:) will show the current page in 'red-gold' colour scheme and 'comic' font scheme. The first parameter after (:theme needs to be a valid colour scheme name, the second parameter is optional and needs to be a valid font scheme name (or be omitted).
Theme markup can be disabled by setting $EnableThemes = 0;.

You can set a background image with (:theme background=IMAGEURL:). IMAGEURL is the url of your background image. This theme uses the transparent color scheme.

top

Setting a custom background image

You can set a background image in config.php with $BackgroundImgUrlFmt = 'urlpathtoimage';. urlpathtoimage should be your image url (not the file path). This will be applied for the transparent color scheme, so you need to choose the 'trans' option for color schemes as well. You can also set background images in individual pages or groups with markup (:theme background=urlpathtoimage:).

top

Disabling/enabling the `RightBar page on all pages

$EnableRightBar = 0; diables the rightbar sitewide. Authors can still enable the `RightBar on individual pages or groups using custom markup (:showright:).
$EnableRightBar = 1; enables the rightbar sitewide. If a RightBar page is created it will show. Authors can hide it on individual pages or groups using custom markup (:noright:).

top

Removing or relocating the sidebar searchbox

Setting $EnableSidebarSearchbox = 0; in skin.php or config.php removes the searchbox from the sidebar. However, adding markup (:searchbox:) anywhere in the `SideBar will add the searchbox at that location. This can be done in other configuration pages as well, like `PageTopMenu, `PageFootMenu, `PageFooter. This provides a flexible way of offering a searchbox, even in different ways for different groups.

top

Removing or relocating the sidebar fontsizer buttons

Setting $EnableSidebarFontSizer = 0; in skin.php or config.php removes the fontsizer buttons. They can be deployed at elsewhere with markup (:fontsizer:). Commenting out in skin.php include_once("$SkinDir/fontsizer.php"); will uninstall the fontsizer alltogether.

top

Adding switches to the sidebar to toggle scrolling and fixed mode (`FixFlow only)

Add to the sidebar at the top preferably:

     (:if enabled scrollswitch:)
     [-Menu: [[{$Name}?menu=scroll|scroll]] [[{$Name}?menu=fixed|fixed]]-]
     (:if:)

The variable $scrollswitch is set to 1 in skin.php. The conditional markup will only show the switch links within the `Fixflow skin.
This is just an example of two links labelled 'scroll' and 'fixed'. One could replace those labels with small images if desired, like

 [[{$Name}?menu=scroll|urlpathtoimage/scroll.gif]] [[{$Name}?menu=fixed|urlpathtoimage/fixed.gif]]

top

Adding a 'Close `RightBar' button to the `RightBar

redbt.gif is a small red close button included in the skin's image folder. Upload it to some image directory on the site and add on the `RightBar at the top:

 %align=right%[[{$Name}?rb=0| urlpathtoimage/redbt.gif"Close Rightbar"]]%%'''RightBar'''

This will place thew image into the right top corner and RightBar as link and title to the left.

top

Removing the group name from the titlebar

You can remove the group link in the titlebar on individual pages (or groups) with markup (:nogroup:). Changing $EnableGroupTitle = 1; to $EnableGroupTitle = 0; in skin.php removes the group name from the titlebar for the whole site. A nice alternative for showing the group name in the titlebar is showing it as a link in the PageTopMenu. Add *[[{$Group}]] to the list will do the trick. Adding *[[$Name}]] will show the page name as well, which may be useful information, since the page title may be different from the actual page name.

top

Adding a logo and/or site title

A logo can be added either by setting $PageLogoUrl in config.php to point to a logo image, or by creating a PageHeader page and adding there any logo image or title text. If a PageHeader page exists in the Site group or the current group, it will be used. Otherwise a logo set in config.php with $PageLogoUrl will be used. Note that for `FixFlow and for `GeminiTwo with smallheader layout the logo image width should less than the sidebar width, i.e. maximum width ca. 160 pixels.

top

Changing the font size for the title

If you prefer to see the title displayed in a smaller font size, you can change it easily by adding #titlebar {font-size:75%} to a pub/css/local.css file, or $HTMLStylesFmt[]=" #titlebar {font-size:75%} \n"; to your config.php file. Vary the percentage value to your taste, the default set in all the font css files is 100%. Note that this changes the size of the title and the group link in the titlebar. For more customised sizes change the values in the font css files, under #pagegroup and #pagetitle.

top

Creating page titles with non-standard (fancy) fonts

The normal page titles can be replaced with images of non-standard (fancy) fonts, by creating a page with the string "-`TitleBar" added to the name of the page, like "`MyPage-`TitleBar". Put the image as attachment on this page, without any lines before or after (for instance: Attach:myfancyfonttitle.gif). Best is to create a gif image of the title in special font, using a transparent background, in an image editor. A page named as described above will take the place of the normal page title, in the space of the titlebar. (from fixflow-v3e and gemini-v9e onwards)

top

Using the Popup-EditForm

Popup-EditForm is the default edit form and provides popup preview and help panes, as well as a wide edit window and double rows of buttons both abopve and below the edit textbox. If it is not wanted it can be disabled by commenting out in skin.php the line include_once("$SkinDir/popup2edit.php");. If the use of toggle buttons is not needed the line include_once("$SkinDir/showhide.php"); can also be commented out, which prevents these scripts from loading. If any of these scripts are loaded as a cookbook script then the corresponding code lines should also be commented out.

top

Using Toggle Buttons

The included showhide.php script adds the popup preview and help functionality. The markup (:showhide div=divname ... :) can also be used on any other page to create toggle buttons to toggle whatever section or object. See Toggle for details.

top

Changing the sidebar width

$SidebarWidth = '175px'; is the default, and this can be changed to suit different needs.

top

Disabling pmwiki-core.css

$EnablePmWikiCoreCss = 1; is the default, which loads PmWiki's core styles via a separate style sheet, and not via injecting the styles in the HTML head of the page, as PmWiki is doing now by default. Set this to zero if you want PmWiki's default behaviour. Eventually PmWiki will include a separate style sheet for the core styles, right now the skin is offering an alternative.

Contributors


Category: Skins