/Strawberry-PHP

A strawberry-powered MVC- and CMS- framework for PHP and SQLite

Primary LanguagePHP

Strawberry-PHP

##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:##

  1. Login with email: admin@admin.com and password: admin
  2. In the dropdown-menu in the top-right of the site choose Manage users
  3. In the User-editor fill in the form, choose admin as usergroup and click register.
  4. Now you have a new account. In the click dropdown-menu -> logut and login to your new account.
  5. Go to dropdown-menu -> Manage users and remove the default users to make your site secure!

##Create your own theme##

  1. Login with your user-account
  2. Go to dropdown-menu -> Change Theme
  3. Now you see a list of all default themes along with a few buttons.
  4. Click the + sign at the end of the row of the theme Espacio Standard-light
  5. Now you have made a new copy of the theme Espacio Standard-light. You find it at the end of the list.
  6. Click on the green button with the pen on, to edit your newly created theme.
  7. Now you are in the theme-editor. Change your theme-name to something else than Espacio Standard-light #copy..
  8. 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.
  9. 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##

  1. Login with your user-account
  2. Go to dropdown-menu -> Manage Pages
  3. Now you see a list of all pages and blogposts in the system. Click the blue New Page button at the top.
  4. 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
  5. Choose the type of your article, If you choose Blogpost your article will be visible in the blog.
  6. Write your article in the editor. Here you have an editor where you can format your text as you want it.
  7. 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##

  1. Login with your user-account
  2. Go to dropdown-menu -> Edit Menu
  3. 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.
  4. Click on the node top navbar. It represents the top menu
  5. 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.
  6. Open the context-menu of the node Fist TestPage. Click Append
  7. 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
  8. In the field named value, write the short url to you page etc. content/pages/mynewpage
  9. 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.
  10. Now you new menu-button appears in the top-menu! Click it to see you page.
  11. 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##

  1. 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