My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for

English, Русский, Deutsche, French, Italiano, Türkçe, Nederlandse


phpDays - flexible php5 framework based on the MVC and ORM design patterns.

Start now

  • About the project (features)
  • Changelog (changes between project versions)
  • Install the framework on your server and then configure a new project
  • Upgrade an application from a previous version
  • Quick start to get your first application up and running
  • Answers to your questions
  • All pages in English

Every day use

  • MVC - basic concepts necessary to work with the framework
  • Library class reference descriptions
  • Ajax support in your applications
  • Multisite - manage many sites from one framework installation

For project members

EnMultisite  
Multisites.
Lang-En
Updated Nov 28, 2009 by letl...@gmail.com

If a complex, feature-rich section has to be added to a site, it is best to make it as a separate project. Then the project can be integrated into another site. It gives a semblance of Lego bricks, from which you can build a web site on the basis of other projects.

Creating a site

Suppose that you need to create a complex forum section. Create a separate project, and implement only the forum section. The same way deal with the other complex sections of the site (including a blog, catalog, etc).

The project will be located in the /var/www/forum directory.

Now prepare your forum for inclusion in another section of the site. Create a new configuration file /var/www/forum/app/config/myblog_development.yaml. Edit it to work with a database of your application. Set the url/base: myblog/forum option.

Implement all the simple parts of the site the same way as before - by creating a separate controller.

Including the Project into the Current Section of the Site

Files and the static directory are located in the /var/www/myblog/public directory.

We have to create a /var/www/myblog/public/forum directory for our new forum section. Copy the contents of /var/www/forum/public into the new directory.

Edit the file /var/www/myblog/public/forum/index.php:

  • set the path to the phpDays library
  • set the path to the forum application
  • change the configuration from development to myblog_development

Explanations

Now when you go to http://localhost/myblog/forum, you will be redirected to /var/www/myblog/public/forum and the appropriate application will be launched. As a result we'll get "a site within a site."

If you have to use a similar forum section in another project, this will save you time. All you'll have to do is to include one project into another.


Sign in to add a comment
Powered by Google Project Hosting