The CakePHP version of S2H
-
Download CakePHP from http://cakephp.org and extract it into wherever you want.
-
While in the directory where your localhost serves websites clone this repository
git clone https://github.com/brett9897/s2h_cake.git
-
After cloning don't forget to create the following folders in the main s2h_cake directory and make sure they have 777 privileges on linux.
- tmp
- tmp/cache
- tmp/logs
- tmp/cache/models
- tmp/cache/persistent
-
Go to the webroot directory and copy index.php.default to index.php. After doing that you will need to edit index.php and set the CAKE_CORE_INCLUDE_PATH to point to your cake/lib directory in the CakePHP download.
-
Go to the Config directory and copy database.php.default to database.php. Then edit database.php to fill in your database connection information.
-
Copy core.php.default to core.php. Then edit core.php, uncommenting the line that reads
Configure::write('Routing.prefixes', array('admin'));
-
The database schema is in the sql folder. Make sure to create a database and import those tables.
-
When you first load the website you will be asked to log in. Since no users are in the DB right now, make sure you have debugging information on. Then just attempt to login with whatever password you want. The query information will be at the bottom of the page so you can get the hashed password from there and enter it in the database yourself. Oh and you will need to create an organization before you create a user.
-
To confirm everything is setup correctly. After you log in go to /pages/home and you will be told of any warnings/errors that you might need to correct. However if you got this far there shouldn't be any.
- The main layout template is the /View/Layouts/default.ctp
- CSS and JS code belongs in /webroot/css and /webroot/js respectively.
- Try to avoid inline CSS and JS as much as possible.
I think that just about covers it. Hopefully I didn't miss anything.