This documents aims to help newcomers to understand how and why the project is organised. It is recommanded to everybody to:
As in every project, the question of the license has been raised. Here are some points we dicussed about.
We did not want to include any Non Commercial clause in our license because:
This — or its variants such as wtfpl — is a funny license. It fits very well for little scripts and utilities that we just want to share. But this is no serious for a full software and don't provide any law support in case of real conflict.
Creative Commons haven't been design for code so we will not use it for backend licensing. But it's well for contents so we decided to license themes under Creative Commons BY SA. (still no NC disposition!)
GPL is a complete license, designed for source codes. But we were not confortable with its SA clause since it would be anoying for potential aplications (commercial or not).
We finally choosed the MIT license for the source code.
All contributions are welcome. But in order to maintain some code consistency, please use the following conventions.
The famous "tabs or spaces" question has to be quickly solved since refactoring whitespaces is nothing but a waste of time, especially if each contributor has its own convention and systematically refactors other people's work because they are convinced that he is right.
Although some of us prefere tabs while the others wanted spaces, we all agree that mixing tabs and spaces is a very bad practice.
We voted in favor of tabs because this is what tabs are made for and so everyone can choose how to display it.
Note that if you use vim you can set the use of tabs for the whole git project as explained here.
Here are some snippet expliciting our conventionnal coding style:
``` <?php if (condition) { }
for (a ; b ; c) { } ```
<?php
tag is not closed at the end of file. It avoid empty end line bugs, and some even says it leads to better perfs.pubDate
in the RSS specification).The user that runs Freeder must be able to write in data/
and tmp/
directories. There should be no other directory in which writing right is required.
Of course if the user have the rights on the whole Freeder directory, it works well, but some people prefere give the minimum rights to www-data
or whatever file serving user.
The tmp/
directory is used by Rain TPL to store cached pages.
The data/
directory contains every user specific data. It includes a config.php
file that defines some constants and the sqlite database file for example.
Files in inc/
are designed to be included in other ones instead of being directly called to serve a page.
File with the .class.php
extension are Object Oriented. They define the class named as the file is.
The tpl/
directory is where you would put Freeder themes. Theme list is just the list of directories in tpl/
and they have to contain each Rain TPL view templates.
See tpl/README.md
for more information about template conventions.
To know whether it has been set up or not, Freeder fetch data/config.php
. It considers that the existence of that file means that Freeder is instaled.
TODO