Fix Flow Tips

A collection of tips for the FixFlowSkin.

Most apply to the GeminiTwoSkin as well, unless stated otherwise.

Tips for admins

Setting different defaults for colours, fonts, layout etc

In skin.php (near the top) change the keyword 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.

Switching off all style changing options

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.

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 colour (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 colour schemes for different groups

This makes really only 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 chosen last (unless they have not yet chosen 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.

Showing a RightBar page on all pages as default

In skin.php change SetTmplDisplay('PageRightFmt', 0); to SetTmplDisplay('PageRightFmt', 1);. 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

In skin.php changing $EnableSidebarSearchbox = 1; to $EnableSidebarSearchbox = 0; 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.

One problem with using the (:searchbox:) markup in the SideBar can be that changing to another skin will result in an ugly big searchbox in that skin's sidebar. To avoid this use conditional markup like this: Define in config.php an 'if enabled' conditional by adding:

     # adds 'enabled' conditional markup:
     $Conditions['enabled'] = "(boolean)\$GLOBALS[\$condparm]";

Then in the SideBar use this:

     (:if enabled smallsearchbox:)(:searchbox:)(:if:)

skin.php contains the code which defines the variable $smallsearchbox, but only if the default searchbox is disabled as stated at the beginning.

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

Add the 'enabled' conditional markup to config.php as given in the last paragraph.
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' image 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| http://mysite/urlpathto/image/redbt.gif"Close Rightbar"]]%%'''RightBar'''

This will place the image into the right top corner and RightBar as link and title to the left. Alternatively if you upload redbt.gif to the group PmwikiAdmin you can use it in the link by writing:

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

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 PmwikiAdmin group, the Main 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 Gemini/two with smallheader layout the logo image width should less than the sidebar width, i.e. maximum width ca. 160 pixels.

Removing the group name from the titlebar

Changing $EnableGroupTitle = 1; to $EnableGroupTitle = 0; in skin.php removes the group name from the titlebar. 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.

Removing action buttons and links

To make the wiki site looking less than a wiki and more than an ordinary web site the easiest way is to remove any topmenu items, best even to delete PageTopMenu pages, and to replace in the PageFootMenu the list items (with a *star) with ordinary links (just remove the stars), and delete all or most, perhaps just leaving an "edit" link beside the "page last modified" info.

An advanced technique is to show only certain links according to the privileges granted to the user, with conditional markup.

Categories: Skins