From 7f508e187e4539a16cdbb1dd6a4b1133c53cf24d Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 29 May 2006 16:50:33 +0000 Subject: Blog now allows dynamically changing theme. --- demos/blog/protected/Common/BlogPage.php | 6 ++++++ demos/blog/protected/Common/schema.sql | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'demos/blog/protected/Common') diff --git a/demos/blog/protected/Common/BlogPage.php b/demos/blog/protected/Common/BlogPage.php index f1634a80..f69e4c48 100644 --- a/demos/blog/protected/Common/BlogPage.php +++ b/demos/blog/protected/Common/BlogPage.php @@ -2,6 +2,12 @@ class BlogPage extends TPage { + public function onPreInit($param) + { + parent::onPreInit($param); + $this->Theme=$this->Application->Parameters['ThemeName']; + } + public function getDataAccess() { return $this->getApplication()->getModule('data'); diff --git a/demos/blog/protected/Common/schema.sql b/demos/blog/protected/Common/schema.sql index 49f6f429..a93512df 100644 --- a/demos/blog/protected/Common/schema.sql +++ b/demos/blog/protected/Common/schema.sql @@ -61,7 +61,7 @@ INSERT INTO tblUsers (id,name,full_name,role,status,passwd,email,reg_time,websit VALUES (1,'admin','Prado User',1,0,'4d688da592969d0a56b5accec3ce8554','admin@example.com',1148819681,'http://www.pradosoft.com'); INSERT INTO tblPosts (id,author_id,create_time,title,content,status) - VALUES (1,1,1148819691,'Welcome to Prado Weblog','Congratulations! You have successfully installed Prado Weblog. An administrator account has been created. Please login with admin/prado and update your password as soon as possible.',0); + VALUES (1,1,1148819691,'Welcome to Prado Weblog','Congratulations! You have successfully installed Prado Blog -- a PRADO-driven weblog system. A default administrator account has been created. Please login with admin/prado and update your password as soon as possible.',0); INSERT INTO tblCategories (name,description,post_count) VALUES ('Miscellaneous','This category holds posts on any topic.',1); -- cgit v1.2.3