The best way to learn how to use the WebCore is by example. See the documentation for more information.
The requested URL is always shown first; if a page uses one or more WebCore templates, those are shown afterwards.
00 <?php
01 include_once ('software/init.php');
02
03 $Page->title->group = 'earthli WebCore';
04
05 $Page->location->append ('Software', '../');
06 $Page->location->append ('WebCore');
07
08 $Page->start_display ();
09
10 $project_url = $Page->resolve_file ('{root}/projects/view_folder.php?id=6');
11
12 define ("Webcore_project_id", 6);
13 require_once ('projects/init.php');
14 $projects_app = $Page->make_application (Project_application_id);
15 require_once ('projects/util/project_version_formatter.php');
16 $release_data = new PROJECT_VERSION_FORMATTER($projects_app, Webcore_project_id);
17 ?>
18 <div class="main-box">
19 <div class="columns text-flow">
20 <div class="left-sidebar">
21 <h2>Learn</h2>
22 <ul>
23 <li><a href="overview.php">Overview</a></li>
24 <li><a href="features.php">Features</a></li>
25 <li><a href="why.php">Why?</a></li>
26 <li><a href="news.php">Latest news</a></li>
27 <li><a href="screenshots.php">Screenshots</a></li>
28 </ul>
29 <h2>Acquire</h2>
30 <ul>
31 <li><a href="requirements.php">Requirements</a></li>
32 <li><a href="download.php">Download</a></li>
33 <li><a href="install.php">Install</a></li>
34 <li><a href="update.php">Upgrade</a></li>
35 <li><a href="first_run.php">First run</a></li>
36 </ul>
37 <h2>Participate</h2>
38 <ul>
39 <li><a href="license.php">License</a></li>
40 <li><a href="develop.php">Getting started</a></li>
41 <li><a href="documentation.php">Documentation</a></li>
42 <li><a href="develop.php">Develop</a></li>
43 </ul>
44 <h2>News</h2>
45 <?php
46 include_once ('news/init.php');
47 $news_app = $Page->make_application (News_application_id);
48
49 $folder_query = $news_app->login->folder_query ();
50 /** @var $folder FOLDER */
51 $folder = $folder_query->object_at_id (26); // earthli announcements folder
52 $entry_query = $folder->entry_query ();
53 $entry_query->filter_out (Draft);
54
55 include_once ('news/gui/tiny_article_grid.php');
56 $grid = new TINY_ARTICLE_GRID ($news_app);
57 $grid->set_page_size (5);
58 $grid->show_pager = false;
59 $grid->set_query ($entry_query);
60 $grid->display ();
61 ?>
62 <p><a href="news.php">More...</a></p>
63 </div>
64 <div>
65 <p>The earthli WebCore is a fully object-oriented, open-source framework for building
66 scalable, attractive and customizable web sites with PHP.</p>
67 <h2>Seeing is believing</h2>
68 <p>Feast your eyes on the consistent, sleek look of WebCore applications. Click
69 a picture below for a look at your web site's future. There are plenty more on the
70 <a href="screenshots.php">screenshots</a> page.</p>
71 <?php
72 include_once ('albums/init.php');
73 $albums_app = $Page->make_application (Album_application_id);
74
75 $folder_query = $albums_app->login->folder_query ();
76 $folder = $folder_query->object_at_id (149); // WebCore screenshots album
77 $entry_query = $folder->entry_query ();
78 $entry_query->set_type ('picture');
79 $entry_query->set_order ('time_created DESC');
80
81 include_once ('albums/gui/tiny_picture_grid.php');
82 $grid = new TINY_PICTURE_GRID ($albums_app);
83 $grid->set_page_size (Default_page_size / 3);
84 $grid->show_pager = false;
85 $grid->set_query ($entry_query);
86 $grid->display ();
87 ?>
88 <h2>Take it for a spin</h2>
89 <p>How about a demo? Everybody likes demos. Click an application below to
90 learn more.</p>
91 <ul>
92 <li><a href="app_albums.php">earthli Albums</a></li>
93 <li><a href="app_news.php">earthli News</a></li>
94 <li><a href="app_projects.php">earthli Projects</a></li>
95 <li><a href="app_recipes.php">earthli Recipes</a></li>
96 </ul>
97 <h2>Read all about it</h2>
98 <p>Read the <a href="overview.php">overview</a> to find out if the
99 WebCore is right for you, then dive into the <a href="features.php">features</a>
100 for an in-depth look at what you get. <a href="why.php">"Why?"</a> is a good
101 place to go if you still need convincing that the WebCore is the way to go.</p>
102 </div>
103 <div class="right-sidebar">
104 <p><img src="media/images/webcore_box_green.png" alt="WebCore Box"></p>
105 <table class="basic left-labels columns">
106 <tr>
107 <th>Version</th>
108 <td><?php echo $release_data->version; ?></td>
109 </tr>
110 <tr>
111 <th>Date</th>
112 <td><?php echo $release_data->release_date; ?></td>
113 </tr>
114 <tr>
115 <th></th>
116 <td><a href="<?php echo $release_data->change_log_link; ?>">Changes</a></td>
117 </tr>
118 </table>
119 <p>
120 <?php
121 $renderer = $Page->make_controls_renderer ();
122 $renderer->button_width = '10em';
123 echo $renderer->button_as_html ('Project', $project_url, '{site_icons}products/projects', Thirty_two_px);
124 ?>
125 </p>
126 <p>
127 <?php echo $renderer->button_as_html ('Download', 'download.php', '{icons}buttons/download', Thirty_two_px); ?>
128 </p>
129 <p>
130 <?php echo $renderer->button_as_html ('Support', 'documentation.php', '{icons}buttons/source', Thirty_two_px); ?>
131 </p>
132 </div>
133 </div>
134 </div>
135 <?php $Page->finish_display (); ?>
136