Faire un don


administrators (basic)

Once you have PmWiki running on your site (see Installation), you can customize it for your particular needs.

Most PmWiki configuration is performed in files called local/config.php and pub/css/local.css.
Some configuration is done on special pages in the Site and SiteAdmin groups, such as the Site.SideBar menu.

The local configuration file (local/config.php)

When you first install PmWiki, the local/config.php file does not exist. Copy the sample-config.php file (in the docs/ directory) to local/config.php and use it as a starting point. You could create local/config.php from scratch, but sample-config.php is already populated with many of the options you might want to adjust.

Here is a simple config.php file:

<?php if (!defined('PmWiki')) exit();
$WikiTitle = "My New Wiki";
$PageLogoUrl = "http://example.com/mylogo.gif";

# Uncomment these if needed
#$ScriptUrl = 'http://example.com/pmwiki/pmwiki.php';
#$PubDirUrl = 'http://example.com/pmwiki/pub';

$DefaultPasswords['admin'] = crypt('onesecret');

$EnableUpload = 1;
$DefaultPasswords['upload'] = crypt('secrettwo');

putenv("TZ=EST5EDT");
$TimeFmt = '%B %d, %Y, at %I:%M %p EST';

Note that config.php begins with <?php . The PHP end tag ?> is optional, and can be left off to improve compatibility with some operating systems. Be sure there aren’t any blank lines or spaces before the <?php or after any closing ?>, or else you may get strange PHP error messages at the beginning of your wiki pages.

The config.php file above sets the value of PHP variables used by PmWiki:

  • The $WikiTitle variable gives the name of your site as it will appear in a user’s browser title bar.
  • The $ScriptUrl and $PubDirUrl variables tell your wiki where it is located. Often pmwiki can guess, but if you have difficulty with links not working or skins not being found then try uncommenting these lines.
  • The $PageLogoUrl variable specifies the URL of the icon image that will appear in the upper-left corner of each wiki page.
  • The $DefaultPasswords[‘admin’] sets an administrative password.
  • Setting $EnableUpload to “1″ enables Uploads (“Attached files”). $DefaultPasswords[‘upload’] sets an upload password.
  • The TZ environment variable defines a particular time zone (see Cookbook:ChangeTimeFormat).
  • The $TimeFmt variable defines the appearance of time strings and (along with TZ) localizes the wiki to a specific time zone (see Cookbook:ChangeTimeFormat).

By setting these (and other) variables in local/config.php, you can change the look and feel of PmWiki from its default, sometimes substantially so. See PmWiki.Variables for a list of variables that PmWiki uses, and see PmWiki:PmWikiUsers for examples of sites that use PmWiki in customized ways.

Other common setup tasks

The following variables are often requested when preparing a new wiki

  • Author required when editing a page $EnablePostAuthorRequired = 1;
  • Set the $DefaultGroup

These common [

]^’

Other customization

After setting up local/config.php file, you may wish to make other local customizations. See the PmWiki Cookbook for a large number of customizations that have been contributed. And don’t fear Cookbook recipes - they’re well prepared, so that most of them require only to download a single file, add a one-line include command to config.php, and voil! - they’re working!

If you (or others sharing your server) want to maintain more than one wiki on the same server, see Wiki Farms.

Now what?

Don’t forget to join a PmWiki mailing list, where you can email other wiki administrators for help on customizing PmWiki and participate in discussions about PmWiki improvements. Once you have your site operational, be sure to add it to PmWiki:PmWikiUsers so others will know about it!



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

Page mise jour le 24 dcembre 2009 10h40 par Peter Bowers
diter page | Chg: Groupe Site | RSS | Attr:Page Groupe | Header/Footer | Wiki Help 0,302 s.