public
Description: Blog Modules for CMS Made Simple 2.0
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsms-blog.git
wishy (author)
Tue Apr 08 07:25:24 -0700 2008
commit  3aef452680351b0d4f2343fd4fbd0aa68bbf9255
tree    60dc7a2e6eb8602e858eac4d4c856382affdd232
parent  45e6bc007ff3c2a1dd558118c8e484be1cf61dff
cmsms-blog / method.install.php
100644 55 lines (48 sloc) 1.251 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
if (!isset($gCms)) exit;
 
$this->create_table('blog_posts', "
  id I KEY AUTO,
  author_id I,
  post_date T,
  post_year I,
  post_month I,
  post_day I,
  title C(255),
  slug C(255),
  url C(255),
  content XL,
  summary XL,
  status C(25),
  use_comments I(1) default 1,
  processor C(25) default '',
  create_date T,
  modified_date T
");
 
$this->create_table('blog_categories', "
  id I KEY AUTO,
  name C(255),
  slug C(255),
  create_date T,
  modified_date T
");
 
$this->create_table('blog_post_categories', "
  category_id I,
  post_id I,
  create_date T,
  modified_date T
");
 
$this->set_template('summary', 'Default Template', $this->get_default_summary_template());
$this->set_template('detail', 'Default Template', $this->get_default_detail_template());
$this->set_template('rss', 'Default Template', $this->get_default_rss_template());
 
$category = new BlogCategory();
$category->name = 'General';
$category->save();
 
$this->create_event('BlogPostAdded');
$this->create_event('BlogPostModified');
$this->create_event('BlogPostRemoved');
$this->create_event('BlogCategoryAdded');
$this->create_event('BlogCategoryModified');
$this->create_event('BlogCategoryRemoved');
$this->create_event('BlogCommentAdded');
$this->create_event('BlogCommentRemoved');
 
?>