Revision 309
Added by stefan almost 19 years ago
install.php | ||
---|---|---|
33 | 33 |
. '`group_id` INT NOT NULL,' |
34 | 34 |
. '`active` INT NOT NULL,' |
35 | 35 |
. '`position` INT NOT NULL,' |
36 |
. '`title` VARCHAR(255) NOT NULL,' |
|
37 |
. '`link` TEXT NOT NULL,' |
|
38 |
. '`content_short` TEXT NOT NULL,' |
|
39 |
. '`content_long` TEXT NOT NULL,' |
|
40 |
. '`commenting` VARCHAR(7) NOT NULL,' |
|
36 |
. '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
|
|
37 |
. '`link` TEXT NOT NULL DEFAULT \'\','
|
|
38 |
. '`content_short` TEXT NOT NULL DEFAULT \'\','
|
|
39 |
. '`content_long` TEXT NOT NULL DEFAULT \'\','
|
|
40 |
. '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
|
|
41 | 41 |
. '`posted_when` INT NOT NULL ,' |
42 | 42 |
. '`posted_by` INT NOT NULL ,' |
43 | 43 |
. 'PRIMARY KEY (post_id)' |
... | ... | |
51 | 51 |
. '`page_id` INT NOT NULL,' |
52 | 52 |
. '`active` INT NOT NULL,' |
53 | 53 |
. '`position` INT NOT NULL,' |
54 |
. '`title` VARCHAR(255) NOT NULL,' |
|
54 |
. '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
|
|
55 | 55 |
. 'PRIMARY KEY (group_id)' |
56 | 56 |
. ' )'; |
57 | 57 |
$database->query($mod_news); |
... | ... | |
62 | 62 |
. '`section_id` INT NOT NULL,' |
63 | 63 |
. '`page_id` INT NOT NULL,' |
64 | 64 |
. '`post_id` INT NOT NULL,' |
65 |
. '`title` VARCHAR(255) NOT NULL,' |
|
66 |
. '`comment` TEXT NOT NULL,' |
|
65 |
. '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
|
|
66 |
. '`comment` TEXT NOT NULL DEFAULT \'\','
|
|
67 | 67 |
. '`commented_when` INT NOT NULL ,' |
68 | 68 |
. '`commented_by` INT NOT NULL ,' |
69 | 69 |
. 'PRIMARY KEY (comment_id)' |
... | ... | |
74 | 74 |
$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_settings` ( ' |
75 | 75 |
. '`section_id` INT NOT NULL,' |
76 | 76 |
. '`page_id` INT NOT NULL,' |
77 |
. '`header` TEXT NOT NULL,' |
|
78 |
. '`post_loop` TEXT NOT NULL,' |
|
79 |
. '`footer` TEXT NOT NULL,'
|
|
77 |
. '`header` TEXT NOT NULL DEFAULT \'\','
|
|
78 |
. '`post_loop` TEXT NOT NULL DEFAULT \'\','
|
|
79 |
. '`footer` TEXT NOT NULL DEFAULT \'\','
|
|
80 | 80 |
. '`posts_per_page` INT NOT NULL,' |
81 |
. '`post_header` TEXT NOT NULL,' |
|
82 |
. '`post_footer` TEXT NOT NULL,' |
|
83 |
. '`comments_header` TEXT NOT NULL,' |
|
84 |
. '`comments_loop` TEXT NOT NULL,' |
|
85 |
. '`comments_footer` TEXT NOT NULL,' |
|
86 |
. '`comments_page` TEXT NOT NULL,' |
|
87 |
. '`commenting` VARCHAR(7) NOT NULL,'
|
|
81 |
. '`post_header` TEXT NOT NULL DEFAULT \'\','
|
|
82 |
. '`post_footer` TEXT NOT NULL DEFAULT \'\','
|
|
83 |
. '`comments_header` TEXT NOT NULL DEFAULT \'\','
|
|
84 |
. '`comments_loop` TEXT NOT NULL DEFAULT \'\','
|
|
85 |
. '`comments_footer` TEXT NOT NULL DEFAULT \'\','
|
|
86 |
. '`comments_page` TEXT NOT NULL DEFAULT \'\','
|
|
87 |
. '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
|
|
88 | 88 |
. '`resize` INT NOT NULL,' |
89 | 89 |
. ' `use_captcha` INT NOT NULL,' |
90 | 90 |
. 'PRIMARY KEY (section_id)' |
... | ... | |
96 | 96 |
$field_info = array(); |
97 | 97 |
$field_info['page_id'] = 'page_id'; |
98 | 98 |
$field_info['title'] = 'page_title'; |
99 |
$field_info['link'] = 'link'; |
|
100 |
$field_info['description'] = 'description'; |
|
101 |
$field_info['modified_when'] = 'modified_when'; |
|
99 |
$field_info['link'] = 'link';
|
|
100 |
$field_info['description'] = 'description';
|
|
101 |
$field_info['modified_when'] = 'modified_when';
|
|
102 | 102 |
$field_info['modified_by'] = 'modified_by'; |
103 | 103 |
$field_info = serialize($field_info); |
104 | 104 |
$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'news', '$field_info')"); |
... | ... | |
131 | 131 |
$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id) VALUES ('0', '0')"); |
132 | 132 |
|
133 | 133 |
// Make news post access files dir |
134 |
make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/'); + make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/'); |
|
135 | 134 |
|
136 | 135 |
} |
137 | 136 |
|
138 |
?> |
|
137 |
?> |
Also available in: Unified diff
Added default value '' to all varchar and text fields