A collection of tips for administrators

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. You can also set a new default color or font scheme in config.php by setting $DefaultColor = 'keyword'; or $DefaultFont = 'keyword';

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 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 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

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' 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

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.

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.

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)

This page may have a more recent version on pmwiki.org: PmWiki:GeminiTips, and a talk page: PmWiki:GeminiTips-Talk.


Page last modified on September 02, 2005, at 01:06 AM EST