Skip to content

Commit cdb9ea7

Browse files
author
ditto
committed
'사이트 구축하기' 문서 추가
1 parent 954503c commit cdb9ea7

File tree

2 files changed

+51
-3
lines changed

2 files changed

+51
-3
lines changed

docs/manual/manual.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ h2 {
1818
color: #000;
1919
border-bottom: 1px solid #000;
2020
}
21-
p {
21+
p, pre {
2222
margin-top: 0.5em;
2323
}
24-
ol {
24+
ol, ul {
2525
margin: 1em 3em;
2626
}
2727
a {
@@ -30,7 +30,7 @@ a {
3030
a:hover {
3131
background-color: #efc;
3232
}
33-
code {
33+
code, pre.code {
3434
background-color: #eee;
3535
font-family: Monaco, "Courier New", sans-serif;
3636
}

docs/manual/site_management.html

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3+
<html>
4+
<head>
5+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6+
<title>사이트 구축하기 - MetaBBS 도움말</title>
7+
<link rel="stylesheet" href="manual.css" type="text/css" />
8+
</head>
9+
<body>
10+
<h1>MetaBBS로 사이트 구축하기</h1>
11+
12+
<h2>시작하기 전에</h2>
13+
<p>이미 MetaBBS가 설치되어 있고, 모든 파일이 UTF-8 인코딩으로 작성되어 있어야 합니다.</p>
14+
<p><strong>루트 디렉토리</strong>는 index.html 등 사이트를 구성하는 파일들이 있는 위치를 말합니다. 이 문서는 MetaBBS가 루트 디렉토리 바로 밑의 metabbs 디렉토리에 설치되었다고 가정하므로, 설치된 환경에 맞게 경로를 수정하시기 바랍니다.</p>
15+
16+
<h2>머리말과 꼬리말</h2>
17+
<ol>
18+
<li>모든 상대 경로를 절대 경로로 바꿔야 합니다. 즉, 이미지나 링크의 주소가 <code>logo.gif</code>처럼 되어있다면 <code>http://example.com/사이트 주소/logo.gif</code> 또는 <code>/사이트 주소/logo.gif</code>와 같이 바꾸면 됩니다.</li>
19+
<li>그 다음으로 해야할 일은 머리말과 꼬리말을 분리하는 것입니다. 내용이 들어갈 부분의 앞쪽과 뒤쪽을 분리하여 각각 루트 디렉토리에 header.php, footer.php로 저장합니다.</li>
20+
<li>header.php에서, <code>&lt;head&gt;</code><code>&lt;/head&gt;</code> 사이에 <code>&lt;?php if (isset($layout)) $layout-&gt;print_head(); ?&gt;</code>를 추가한 뒤 저장합니다.</li>
21+
<li>관리자 페이지의 [환경 설정] 메뉴에 들어가면 [머리말 파일], [꼬리말 파일] 칸이 있습니다. 각각 ../header.php, ../footer.php로 지정한 뒤 [OK] 버튼을 누릅니다.</li>
22+
<li>게시판으로 접속하여 레이아웃이 깨지지 않고 잘 나오는지 확인해봅니다.</li>
23+
</ol>
24+
25+
<h2>사이트 매니저 불러오기</h2>
26+
<p>사이트 매니저는 MetaBBS 외부에서 게시판 데이터에 접근할 수 있도록 해줍니다. 외부 로그인 폼이나 최근 게시물을 출력하기 원하는 파일 맨 위에 관리자 페이지의 [정보] 메뉴의 [코드 생성] 부분에 있는 코드를 복사하여 붙입니다.</p>
27+
28+
<h2>최근 게시물 출력하기</h2>
29+
<p>사이트 매니저를 불러온 뒤, 최근 게시물을 출력할 위치에 다음 코드를 삽입합니다.</p>
30+
<pre class="code">&lt;?php
31+
$metabbs-&gt;printLatestPosts('<strong>게시판 이름</strong>', <strong>글 개수</strong>, <strong>제목 길이</strong>);
32+
?&gt;</pre>
33+
34+
<h2>로그인 폼 및 사용자 정보 출력하기</h2>
35+
<p>사이트 매니저를 불러온 뒤, 원하는 위치에 다음 코드를 적절히 고쳐 삽입합니다.</p>
36+
<pre class="code">&lt;?php if ($metabbs-&gt;isGuest()): ?&gt;
37+
&lt;!-- 로그인 안 된 상태 --&gt;
38+
&lt;a&nbsp;href="&lt;?=url_with_referer_for('account', 'login')?&gt;"&gt;로그인&lt;/a&gt;
39+
&lt;?php else: ?&gt;
40+
&lt;!-- 로그인 된 상태 --&gt;
41+
&lt;strong&gt;&lt;?=$metabbs-&gt;user-&gt;name?&gt;&lt;/strong&gt;님,&nbsp;환영합니다.
42+
&lt;a&nbsp;href="&lt;?=url_with_referer_for('account', 'logout')?&gt;"&gt;로그아웃&lt;/a&gt;
43+
&lt;?php if&nbsp;($metabbs-&gt;user-&gt;is_admin()): ?&gt;
44+
&nbsp;&nbsp;&nbsp;|&nbsp;&lt;a&nbsp;href="&lt;?=url_for('admin')?&gt;"&gt;관리&lt;/a&gt;
45+
&lt;?php endif; ?&gt;
46+
&lt;?php endif; ?&gt;</pre>
47+
</body>
48+
</html>

0 commit comments

Comments
 (0)