KKnd   PmWikiZhCnUtf8 /
InitialSetupTasks
SearchWiki
PmWikiZhCnUtf8.最近改变
编辑页面
页面修正

Once you have PmWiki up and running on your site (see PmWikiZhCnUtf8.Installation), you may want to begin customizing PmWiki for your particular needs. Most PmWiki customizations are performed in a file called local.php, which should go in the same directory that contains the pmwiki.php file.

When you first install PmWiki, the local.php file will not exist and so you'll have to create one if you want to perform any local customizations. You can either create local.php from scratch following the instructions below, or you can copy the sample-local.php file (in the scripts/ subdirectory) and use it as a starting point.

Here is a very simple local.php file:

  
<?php
  $WikiTitle = "MyNewWiki";
  $WikiImgUrl = "http://www.example.com/mylogo.gif";
?>
Note that local.php should always begin with <?php and end with ?>. Be sure there aren't any blank lines or spaces before the <?php or after the ?>, or else you'll get strange PHP error messages at the beginning of your wiki pages.

Note that local.php should always begin with <?php and end with ?>. Be sure there aren't any blank lines or spaces before the <?php or after the ?>, or else you'll get strange PHP error messages at the beginning of your wiki pages.

The local.php file above is setting the value of two 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 $WikiImgUrl variable specifies the URL of the icon image that will appear by default in the upper-left corner of each wiki page. PmWiki lets you set these (and other) variables in local.php so that you can change the look and feel of PmWiki from its default, sometimes substantially so. You can look at PmWikiZhCnUtf8.Variables for a list of variables that PmWiki uses, and also at PmWiki:PmWikiUsers for examples of other sites that are using PmWiki in customized ways.

After you've set up an initial local.php file, you can then begin to look at other LocalCustomizations you may wish to make to your wiki site. Don't forget to join the pmwiki-users mailing list, where you can email other WikiAdministrators for help on customizing PmWiki and participate in discussions about PmWiki improvements. And, once you have your site operational, be sure to add it to PmWiki:PmWikiUsers so others will know about it!

一旦你已经运行了PmWiki在你的网站上(见PmWikiZhCnUtf8.Installation),你就会想定制你自己的PmWiki了。大多数的自定义的PmWiki特性都可放在一个叫local.php的文件中,这个文件应当放在与pmwiki.php文件同样的目录下。

当你第一次安装完PmWiki之后,local.php文件并不存在,你必需自已创建一个。你或者按照下面的说明来写你的local.php文件,或者简单的从scripts/子目录中copy一个sample-local.php文件来

下面是最简单的local.php文件:

  
<?php
  $WikiTitle = "MyNewWiki";
  $WikiImgUrl = "http://www.example.com/mylogo.gif";
?>


注意local.php文件应当始终以<?php开头和以?>结束。确信在<?php之前和?>之后没有换行或者空格,否则的话在你的wiki页面的开始会出现一个PHP错误信息。

上面提到的local.php文件设定了两个被PmWiki使用的PHP变量。$WikiTitle 变量给出了你的网站的名字,这个名字将会出现在你的浏览器的标题栏上。$WikiImgUrl变量指定了默认出现在你的每一wiki页面的左上角的Logo图片的地址。 PmWiki允许你通过在local.php中设置这样和那样的变量来改变PmWiki默认的外观和感觉。 在PmWikiZhCnUtf8.Variables页面里列出了PmWiki使用的所有的变量,在PmWiki:PmWikiUsers 讨论组里可以找到其它使用PmWiki站点的定制的例子。

在你设置了初始的local.php文件之后,你可以看一看其它的LocalCustomizations,也许有一些正是你希望用在你的wiki站点上的。 不在忘记加入pmwiki-users邮件列表,你可以给其它WikiAdministrators发送邮件寻求自定义PmWiki方面的帮助,或者讨论一下PmWiki的改进。还有,一旦你的站点运行了,不要忘记加入到 PmWiki:PmWikiUsers 来让其它人知道它。

Trans. By LongWoSion

<< Installation | PmWikiZhCnUtf8.DocumentationIndex | LocalCustomizations >>


编辑页面 - 页面修正 - WikiHelp - SearchWiki - 最近改变 - Printable Version
页面最后更新于 16 九月, 2003, 时间 10:07

©
copyleft by [email protected]
or
[email protected]