1<?php
2/*
3 * CHeMS (Content HElper Management System)
4 * Copyright (C) 2007-2009  Claudio M. Alessi
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * 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/>.
18 *
19*/
20
21/*
22 * Posts
23 *
24 * Post template (keys with empty values may be removed)
25 * -------------
26insert($POST, array(
27"id" => ++$posts,
28"title" => "Sample post (id: $posts)", "date" => "Jun 12 2007",
29[ "toggle" => <modules list>, ]
30[ more_keys => values, ]
31"body" => "The post body",
32"));
33 * -------------
34*/
35
36$posts = 0;
37
38/* CHeMS-0.1 */
39$__title = "CHeMS-0.1";
40insert($POST, array(
41"id" => ++$posts,
42"title" => isset($_GET['post']) && (int)$_GET['post'] === $posts ? "$__title" :
43"<a href='?modname=posts_mgr&amp;post=$posts' title='permalink'>$__title</a>",
44"date" => "2007-10-16 16:11",
45"categories" => "chems",
46"body" => "
47The first CHeMS release (0.1) has been published.
48<br /><br />
49The download page for this release is available
50<a href='https://sourceforge.net/project/showfiles.php?group_id=208013&amp;package_id=249183&amp;release_id=547399'>here</a>.
51"));
52
53/* CHeMS-0.2RC1 */
54$__title = "CHeMS-0.2RC1";
55insert($POST, array(
56"id" => ++$posts,
57"title" => isset($_GET['post']) && (int)$_GET['post'] === $posts ? "$__title" :
58"<a href='?modname=posts_mgr&amp;post=$posts' title='permalink'>$__title</a>",
59"date" => "2007-10-18 14:02",
60"categories" => "chems",
61"body" => "
62First release candidate (RC) of CHeMS 0.2. It includes the following main
63changes:
64
65<br />
66
67<ul>
68	<li>Added this ChangeLog</li>
69	<li>Removed the navbar when there is only one page or post available</li>
70	<li>Added the NAVBAR_FORCE_SHOW option which always show the navbar</li>
71	<li>Created the getNonPrintIdx() function which is needed to improve
72	    the getPost() function to don't truncate the words when the value
73	    of POST_MAX_LEN is non-zero</li>
74	<li>Fixed the POST_MAX_LEN bug about HTML closing tag in the preview</li>
75	<li>Custom titles on modules <q>pages</q> and <q>posts</q> are now allowed</li>
76	<li>Fixed the menu generation. Now the elements are moved from a side
77	    to another when the element's menu side is disabled</li>
78	<li>Moved the modules' options into the <q>modconf.php</q> file</li>
79        <li>Improved pages and posts generation</li>
80	<li>Fixed bug about *ROOT definitions in <q>index.php</q></li>
81	<li>Little improvement about the titles which are now provided two
82            differents options for the application title and header title</li>
83	<li>Miscellaneous fixes and improvements (and optimizations)</li>
84</ul>
85
86The download page for this release is available
87<a href='https://sourceforge.net/project/showfiles.php?group_id=208013&amp;package_id=249183&amp;release_id=547826'>here</a>.
88"));
89
90/* CHeMS-0.2 */
91$__title = "CHeMS-0.2";
92insert($POST, array(
93"id" => ++$posts,
94"title" => isset($_GET['post']) && (int)$_GET['post'] === $posts ? "$__title" :
95"<a href='?modname=posts_mgr&amp;post=$posts' title='permalink'>$__title</a>",
96"date" => "2007-10-28 22:30",
97"categories" => "chems",
98"body" => "
99Released CHeMS 0.2. Merging the changes applied to the first release candidate
100(0.2RC1), has been made the following complete list of changes:
101
102<br />
103
104<ul>
105	<li>Merged the newpage() and newpost() functions to insert()</li>
106	<li>New default theme: <q>clean</q></li>
107	<li>The <q>static links</q> module has been written</li>
108	<li>New MOD_COMM_FIELD_ANTISPAM option for the <q>comments</q> module</li>
109	<li>Added a new set of format operators for the <q>comments</q> module</li>
110	<li>Comments system based on the new CHeMS T-F-B DB API</li>
111	<li>New CHeMS text-file-based database API: see <q>src/cdb.php</q> for more
112	    informations about provided routines</li>
113	<li>Added the <q>dir</q> XHTML attribute to the &lt;html&gt; tag in <q>src/main.php</q></li>
114	<li>Removed the %[curr_post] format operators. The same results can be
115    	    got with the %[elem_curr] when the request type is <q>posts</q></li>
116	<li>Removed the fs2ascii() function: it really wasn't needed</li>
117	<li>Extended the modules system: now modules can be placed ``inside'' a
118	    page beween posts, on bottom or on top, depending on the request type</li>
119	<li>Added a new dynamic format operators: %[curr_post] which assumes the
120	    ID of the current post in the posts list (request type: posts)</li>
121	<li>Fixed *_TITLE about total elements visualization in modconf.php.
122	    The \$posts and \$pages variables can't be used there so we have to
123	    use the format operators</li>
124	<li>Fixed *_MAX stuff of posts_links and pages_links modules</li>
125	<li>Improved the modules system</li>
126	<li>Added the Blogroll module</li>
127	<li>Added the FreeHands module</li>
128	<li>Removed TODO file in favour of the feature requests tracking system</li>
129	<li>Added this <q>Changes</q> file</li>
130	<li>Removed the navbar when there is only one page or post available</li>
131	<li>Added the NAVBAR_FORCE_SHOW option which always show the navbar</li>
132	<li>Created the getNonPrintIdx() function which is needed to improve
133	    the getPost() function to don't truncate the words when the value
134	    of POST_MAX_LEN is non-zero</li>
135	<li>Fixed the POST_MAX_LEN bug about HTML closing tag in the preview</li>
136	<li>Custom titles on modules <q>pages</q> and <q>posts</q> are now allowed</li>
137	<li>Fixed the menu generation. Now the elements are moved from a side
138	    to another when the element's menu side is disabled</li>
139	<li>Moved the modules' options into the <q>modconf.php</q> file</li>
140	<li>Improved pages and posts generation</li>
141	<li>Fixed bug about *ROOT definitions in <q>index.php</q></li>
142	<li>Little improvement about the titles which are now provided two
143	    differents options for the application title and header title</li>
144	<li>Added the <q>codeout</q> section into the <q>simple</q> theme CSS. Now
145	    output and source code can be highlighted and formatted</li>
146	<li>Improved the code style</li>
147	<li>Added the POST_CONT option which allow to customize the suspension
148 	    characters at the end of a truncated post in the posts list/preview</li>
149	<li>A lot of minor fixes, improvements and optimizations</li>
150
151</ul>
152
153The download page for this release is available
154<a href='https://sourceforge.net/project/showfiles.php?group_id=208013&amp;package_id=249183&amp;release_id=550253'>here</a>.
155"));
156
157/* CHeMS-0x03 */
158$__title = "CHeMS-0x03";
159insert($POST, array(
160"id" => ++$posts,
161"title" => isset($_GET['post']) && (int)$_GET['post'] === $posts ? "$__title" :
162"<a href='?modname=posts_mgr&amp;post=$posts' title='permalink'>$__title</a>",
163"date" => "2008-02-05 18:45",
164"categories" => "chems",
165"body" => "
166Since the third release (fourth also considering the 0.2RC1) the CHeMS versioning
167system has been changed from the decimal notation to the hexadecimal one. Here is
168a quote from the relative FAQ:
169
170<br /><br />
171
172<i>
173<q>An hexadecimal notation is used in order to mark the CHeMS releases. In
174an hex number there are three place where to store version informations:
175major number goes befor the 'x' and minor numbers goes after the 'x'. So,
1760x01 means major 0 and minor 01. Bugfixes releases are released by using
177the previous release hex number followed by an underscore and the ID (in
178a decimal form) of the bugfix release, e.g., 0x01_1 means the first bugfix
179release of the 0x01 version. That's all.</q>
180</i>
181
182<br /><br />
183
184Apart of this <i>geeky</i> change, the following list of improvements has
185been done:
186
187<br />
188
189<ul>
190	<li>New format operators added, %[pages_total] and %[posts_total], which return
191	    the number of elements in its corresponding (pages/posts) .inc file. The
192	    format operator has been implemented into the respective modules and not
193	    inside the CHeMS core.</li>
194	<li>We have now a logo, an header image, and several meta icons. Special thanks
195	    to Leonardo Taccari (aka leot).</li>
196	<li>A first stub of the guide has been (finally) made (docs/GUIDE).</li>
197	<li>Several documentation improvements. New FAQs has been added and the old has
198	    been changed relatively to the CHeMS changes.</li>
199	<li>The getModule() has been extended and renamed to getModFunc()</li>
200	<li>New module <q>showfiles</q>: it's not a real geek module but may be useful in
201	    some case. The pages generated are, of course, XHTML-1.1 compliant</li>
202	<li>Added the <q>core</q> theme which should be used as start point for all new
203	    themes</li>
204	<li>Added the monochrome theme. It's the new CHeMS default theme</li>
205	<li>All previous themes has been removed</li>
206	<li>Changed <q>page_body</q> and <q>page_title</q> IDs to XHTML classes</li>
207	<li>New module <q>rssfeeds</q> which consists essentially of a link to an XML page
208	    (the feeds) generated dinamycally. It's loaded by default into the
209	    <q>posts_mgr</q> module. The feeds RSS version is 2.0</li>
210	<li>The insert() function has been rewritten from scratch. Objects insertion
211	    is much intuitive and easy to handle for both CHeMS core and modules which
212	    can be configured individually for each object (by using the array pairs
213	    key/value)</li>
214	<li>The navigation bar has been modularized in order to make CHeMS very modular
215	    and flexible</li>
216	<li>The constants for pathname and files has been (finally) addedd into the
217	    index.php file</li>
218	<li>Added the <q>categories</q> module which allow to specify tags for both pages
219	    and modules</li>
220	<li>A file (docs/MODULES) with the descriptions of modules currently released
221	    with CHeMS is now provided</li>
222	<li>New option MODULES_SECURE which prevents getting pages from modules
223	    internals links when the modules are not loaded. This required a new
224 	    function: modisload()</li>
225	<li>Added an easily configurable multi-color theme: ``colorlite''. See the
226	    README file into the <q>themes/colorlite/</q> directory for more informations.</li>
227	<li>Added support for configurables multiple modules instances (identifiers)</li>
228	<li>New ``meta tags'' instance of the freehands module. It includes by default
229	    the following tags: XHTML 1.1, CSS2, Any browser, RSS 2.0, of course
230	    CHeMS 0x03 and CC BY-SA 3.0.</li>
231	<li>Large amount of changes into the whole sources tree. CHeMS is now full
232	    modularized (including posts and pages visualization). The requests types
233	    system has been totally removed in favour of the modularized approach. Lots
234	    of options has been renamed, removed and added. The modules system has been
235    	    improved and a new function modload() has been added. The core file
236   	    (main.php) includes lots of changes (it's smaller). CHeMS is now faster and
237	    geekest!</li>
238	<li>New core implementation: almost the whole CHeMS core (main.php) has been
239 	    modified in order to fit the new approach without request types. All the
240	    routines has been improved and the modules has been modified in order to
241	    be compliant with the new implementation</li>
242	<li>The new core implementation allowed to remove the following functions:
243	    gnameetAllModules(), getAllSideModulesIdx(), getModPage()</li>
244	<li>The old default request type option has been replaced by the DEF_MODNAME
245	    one (since there is not the requests types system, anymore)</li>
246	<li>Add the modules failure return values CHEMS_MODULE_FAILURE</li>
247	<li>Removed the force_lmenu and force_rmenu feature from themes</li>
248	<li>Module system has been reimplemented. It's now more flexible, using the
249	    array() construct it's possible to easily add new options to the core
250	   without have to modify the actual configuration or modules.</li>
251	<li>Added the file/md5 pair recognition for getting local files content. This
252	   allow modules to call internal files directly from the index.php in order
253	   to still get the CHeMS paths constant without have to guess them (as the
254	   old <q>rssfeeds</q> module did)</li>
255	<li>Removed all classes (src/classes.php file deleted)</li>
256	<li>The options CHEMS_HEADER_TITLE and CHEMS_DESCRIPTION has been merged into
257	    one option, CHEMS_HEADER</li>
258	<li>Various fixes, improvements and code cleanups</li>
259</ul>
260
261The download page for this release is available
262<a href='https://sourceforge.net/project/showfiles.php?group_id=208013&amp;package_id=249183&amp;release_id=574157'>here</a>.
263"));
264
265/* CHeMS-0x03_1 */
266$__title = "CHeMS-0x03_1";
267insert($POST, array(
268"id" => ++$posts,
269"title" => isset($_GET['post']) && (int)$_GET['post'] === $posts ? "$__title" :
270"<a href='?modname=posts_mgr&amp;post=$posts' title='permalink'>$__title</a>",
271"date" => "2008-04-20 17:17",
272"categories" => "chems",
273"body" => "
274This is the first patch release of CHeMS (_1), 0x03_1. The following very few
275changes has been applied:
276
277<br />
278
279<ul>
280	<li>Fixed missing %[elem_curr] format operator in <q>posts_mgr</q></li>
281	<li>Fixed wrong URL generation in feed links for <q>rssfeeds</q></li>
282	<li>Fixed wrong URI in the MOD_POSTS_SUSP variable</li>
283	<li>Others (not so) minor fixes, improvements and code cleanups.</li>
284</ul>
285
286The download page for this release is available
287<a href='https://sourceforge.net/project/showfiles.php?group_id=208013&amp;package_id=249183&amp;release_id=593649'>here</a>.
288"));
289
290/* CHeMS-0x04 */
291$__title = "CHeMS-0x04";
292insert($POST, array(
293"id" => ++$posts,
294"title" => isset($_GET['post']) && (int)$_GET['post'] === $posts ? "$__title" :
295"<a href='?modname=posts_mgr&amp;post=$posts' title='permalink'>$__title</a>",
296"date" => "2009-04-09 11:00",
297"categories" => "chems",
298"body" => "
299
300Release 0x04 of CHeMS. This is a minor release which includes lots of fix and
301improvements, among the others, the following:
302
303<br /><br />
304
305<b>Core</b>
306<br />
307<ul>
308	<li>Removed the order field (\$id) from the modload() routine. The problem with
309	     that field is that its value only influence the previously loaded modules
310	     making impossible to set an absolute id for a module placed randomly into
311	     the modload() calls list. A new order mechanism may appear in further
312	     releases of CHeMS.</li>
313	<li>The following options has been renamed:
314	<pre>
315        [old name ]		[new name]	[ description ]
316        ------------------------------------------------------------
317        FIELDS_SEPARATOR	FSL		field separator list
318        DEF_MODNAME		BASEMOD		base module
319        *_POSTS_*		*_POSTSMGR_*	posts_mgr module
320        *_PAGES_*		*_PAGESMGR_*	pages_mgr module
321        *_COMM_*		*_COMMENTS_*	comments module</pre>
322	</li>
323
324	<li>Fixed an high priority bug about USE_UTF8 which, if disabled, didn't show
325	     nothing at all (modules, pages, posts, ...).</li>
326	<li>Allowed to load modules which only have pages (_page routine)
327	     without a menu block (_main) by setting the \$side and/or the
328	     \$mods variable of modload() to <q>none</q>.</li>
329	<li>New option TAG_BODY_CODE which allow to append text inside the &lt;body&gt;
330	     tag declaration. This may result useful, for example, with the option
331	     CHEMS_SECTION_HEAD which includes some Javascript code, then the
332	     onLoad() routine may be used inside the TAG_BODY_CODE option in order
333	     to run Javascript script on page load.</li>
334	<li>Toggle the menu bars when no menu modules are loaded.</li>
335	<li>Fixed few problems about loading multiple instances of modules.</li>
336	<li>Fixed <q>null modules</q> (which returns NULL or empty strings) which are
337	     now fully ignored from CHeMS.</li>
338</ul>
339
340<br />
341<b>Modules</b>
342<br />
343<ul>
344	<li>Added two options: MOD_COMMENTS_PREFORM and MOD_COMMENTS_POSTFORM
345	     which allow to place HTML code before/after the comments module form.</li>
346	<li>Integrated categories support based on the categories module into the
347	     posts_mgr module in order to allow per-post categories in posts list.
348	     A new option MOD_POSTSMGR_SHOWCATS has been provided.</li>
349	<li>New options MOD_COMMENTS_MSG_SUBMIT and MOD_COMMENTS_MSG_RESET for the
350	     comments module form buttons <q>submit</q> and <q>reset</q>.</li>
351	<li>New option MOD_POSTSMGR_LIST_SORT. Need testing.</li>
352	<li>Removed the <q>&amp;\$var</q> arguments from the xtrset() call into the modules
353	     <q>categories</q> and <q>navbar</q>. The xtrset() definition is unaltered since
354	     it already had set the relative arguments to be passed by reference.
355	     A new optional argument allow to choose the sorting type (asc, desc).</li>
356	<li>Fixed INC files about key values for the insert() routine (id, body, etc.)
357	     which was variables, not strings.</li>
358	<li>Fixed and cleanups modules with E_ALL PHP messages enabled. All the
359	     modules are involved.</li>
360	<li>Fixed mkfeed.php which now fetch the feed in reverse order. This is not
361	     strictly a fix, rather it's an improvement (more correct behaviour).</li>
362	<li>Removed the %[posts_total] format operator from the navbar module.
363	     It isn't needed at all since it's show only into the single-post
364	     view (where posts_totals and pages_totals coincide).</li>
365	<li>New module <q>contacts</q> which allow users to send mails to the listed
366	     member (names, not email addresses). This remove the need to public
367	     emails into the web application preventing the spam phenomen. NOTE:
368	     this module doesn't have any block menu implementation so it need
369	     to be linked somewhere with the <q>?modname=contacts</q> URI string. The
370	     contacts module is disabled by default.</li>
371	<li>Implemented full instances support for all modules. For curious, the
372	     following regexp (in Vim) helped a lot:
373	     <pre>	%s/\.\(MOD_.*[A-Z]\)/.@constant(\"\\1\$instpfx\")/g</pre>
374
375	     The following modules couldn't be changed: pages_mgr, posts_mgr and
376	     navbar.</li>
377	<li>Fixed MOD_POSTSMGR_POSTSPERPAGE and MOD_POSTSMGR_MAXLEN which had problems
378	     with negative values.</li>
379	<li>Removed the %[modname] format operator since \$_GET['modname'] produces
380	     the same result.</li>
381	<li>New module chtheme (change theme) which allow to switch between themes on
382	     the fly.</li>
383	<li>Fixed HTML modules divs IDs and classes</li>
384</ul>
385
386<br />
387<b>Documentation</b>
388<br />
389<ul>
390	<li>Fixed a bit of documentation (lots need to be check!) and FAQs.</li>
391	<li>Added few FAQs.</li>
392   	<li>New chapter <q>Internals</q> into the guide.</li>
393	<li>News section about the _CEXEC constant into the guide.</li>
394</ul>
395
396<br />
397<b>Misc</b>
398<br />
399<ul>
400	<li>The guide has been updated to reflect the upcoming changes.</li>
401	<li>Introduced the <q>core</q> meta-theme.</li>
402	<li>Theme informations interface has changed. Look a .theme file to learn about
403	     the new way to store theme informations.</li>
404	<li>Added globals format operators in main.php. Actually only the theme
405	     informations has been provided.</li>
406	<li>Defined the _CEXEC costant in index.php. This allow to check if a file has been
407	     called from the CHeMS core or directly by the user. In the latter case an
408	     error message (<q>Restricted access!</q>) is print and none of the code is run.</li>
409	<li>New logo. THX to Roberto Cascio to made this nice new image.</li>
410	<li>New header, feed RSS and some meta images. THX to Azzurra Di Girolamo to made
411	     this great work.</li>
412	<li>Lots of fixes and code cleanups.</li>
413</ul>
414The download page for this release is available
415<a href='https://sourceforge.net/project/showfiles.php?group_id=208013&amp;amp;package_id=249183&amp;amp;release_id=574157'>here</a>.
416"));
417
418?>
419