Archive | Tutorials RSS feed for this section

Zend Framework Blog Application Tutorial – Part 7: Authorization with Zend_Acl and Revised Styling

This entry concerns authorization. We previously covered how to authenticate an author to the blog, but we still have nothing ensuring only authenticated authors can access the new Administration Module. This is the domain of Zend_Acl, an implementation of an Access Control List system which limits access to resources by the roles assigned to a [...]

Read more

Zend Framework Blog Application Tutorial – Part 6: Introduction to Zend_Form and Authentication with Zend_Auth

In the previous entry, we created a new Administration Module to hold blog management functionality, added a Module specific layout for it, and discussed the upcoming need to ensure this is only accessible by authorised Authors. In this entry I’ll unravel some of Zend_Form’s mysteries in adding a login form, before using Zend_Auth to implement [...]

Read more

An Example Zend Framework Blog Application – Part 5: Creating Models with Zend_Db and adding an Administration Module

Step 1: Creating a Database Schema The schema for our blog’s database will be aimed at MySQL. We’re only starting with two tables to hold entries and authors, which may appear a little suspicious. The suspicion of course is due to the lack of two elements: Authentication and Authorisation. We’ll cover both in Part 6 [...]

Read more

An Example Zend Framework Blog Application – Part 4: Setting the Design Stage with Blueprint CSS Framework and Zend_Layout

Step 1: Adding Blueprint to the Project You can download the Blueprint CSS framework from http://code.google.com/p/blueprintcss/. It is released under a dual licensing system using a Modified MIT License, or the GNU General Public License. Decompress the archive of the latest 0.7 release (as at time of writing) and return to our current project’s public [...]

Read more

Installing and Running Ruby, Rails and Hobo on Windows

First, I give you a little introduction about Hobo. Hobo is a collection of open-source plugins for Ruby on Rails that help you build anything from throw away prototypes and internal utilities to meticulously crafted full-blown web apps. The goal: write less code. So much less in fact that it starts to feel like you’re [...]

Read more

An Example Zend Framework Blog Application – Part 3: A Simple Hello World Tutorial

Step 1: Creating A New Application Before we jump into programming with the Zend Framework there are a few setup tasks. We need to install the Zend Framework, get a virtual domain running, and have a basic collection of directories and emtpy files created to hold our source code. You’ll need to download the Zend [...]

Read more

An Example Zend Framework Blog Application – Part 2: The MVC Application Architecture

After speaking with any number of users about getting started with a framework, I find many do not have an advanced understanding of the corner stone of a current day web application framework: the Model-View-Controller Design Pattern. So let’s get over that hill right now, and before we start looking at PHP! As a bit [...]

Read more

An Example Zend Framework Blog Application – Part 1: Introductory Planning

This is it. The Part 1 of Astrum Furtura ZFBlog Tutorial series. I did not change anything or add something of the tutorial. I just posting it here for the help of those who need it. All contents originally written by Padraic Brady of Astrum Futura. An Example Zend Framework Blog Application – Part 1: [...]

Read more

Javascript – Auto Currency format in Textbox

Javascript function auto_currency(id){ var variable = document.getElementById(id); var new_value = variable.value.replace(/\,/g,”"); variable.style.textAlign = “right”; variable.value = digit_grouping(new_value); } HTML <input size=”10″ onkeyup=”auto_currency(‘coverage’)” type=”text” id=”coverage” name=”coverage” />

Read more

Escape String

function escape_string($varr){ //Escape array or string in postgre if(is_array($varr)){ foreach($varr as $key => $value){ $result[$key] = trim(pg_escape_string($value)); } }else{ $result = trim(pg_escape_string($varr)); } return $result; }

Read more