Simplilo (version A-08)

Description of the page content

Main changes and fixes in Simplilo A-08.


Under development since 2012-09-04 to 2014-01... Probably, this will be the last A-branch version.

A new version was needed, in order to implement a new idea: create static HTML pages too. Why? Are not dynamic sites better? Well, they are different...

Static sites have some advantages: They are faster; they are more secure; they are not affected by updtaded versions of PHP or Apache...

New features

Optional static websites.

In order to build static HTML pages from the source pages, the website's index.php has to be locally executed with the source pages as arguments. The location of the index.php and the source pages makes no difference. Examples with different relative locations of the files:

New calculated system variable for the <> addon: url_page, that returns the page in proper format for a URL, depending on the values of $STATIC and pretty_url; The new function url_page() does the calculation.

New input value for the <> addon: static returns the value of $STATIC, a boolean variable that is true when the engine is building a static page. This lets the template or certain pages to be automatically adapted for static and dynamic websites.

New <> addon: it returns true if the given (or current, by default) page is in the current language or has no version in other language. Its goal is to make it easy to created multilingual page lists: pages in the current language will have higher priority, and translations will be listed only when there's no version in the current language.

New <> addon in the addon/if.php file.

Planned new features

Metadata cache. This will improve the rendering speed.

Main fixes

Detected on 2012-12-12, fixed on 2012-12-30: Draft pages were accessible online by their URL.

2012-12-31: The time difference with the server was always added to the file modification time of the page. But this is not right when the page modification time is indicated with the 'modified' metadatum.

2013-02-03: Fixed: drafts were not show on localhost.


2013-01-04: the loop in 'get_pages()' runs faster.

2013-02-04: 'write_page_cache()' improved: the cache file gets the modification time of the original page. This makes simpler the cache management when the server's time zone and the webmaster's time zone are different.

2014-01: Changes to facilitate the migration to Fendo: Simplilo-only blocks and Fendo-only blocks.

Code changes

The new $ON_LINE variable, $ON_LOCALHOST and ON_SERVER have been moved from the engine's config.php to the Constants section of the engine itself, because they are calculated constants, not config variables.

2012-09-04. The meta comments of the engine code were standarized: my marks "!!!" were changed to "xxx", "fixme" and "todo", combined with my usual keywords. Most of the code marked as "old" was removed; only old code that still can be useful was kept.

2012-09-10. A new function main() is used. This was needed for building a whole static website in a loop.