About this website (what makes it tick)
This website is built from Zend Framework 2. ZF2 (Zend Framework 2) is modular framework that is easily extendible and scalable, some of the modular that I am using besides the basic zf2 is
- ZfcBace - base classes that enable several other modules
- ZfcUser - a module that enables user registration and management
- BjyAuthorise - Authorasation module that enables to set permissions and access controll in ZF2
- ZeTheme - ZeTheme is a module that allows you to override the default layout and create custom layouts that you can configure in different ways
- ScnSocialAuth - ScnSocialAuth is a ZF2 module that extends ZfcUser by enabeling Authorisation via oauth2 providers such as Facebook, Google and LinkedIn
- zf2-mobile-theme - This is the theming module that I am currently building to make sure that this site can be read on multiple devices, including mobile and touch enabled devices. I do this by using jQueryMobile and HTML5 with us and css
- roleuserbridge - a module that sets all new registrations to users
I also have another article about what areas that I will extend when I get the right time.
TODO - areas that I would like to enhance this site with.
Zend Framework 2 Modules
The article module that I have created is based on Akrabats excellent ZF2 album tutorial, besides changing the name from "Album" to "Article" I did sone more small enhancements to be able to learn how to develop Zend Framework 2 modules, mainly
- Updated the module router configuration
- Added a viewAction
- Updated the form filters
- Updated the ViewLayers
Article Router Configuration
The default configuration that Akrabat hade done on his modules work great for his intended purpose, i.e. to display all different albums and to either add, edit or delete a album. However the need I have for a article module is not only to view all articles and to add, edit and delete but also be able to give access control to each individual "action" for users with the right privileges and currently I am unsure if the previous router config would allow access control per action
The default album module only displayed the title and name of a album so thee where no need for a individual ZF2 viewAction, however as a article can have much more content I needed to add a individual viewAction as well.
The ZF2 form filters that was implemented on the Album module was there to remove all HTML tags and other unsafe content, but as the ZF2 Article module main aim is to allow a flexible way to input content in to a site I needed to allow some HTML tags, a full list can of course be viewed at the GitHub Zf2 article repository.
Looking out users from some areas of the site (add, edit and delete) I ended to remove those links from any user that where not logged in.View
After following a good tutorial by Abdul Malik Ikhsan I have now created my own ZF2 module, its a simple module named "wdev-picture" and the mian functionality it have is it allows you to upload a picture to a assets folder in the module, I have also maded sure that this module works with JqueryMobile and the ZF2 JqueryMobile theme I am building so now it will allow me to take and upload photos straight in a Safari browser. The module is installable by composer and you can find it on my GitHub repositories under wdev-picture More information will follow about this module.View
WdevMarkdown plugin module for ZF2
WdevMarkdown plugin module for ZF2.
- [ZF2]: Zend Framework 2