最近更新 - 使用說明 - 測試區 - 搜尋:
●獅吼文集
楔子?
佛法入門?
三藏經典?
修持正見?
法義討論?
實修儀軌?
名相淺釋?
佛教X檔案?
學佛心得?
佛教人物?
●其它
暫存區?
工作討論?
編輯選單

連結!pmwiki.org
* Cookbook
* Development
* PmWikiUsers
* SuccessStories

編輯本頁 列印預覽 群組歷史 本頁歷史


WikiStyles can be predefined in config.php by the WikiAdministrator.

The general format for defining WikiStyles is:
    
    $WikiStyle['stylename']['attribute'] = 'value';

So the line:

    $WikiStyle['darkgreen']['color'] = '#006400';

defines a style %darkgreen% that changes the text color attribute to #006400, like this.

The standard WikiStyles are automatically included via the stdconfig.php script unless disabled by

    $EnableStdWikiStyles = 0;

To restrict wiki page authors to the styles you define,
add the following statement in config.php:

    $WikiStylePattern = '%[-\\w]*%';

To turn off WikiStyles completely, execute:

    unset($WikiStylePattern);

The remainder of this page shows examples defining WikiStyles for use in PmWiki pages. These examples are taken verbatim from scripts/wikistyles.php:
    

# the %newwin% pattern causes links to open in a new window
$WikiStyle['newwin']['target'] = '_blank';		

# the %comment% style creates a comment in the markup
$WikiStyleTags['display'] = array('style' => 'display:$value; ');
$WikiStyle['comment']['display'] = 'none';

# define colored text styles as %black%, %white%, %red%,
# from CSS color names
foreach (array('black','white','red','yellow','blue','gray',
  'silver', 'maroon', 'green', 'navy', 'purple') as $c) 
    $WikiStyle[$c]['color'] = $c;

# define %darkgreen% from a CSS #RRGGBB color specification
$WikiStyle['darkgreen']['color'] = '#006400';

# example defining %highlight% with multiple attributes
# $WikiStyle['highlight']['color'] = 'black';
# $WikiStyle['highlight']['bgcolor'] = 'yellow';

<< CustomInterMaps | PmWiki.DocumentationIndex | CustomFreeLinks >>

編輯本頁 - 列印預覽 - 群組歷史 - 本頁歷史 - 搜尋
本頁更新於 2004 年 02 月 19 日,01:26 AM