##A strawberry-powered MVC- and CMS- framework for PHP and SQLite##
Strawberry PHP is PHP-framework and MVC for creating web-applications and websites in an instant. Strawberry PHP uses a flexible yet fast framework that assist you in the procces by making adapters to common functionality for making requests and responses in HTML and PHP. It have never been easier to make AJAX-rpc requests, force downloads, read HTTP-headers and use HTTP-Authorization!
Strawberry PHP also comes bundled with a lot of modules for creating forms, authorization usergroups and web-mangement, Content- and blog- mangement and much more!
##Features:##
- Dynamic HTTP-Routing och SEO Search engine friendly Url's
- Expandlable MVC structure
- Logical flow and abstraction http-request and responses
- Dynamic models with PHP-ActiveRecord!
- Internationalisation(i18n) support for creating multi-language applications!!
- Support for easy templates med Twig Template Engine!
- Authorization and Security module with usergroups and permissions
- Theme-rendering module for styling and making custom templates easier
- Content-module for create/read/update & delete content and blogs to you application
- And much more!
##Installation instructions##
- Download the latest release and put it on your server
- Set your browser to the url where you installed the application. The installation starts. The installation will run some test and analyse your web- server to see if it supports Strawberry PHP. It will then try to set the correct file-permissions, create cache directories, check database, installed modules etc.
- Follow the instructions in the installer carefully and you can can start using Strawberry-PHP :)
FAQ
Problem: None of the links doesn't work and I can't access any pages on my site!
Solution 1: Check your configurations in the file: app/Config.php. Check if the first constant: BASE_URL is set to you path to Strawberry-PHP on the web-server.
Solution 2: Check if your .htaccess file in the root-directory is set correctly. Make sure the rewrite-engine is supported by your server, and thet Rewrite-base is set correclty.
Problem No style-sheets or images is loaded and everything looks like a mess!
Solution The links to style-sheets and images uses the BASE_URL constant in app/Config.php to find the sources. Set this constant correct and try again. See the Api-docs docs/api on how to set the BASE_URL constant correctly.
#How to use Strawberry PHP#
##Add your first account:##
- Login with email: admin@admin.com and password: admin
- In the dropdown-menu in the top-right of the site choose Manage users
- In the User-editor fill in the form, choose admin as usergroup and click register.
- Now you have a new account. In the click dropdown-menu -> logut and login to your new account.
- Go to dropdown-menu -> Manage users and remove the default users to make your site secure!
##Create your own theme##
- Login with your user-account
- Go to dropdown-menu -> Change Theme
- Now you see a list of all default themes along with a few buttons.
- Click the + sign at the end of the row of the theme Espacio Standard-light
- Now you have made a new copy of the theme Espacio Standard-light. You find it at the end of the list.
- Click on the green button with the pen on, to edit your newly created theme.
- Now you are in the theme-editor. Change your theme-name to something else than Espacio Standard-light #copy..
- Feel free to change the themes description, colors and icons as you wish. If you change the icon or background, make shure an image with that name exists in the folder img/themes/espacio.
- Click register to save you theme and go back to the Theme-chooser. Click the heart-button beside your theme to choose it.
##Create a new page##
- Login with your user-account
- Go to dropdown-menu -> Manage Pages
- Now you see a list of all pages and blogposts in the system. Click the blue New Page button at the top.
- Now you are in the page-editor. Choose an alias for your page. The alias can be the same as the title but all spaces and special-character will be stripped away. With this alias, you can reach your page through the url string. For example: if you set the alias to My new page :) The alias will be saved as mynewpage and if your site has the domain www.mysite.com you can reach your new page by typing www.mysite.com/content/pages/mynewpage
- Choose the type of your article, If you choose Blogpost your article will be visible in the blog.
- Write your article in the editor. Here you have an editor where you can format your text as you want it.
- Click register. Now you see your new page at the bottom of the list. Click the name to view the page. You can edit it again by clicking the green pen, or remove it by clicking the red trashcan. You can click the orange button to unpublish/publish your site Not yet implemented
##Add a menu-link to you page##
- Login with your user-account
- Go to dropdown-menu -> Edit Menu
- Now you see the menu editor. At first it can look a bit complicated but you will find it come very handy. It's a representation of the whole meny-hierachy of the site. Click on each node to unfold it and see it's content.
- Click on the node top navbar. It represents the top menu
- At the start of the row Fist TestPage you have two buttons. With the first one you can drag and drop the menu-options up and down in the list, and the second one shows the context-menu of that node.
- Open the context-menu of the node Fist TestPage. Click Append
- Now you get a new empty node after First TestPage. This is your new link! Click the first field named field and write the name of your link etc. My New Page
- In the field named value, write the short url to you page etc. content/pages/mynewpage
- Click the save button. If you get an error you probably don't have permission to save the file app/models/nabar.json. Set the persmission of app/models/nabar.json to 777 and try again.
- Now you new menu-button appears in the top-menu! Click it to see you page.
- If you mess it up when you editing your menues, press the undo-button at the top of the menu-editor.
##Create you own Model-View-Controller Module##
- In the Main module app/Controllers/Main.php There is a controller called Guestbook. It's an example controller that shows you how easy it is to extend the framework with you own modules. It has it's own model app/models/Post.php. And a view app/views/main/guestbook.html.twig You can access the controller through www.yoursite.com/guestbook. Examine how the controller is build and learn the structure of Strawberry-PHP modules! Also Check the api-manual: docs/api for more information.
You can also check the developers manual: https://github.com/caki0915/Strawberry-PHP/wiki/Developers-Manual