EasyDoesIt -- An easy publication system based on PHP
-----------------------------------------------------
What is EasyDoesIt?
-------------------
EasyDoesIt is a micro web site framework using PHP. It requieres no database in order to work, since it uses plain text files instead. It has been conceived with maximum simplicity in mind.
The aim of this software is to provide developers of simple web sites with an organizational structure and basic files so that they have no need to re-invent the wheel with every new web site. A developer used to EasyDoesIt knows where to find every element of the web site at first sight, so the maintenance of the web site benefits from normalization.
EasyDoesIt provides the developer with:
- A simple parsing engine for all pages.
- A multi-template system.
- A uniform way for naming all pages in a web site.
- A set of common PHP variables which can be accessed for convenience at any point of the page or template code.
- A basic customization for every page, based on proprietary tags, including page title, page keywords, page description and page alternative template.
- A structure of folders in which to organize web pages, images, templates and a single configuration file.
- A way to include custom variables and functions.
- A simple form processing script.
EasyDoesIt is intended for developers willing to use the following technologies:
- HTML
- CSS
- Javascript/Ajax
- PHP
EasyDoesIt is known to nicely coexist with the following services/technologies:
- Flash
- Flickr
- Google AdSense
- Google Analytics
- Google Maps
- Paypal
- Piwik
- Simplepie
- Slideshare
- Youtube
Besides, it should work just fine with any other service based on embedding HTML or Javascript code in your pages, like Twitter or Facebook widgets.
What EasyDoesIt is not
----------------------
- It is not a full CMS (Content Managemente System). You can not modify the content or aspect of your web site on-line.
- It is not a blog software.
- It is not a software designed to create big web sites, with hundreds of pages.
- It is not a way to publish content via RSS.
- It is not a HTML editor.
- It is not a file manager.
License
-------
EasyDoesIt is released under the GPL version 3 public license. See LICENSE.txt file to know more about the terms of use.
Disclaimer
----------
EasyDoesIt is open software, free, and distributed as-is. No responsibility is taken by the developers of the software for its use or performance. By installing and using it you are acting under your own reposibility and accepting the terms of use.
The developers of EasyDoesIt do not provide support for the software.
Installation
------------
NOTE: From here on, we will use the notation '~' to indicate the main folder of your EasyDoesIt installation.
Unzip the distribution file to your local disk.
Rename the following folder:
- '~/__img to' '~/img'
- '~/__local' to '~/local'
- '~/__pages' to '~/pages'
- '~/__templates' to '~/templates'
Edit '~/local/config.inc' (and optionaly '~/local/local.inc') to customize your web site. Both are regular PHP files to be included during the rendering of every web page.
Upload all the files and folders to your hosting account.
You are done.
Configuration
-------------
Use '~/includes/config.inc' to configure the parameters of your website. It is a regular PHP file.
Use '~/includes/local.inc' to add or overwrite any variable or add PHP code before the loading of the page. The reason after 'local.inc' is to keep 'config.inc' as clean as posible so that the maintenance of your website is be easier. It is also a regular PHP file.
Using templates
---------------
Any EasyDoesIt template is composed by two files, ending by '_pre.inc' and '_post.inc' which can be located at the '~/templates' folder. The default template has no name, so the two files of the default template are preciselly '_pre.inc' and '_post.inc'.
The rationale of the anatomy of an EasyDoesIt template is that there is always a main body of content which is surrounded by additional elements of the page. The content of the main body will be included in a page file (which will be searched at the 'pages' folder), while every code which has to be included before the main body can be found at '_pre.inc' and every code after the main body at '_post.inc'. That is: the whole page is composed by: '_pre.inc' + 'page.inc' + '_post.inc'.
Other 'include' files can contain the header, footer, navigation menu, sidebars, statistics code, etc., depending on the interest of the developer.
Using an alternate template
---------------------------
You can also use alternate templates for single pages. If a page includes inside its text the tag '
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
[...] After uploading this file to your web server you can access it by typing: http://website.com/?p=products Remember to upload all needed images and other files (for example if you are linking to PDF files, you can find useful to create a '~/pdf' folder) so that you don't get broken links. Searching --------- Being a tool for developing simple web sites, EasyDoesIt does not provide an internal search engine. You can overcome this limitation by including a search form which will use Google search, limiting the results to your web site: Please refer to Google API to customize the results of your search form. Other search engines can provide similar functionality. Please refer to their help pages if you want to search your site with a different one. Forms ----- The distribution includes a form processing script, 'send.php', which provides with the functionality of sending the results of web forms to the administrative email address configured at '~/config.inc'. You can check '~/pages/contact.inc' to see an example of email form. Please notice that you may want to include the following hidden fields in order to make the form processor to work optimally: The variable 'referer' passes the value of the preceeding page from which the user has come to the contact page. This can be useful to determine which of your pages are producing more leads. The variable 'xsubject' contains the value of the Subject line of the message that will be sent to the administrative email address. The variable 'xedit' containst the value of the page (i.e., the 'p' variable) of the exit page, which will be rendered after the sending of the form. Any other form variables will be added to the message sent to the administrative email address with their own names. The form processor also provides with the functionality of basic filtering some regular spam and prevents the processor to be used from outside your web site. The message resulting from the form submission will also carry information about the IP of the sender, referer page, user agent and a link to a publicly available IP information service. Creating a new template ----------------------- As stated before, an EasyDoesIt web page consists of a pre-template file, a content file and a post-template file. If you are developing your own template, the easiest way to go is creating the web page as a regular HTML file and, after you are happy with the result, splitting the HTML file into two separate '.inc' files, '_pre.inc' and '_post.inc' containing the code before and after the main body of content, and copy them to your '~/templates' folder. This will give you the default template for your site. As easy as that. Consider browsing the sample templates at '~/templates' to see how they work. If you want to create an alternate template for a particular page (for example the home page), you have to do exactly the same procedure, but you have to name the template files with a different name, which you will use later to declare the template of this regular page: '~/templates/home_pre.inc' and '~/templates/home_post.inc'. After that you declare the template inside the code of the page ('~/pages/home.inc') as: