Mistakes are oft the stepping stones to failure.
MoniWiki는 기본적으로 header.php와 footer.php를 고쳐서 다양한 모습으로 자신의 개인위키를 만들 수 있다.

header.php, footer.php

wiki.php파일이 있는 위치에 header.php, footer.php가 있으면 읽는다. 이게 없으면 기본값으로 대치된다.
  • header.php, footer.php는 자신이 원하는 대로 꾸밀 수 있다.
  • include로 처리된다.
  • 메뉴 아이콘 테마를 고치려면 config.php를 고치거나 theme.php를 새로 만들어 고칩니다.

Theme 만들기

최상위 디렉토리의 header.php, footer.php를 쓰지 않고 theme/ 하위에 이러한 파일을 모아놓은 디렉토리를 구성하게되면 Theme를 만들 수 있다.

가장 간단한 테마는 header.php, footer.php, css/default.css로 구성되며, 다음과 같은 순서로 기본 디렉토리에 있는 header, footer 그리고 css를 theme디렉토리로 복사합니다.
  • mkdir theme/mytheme
  • header.php, footer.php를 theme/mytheme에 만들거나 복사.
  • 고친 css를 theme/mytheme/css/default.css로 복사
이 이외에, icon셋을 고치려면, theme.php를 고친 후 theme/mytheme/에 복사합니다.

기본적으로 위에서 설명한 header.php와 footer.php를 고치는 것으로 다양한 theme를 만드는 것이 가능하며, Theme에서는 Theme에 맞는 css를 만들어야 합니다. 예를 들어 cool이라는 테마의 구성은 다음과 같습니다.
$ find theme/cool/
theme/cool/
theme/cool/footer.php
theme/cool/imgs (옵션)
theme/cool/imgs/bg.gif (옵션)
theme/cool/header.php
theme/cool/css
theme/cool/css/default.css

테마를 기본 테마로 설정하기


테마는 config.php에서

<?php

 
.
 .
 .
$theme '테마이름';
$theme_css 1;

?>

이와 같이 설정할 수 있습니다.

$theme_css = 1 : 반드시 $theme = "테마이름"으로 지정된 테마의 css만 사용 가능하며, 일반 사용자는 다른 테마로 바꿀 수 없습니다. $theme_css = 0;으로 되어있는 경우는 UserPreferences에서 일반사용자가 자신이 원하는 theme로 지정이 가능합니다.

 
captcha
Username:
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2008-03-23 17:18:34
Processing time 0.0266 sec