• R/O
  • SSH
  • HTTPS

epitta-bbs: Commit


Commit MetaInfo

Revision10 (tree)
Time2011-04-28 00:32:48
Authorwajett

Log Message

2011/04/26 ツリーセット記事表示部部分など。

Change Summary

Incremental Difference

--- app/actions/article_action.php (revision 9)
+++ app/actions/article_action.php (revision 10)
@@ -95,9 +95,6 @@
9595 public function plain()
9696 {
9797
98- echo "disp plain, page=" . $this->page;
99-
100-
10198 $artMdl = new Article_model();
10299 $result = $artMdl->getArticles(1, 3, $this->page);
103100
@@ -117,9 +114,7 @@
117114
118115 public function tree()
119116 {
120- echo "disp tree, page=" . $this->page;
121117
122-
123118 $artMdl = new Article_model();
124119 $trees = $artMdl->getTrees(1, 2, $this->page);
125120 //var_dump($trees);
@@ -145,15 +140,9 @@
145140
146141
147142 $artMdl = new Article_model();
148- $trees = $artMdl->getTrees(1, 2, $this->page);
149- //var_dump($trees);
150- $branches = $artMdl->getBranches($trees);
151- //var_dump($branches);
143+ $tree = $artMdl->getSingleTree($this->trNum);
144+ $this->set['tree'] = $tree;
152145
153-
154- $this->set['trees'] = $trees;
155- $this->set['branches'] = $branches;
156-
157146 $this->set['view'] = __FUNCTION__;
158147 $this->setLayout('base');
159148
@@ -165,9 +154,9 @@
165154
166155 public function thread()
167156 {
168- echo "disp thread, page=" . $this->page;
169157
170158
159+
171160 $artMdl = new Article_model();
172161 $result = $artMdl->getArticles(1, 3, $this->page);
173162
--- app/actions/base_action.php (revision 9)
+++ app/actions/base_action.php (revision 10)
@@ -50,11 +50,13 @@
5050 //
5151 require_once( $dirPath . 'base_elements.php' );
5252
53+ $GLOBALS['APP']['layout'] = 1;
5354 require_once( $dirPath . $name . '_layout.php' );
5455
56+
5557 } else {
5658 //既定
57- $this->displayError('エラー');
59+ $this->displayError('ERROR');
5860
5961 }
6062
@@ -80,7 +82,7 @@
8082
8183 } else {
8284 //既定
83- $this->displayError('エラー');
85+ $this->displayError('ERROR');
8486
8587 }
8688
--- SetUpTools/create_sql.php (nonexistent)
+++ SetUpTools/create_sql.php (revision 10)
@@ -0,0 +1,101 @@
1+
2+
3+CREATE TABLE epitta_boards (
4+
5+ id TEXT PRIMARY KEY,
6+ name TEXT NOT NULL UNIQUE,
7+ remarks TEXT,
8+ admin TEXT NOT NULL DEFAULT 'admin',
9+ adminpass TEXT NOT NULL DEFAULT 'pass',
10+ topurl TEXT,
11+ homepage TEXT,
12+
13+ defaultview TEXT DEFAULT 'tree',
14+ defaultplfm TEXT DEFAULT 'pc',
15+ newpost_on INTEGER NOT NULL DEFAULT 1,
16+ top_on INTEGER NOT NULL DEFAULT 2,
17+ tree_on INTEGER NOT NULL DEFAULT 11,
18+ plain_on INTEGER NOT NULL DEFAULT 12,
19+ thread_on INTEGER NOT NULL DEFAULT 13,
20+ topic_on INTEGER NOT NULL DEFAULT 14,
21+ list_on INTEGER NOT NULL DEFAULT 15,
22+
23+ notice_on INTEGER NOT NULL DEFAULT 21,
24+ search_on INTEGER NOT NULL DEFAULT 22,
25+ home_on INTEGER NOT NULL DEFAULT 31,
26+
27+ tree_max INTEGER NOT NULL DEFAULT 15,
28+ article_max INTEGER NOT NULL DEFAULT 15,
29+
30+ editable INTEGER NOT NULL DEFAULT 1,
31+ deletable INTEGER NOT NULL DEFAULT 0,
32+
33+ good_on INTEGER NOT NULL DEFAULT 1,
34+ icon_on INTEGER NOT NULL DEFAULT 1,
35+ ftcolor_on INTEGER NOT NULL DEFAULT 1,
36+
37+ writecert_code INTEGER NOT NULL DEFAULT 0,
38+ readcert_code INTEGER NOT NULL DEFAULT 0,
39+
40+
41+ vw_title TEXT DEFAULT 'Epitta',
42+ vw_forcrowler TEXT DEFAULT 'INDEX,NOFOLLOW',
43+ vw_searchkey TEXT DEFAULT 'Epitta BBS,掲示板',
44+ vw_description TEXT DEFAULT 'Epitta BBSはPHPで作成されたWEB掲示板です。',
45+ vw_header TEXT DEFAULT '<H2>I''m Epitta BBS</h2>',
46+ vw_footer TEXT DEFAULT '',
47+
48+ vw_full_width INTEGER DEFAULT 900,
49+ vw_bg_color TEXT DEFAULT '#ffffff',
50+ vw_bgimage TEXT DEFAULT '',
51+ vw_ft_size INTEGER DEFAULT 13,
52+ vw_ft_color TEXT DEFAULT '#666666',
53+ vw_lk_color TEXT DEFAULT 'bule',
54+ vw_lkv_color TEXT DEFAULT 'purple',
55+ vw_lka_color TEXT DEFAULT 'red',
56+ vw_lkh_color TEXT DEFAULT 'green',
57+
58+ created_at TEXT,
59+ modified_at TEXT
60+
61+);
62+
63+
64+
65+INSERT INTO epitta_boards ( id, name, created_at )
66+ VALUES ( 'default', 'def_ab12', '2011-05-01 00:00:00' );
67+
68+
69+
70+CREATE table epitta_articles (
71+
72+ id INTEGER PRIMARY KEY,
73+ tree_number INTEGER,
74+ parent_id INTEGER,
75+ subject TEXT,
76+ author TEXT,
77+ password TEXT,
78+ personkey TEXT,
79+ email TEXT,
80+ homepage TEXT,
81+ article TEXT,
82+
83+ fontcolor TEXT,
84+ iconname TEXT,
85+ reserved1 TEXT,
86+ reserved2 TEXT,
87+ reserved3 TEXT,
88+ clipfile1 TEXT,
89+ clipfile2 TEXT,
90+ clipfile3 TEXT,
91+ hostaddress TEXT,
92+ useragent TEXT,
93+ remarks TEXT,
94+ status_code INTEGER,
95+
96+ tree_updated_at TEXT DEFAULT NULL,
97+ created_at TEXT,
98+ modified_at TEXT
99+
100+);
101+
--- system/epitta_config.php (revision 9)
+++ system/epitta_config.php (revision 10)
@@ -26,13 +26,6 @@
2626 define('SCRIPTURL', $_SERVER["SCRIPT_NAME"]);
2727
2828
29-
30-
31-echo $_SERVER['REQUEST_URI'] . "<br />";
32-echo $_SERVER['SCRIPT_NAME'] . "<br />";
33-
34-echo dirname($_SERVER['REQUEST_URI']) . "<br />";
35-
3629
3730 //情報領域URL
3831 define('DATAURL', './data');
@@ -55,11 +48,7 @@
5548 define('MAXFILE', (500 * 1024) );
5649
5750
58-//環境設定 development, testing, production
59-define('ENVIRONMENT', 'development');
6051
61-
62-
6352 // 管理者ログオン用セッション設定
6453 //session_save_path('/virtual/projects/php_session'); // safe mode用セッション保存場所
6554 session_name('PSSSC-BOARD');
@@ -93,15 +82,31 @@
9382 if( $errNum >= 256 and $errNum <= 1024 ) {
9483 //ユーザー系
9584 $GLOBALS['ERR']['kind'] = 1;
96- require_once(SYSPATH . '/layouts/error.php');
97- exit();
9885
86+ if ( ! $GLOBALS['APP']['layout'] ) {
87+ require_once(SYSPATH . '/layouts/error.php');
88+ exit();
89+
90+ } else {
91+ echo '<div class="errMsg">[' .$errNum. ']'. $errMsg . "</div>";
92+ echo '<div class="errMsg">'. $errFile . "(" . $errLine . ")" . "</div>";
93+
94+ }
95+
9996 } else {
10097 //その他全部
10198 $GLOBALS['ERR']['kind'] = 9;
102- require_once(SYSPATH . '/layouts/error.php');
103- exit();
99+ if ( ! $GLOBALS['APP']['layout'] ) {
100+ require_once(SYSPATH . '/layouts/error.php');
101+ exit();
104102
103+ } else {
104+ echo '<div class="errMsg">[' .$errNum. ']'. $errMsg . "</div>";
105+ echo '<div class="errMsg">'. $errFile . "(" . $errLine . ")" . "</div>";
106+
107+ }
108+
109+
105110 }
106111
107112 }
--- data/default/base.css (revision 9)
+++ data/default/base.css (revision 10)
@@ -10,10 +10,28 @@
1010 body {
1111 color: #777777;
1212 font-size:14px;
13+
1314 }
1415
16+div.outframe {
17+ width:100%;
18+ text-align: center;
1519
20+}
1621
22+
23+div.container {
24+ width:840px;
25+ text-align: left;
26+ margin-left:auto;
27+ margin-right:auto;
28+ border:1px solid #666;
29+}
30+
31+div.mainContent {
32+ width:840px;
33+}
34+
1735 br.clear {
1836 font-size:1px;
1937 height:1px;
@@ -42,8 +60,27 @@
4260
4361
4462
63+div.authorBox {
64+ float: left;
65+ border: 1px solid #ccc;
66+ padding: 3px 3px;
67+ width: 150px;
68+ word-break:break-all;
69+ word-wrap: break-word;
70+}
4571
72+div.textBoxOut {
73+ float: left;
74+ border: 1px solid #ccc;
75+ width: 630px;
76+}
4677
78+div.textBox {
79+ margin: 5px 5px;
80+ line-height : 22px;
81+ word-break:break-all;
82+ word-wrap: break-word;
83+}
4784
4885
4986
--- data/default/overwrite.css (revision 9)
+++ data/default/overwrite.css (revision 10)
@@ -26,18 +26,15 @@
2626
2727
2828 div.authorBox {
29- float: left;
30- border: 1px solid #ccc;
31- padding: 3px 3px;
32- width: 150px;
33-
3429 }
3530
3631 div.textBox {
37- float: left;
38- border: 1px solid #ccc;
39- padding: 3px 3px;
40- width: 730px;
32+}
4133
34+
35+form.button {
36+ display:inline;
4237 }
4338
39+
40+
--- views/pc/default/view_treeSingle.php (nonexistent)
+++ views/pc/default/view_treeSingle.php (revision 10)
@@ -0,0 +1,33 @@
1+<?php
2+
3+//
4+$tree = $this->set['tree'];
5+//var_dump($tree);
6+
7+$myContent = "";
8+foreach( $tree as $tr ) {
9+
10+ if ( $tr['parent_id'] == 0 ) {
11+ $myContent .= makeSingleArticle(&$tr);
12+ $myContent .= makeBranchArticle(&$tree, $tr['id']);
13+ break;
14+ }
15+}
16+
17+
18+foreach( $tree as $tr ) {
19+
20+ if ( $tr['parent_id'] == 0 ) {
21+
22+ $myContent .= mekeTree($tr);
23+ $myContent .= makeBranch(&$tree, $tr['id']);
24+
25+ break;
26+ }
27+
28+}
29+
30+//
31+$this->content = $myContent;
32+
33+?>
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
--- views/pc/default/base_layout.php (revision 9)
+++ views/pc/default/base_layout.php (revision 10)
@@ -11,8 +11,8 @@
1111 <body>
1212
1313
14-<div style="text-align:center;">
15-<div style="width:900px; border:1px solid #338;text-align:left;">
14+<div class="outframe">
15+<div class="container">
1616
1717 <!-- header -->
1818 <div style="background-color:#ffffcc;">
@@ -26,8 +26,10 @@
2626 <?php echo makeManubar(); ?>
2727 </div>
2828
29-<div style="margin:10px 10px;">
29+<div style="mainContent">
30+
3031 <?php echo $this->getView($this->set['view']) ?>
32+
3133 </div>
3234
3335 <div>
Show on old repository browser