root/trunk/src/includes/editam/installers/editam_1/profiles/sample_website/profile.php

Revision 43, 4.9 kB (checked in by bermi, 3 years ago)

Added settings for currently enabled languages. Closes #7, #9, #5 and #2

Line 
1 <?php
2
3 // +----------------------------------------------------------------------+
4 // Editam is a content management platform developed by Akelos Media, S.L.|
5 // Copyright (C) 2006 - 2007 Akelos Media, S.L.                           |
6 //                                                                        |
7 // This program is free software; you can redistribute it and/or modify   |
8 // it under the terms of the GNU General Public License version 3 as      |
9 // published by the Free Software Foundation.                             |
10 //                                                                        |
11 // This program is distributed in the hope that it will be useful, but    |
12 // WITHOUT ANY WARRANTY; without even the implied warranty of             |
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                   |
14 // See the GNU General Public License for more details.                   |
15 //                                                                        |
16 // You should have received a copy of the GNU General Public License      |
17 // along with this program; if not, see http://www.gnu.org/licenses or    |
18 // write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth |
19 // Floor, Boston, MA 02110-1301 USA.                                      |
20 //                                                                        |
21 // You can contact Akelos Media, S.L. headquarters at                     |
22 // C/ Pasodoble Amparito Roca, 6, 46240 - Carlet (Valencia) - Spain       |
23 // or at email address contact@akelos.com.                                |
24 //                                                                        |
25 // The interactive user interfaces in modified source and object code     |
26 // versions of this program must display Appropriate Legal Notices, as    |
27 // required under Section 5 of the GNU General Public License version 3.  |
28 //                                                                        |
29 // In accordance with Section 7(b) of the GNU General Public License      |
30 // version 3, these Appropriate Legal Notices must retain the display of  |
31 // the "Powered by Editam" logo. If the display of the logo is not        |
32 // reasonably feasible for technical reasons, the Appropriate Legal       |
33 // Notices must display the words "Powered by Editam".                    |
34 // +----------------------------------------------------------------------+
35
36 /**
37 * Creates a basic website useful for demonstration purposes.
38 * This sample website should be feature rich for advances users
39 * but also easy to use for novice ones.
40 */
41 class SampleWebsiteProfile
42 {
43     var $Installer;
44     var $priority = 10;
45     
46     function install()
47     {
48         $this->_createDefaultHomePage();
49     }
50
51     function uninstall()
52     {
53
54     }
55
56     function _createDefaultHomePage()
57     {
58         Ak::import(array('page', 'page_part', 'user', 'content_layout'));
59         
60         $User =& new User();
61         $ContentLayout =& new ContentLayout();
62         
63         if (!$Admin =& $User->find(1) || !$Layout =& $ContentLayout->findFirstBy('name', 'Default')){
64             return;
65         }
66         
67         $Page =& new Page(array(
68             'title' => 'Welcome to your new Editam Site!',
69             'slug' => '/',
70             'breadcrumb' => 'Home',
71             'status' => 'published',
72             'layout_id' => $Layout->getId(),
73             'created_at' => Ak::getDate(),
74             'created_by' => $Admin->getId(),
75             'updated_at' => Ak::getDate(),
76             'updated_by' => $Admin->getId()));
77
78         $Page->part->create(array(
79             'name' => 'body',
80             'filter' => 'markdown',
81             'content' =>
82                 "Please login <a href='{base}/admin'>login</a> using the username and password you provided when you installed Editam.
83
84 Editam is a content management platform based in these core principles and objectives
85
86  * Simplicity
87  * Usability
88  * Findability
89  * Standard awareness
90  * Efficiency
91  * Openness
92  * Internationalization
93  * Extendability
94  * Compatibility
95
96 Out of the box Editam has less features than other CMS on purpose, so you can start creating content immediately.
97
98 Editam is available open-source under the GPL3 license."
99             ));
100             
101         $Page->part->create(array(
102             'name' => 'sidebar',
103             'content' =>
104 '<div id="logo">
105     <a href="/" title="_{Home page}"><img src="{base}/images/editam_light_bg.png" alt="Editam by Akelos Media S.L." /></a>
106 </div>
107
108 <ul class="sidebar_menu">
109     <li><a title="Administrate your site" href="{base}/admin">Administrate your site</a></li>
110     <li><a title="Development Site" href="http://trac.editam.com">Editam development site</a></li>
111 </ul>'
112             ));
113             
114             
115         $Page->part->create(array(
116             'name' => 'footer',
117             'content' =>
118                 'Powered by <a href="http://www.editam.com">Editam</a>.'
119             ));
120             
121         $Page->save();
122     }
123
124 }
125
126 ?>
Note: See TracBrowser for help on using the browser.