Gemini & FixFlow Tips

A collection of admin tips for the Gemini and FixFlow Skin

Setting defaults from config.php
Many default settings can be changed by setting them in config.php. This allows to have several wikisa spart of a farm, using one farm-installed skin, but having different defaults, like color and font schemes. The following variables can be set in a config.php file: $DefaultColor, $DefaultFont, $DefaultLayout, $DefaultSidebar, $DefaultMenu, $DefaultRightbar, $EnableRightBar, $EnableStyleOptions, $EnableThemes, $EnableSidebarSearchbox, $EnableFontSizer, $EnableSidebarFontSizer, $EnableGroupTitle.
Setting different defaults for colors, fonts, layout 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 the switching of style options (see next section).

You can also change the defaults in skin.php (near the top): change the keyword (for instance 'blue' or 'night') in SDV($DefaultColor,' keyword '); etc. 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.
Switching off all style changing options (disabling cookie setting)
In skin.php change $EnableStyleOptions = 1; to $EnableStyleOptions = 0;
This disables the cookie setting routines which the style switching relies on by not loading stylechange.php, the script with the cookie setting routines.
Switching off selected style changing options
This can be done by commenting out selected blocks of cookie setting routines in stylechange.php (enclose with /* ... */ ), while leaving the ones needed enabled. Another way would be in skin.php to place comment #-symbols in front of all array items of the $Page...List arrays which are not required. But make sure that the default set with $DefaultColor, $DefaultFont etc is available.
Restricting style 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.
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.
Setting different default color schemes for different groups
This makes most sense if the colour changing option is disabled. See above the first two entries for this. If it is not disabled users will see the colours they have choosen last (unless they have not yet choosen a different colour scheme).
Declare a default colour in config.php as the site's default, like adding $DefaultColor = 'blue';, and declaring default colours for specific groups in a group.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 defaults for other style options like fonts and layout can be set in config.php or group.php files.
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; in skin.php.
Showing a RightBar page on all pages as default
Set $EnableRightBar = 1; in skin.php or config.php. Authors can still disable the RightBar on individual pages or groups using custom markup .
Likewise if the RightBar is not shown as default, then authors can show it on individual pages or groups using custom markup (:showright:) on the page or the GroupHeader page.
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.
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.
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]]
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.
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.
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.
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.
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)
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.
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 ShowHide for details.


Category: Skins