Enforce Coding Standards with PHP_CodeSniffer and Eclipse IDE on Ubuntu Linux
ENUMs, User Preferences, and the MySQL SET Datatype
G3D on Ubuntu Linux
Changing Mailman Python Scripts for Virtual Host Support
Using PHP pspell Spell Check Functions with a Custom Dictionary
Using Multi-Byte Character Sets in PHP (Unicode, UTF-8, etc)
Microsoft Office Open XML

Development Resource Project

Thursday, 22 February 07, 10:06 am
compton
The aim is to provide a resource where developers can go in order to get code for a specific task.

Objectives
  1. To reduce time from design to deployment
  2. to help maintain code quality
  3. to reduce need for maintanence and support
  4. to help ensure code meets specific requirements (including FF support, security, performance)
  5. to facilitate group work through standardization
  6. to grant designers the ability to easily understand the functionality available when they design a site


Possible Solutions

  1. Skeleton in the Library - Skeleton site and DB, complimented by a library which provides additional functionality
  2. Puppet Master - skeleton library and database provide all possible functionality, which is enabled/disabled through config files
  3. Building Blocks - a library provides compatible components; a site is built from 'scratch' by getting all required components from library
1 2 3    Leave Comment

compton

6:00 pm, Wednesday, 14 March 07

Now, I'm going to create the login and then checkout modules. The checkout module requires users to log in, hence grouping these two together.

The first step is to create the login.php file in the modules sub-directory. This turned out to be pretty easy, and I could simply copy the admin login module, only needing to change the name of the users table where details are taken from.

I decided to use two different tables for getting admin details and user details - even if a user is somehow able to alter their database record, they will not be able to log into the admin panel.

Now I can move on to the checkout module. The first step is to check if the user is logged in, and if not, allow them to do so. The login module has a continue feature which should enable us to have the user log in, and then be returned to the next step of the checkout process.
 
 

compton

2:57 pm, Friday, 16 March 07

So now I have a real-world site which can be implemented using the nascent CZF (chillizone framework): www.chillizone.com.

I can consider it a simple static-content-only site. At some future date, the secure ranking functionality will be incorporated into it, but for now, static content is all it needs to handle.

I already have a site and admin module for viewing and editing static content, so touch wood, I can complete this today.

First thing to do is create the database, and copy the bare PHP framework to a new folder on IIS. Next is to implement Kashif's design as a template in the new location.
 
 

compton

10:51 am, Monday, 26 March 07

Next, I will work on the top menu bar. This is to be a simple JS component to create a menu bar similar to the one in Windows apps (the File Edit View type one running along the top just below the title bar).

I have looked about, and not found anything suitable at a reasonable price. There are several offerings, but on investigation they do not have the flexibility we are going to require.

When working on the site manager web app, I already found a solution for the problem of making a drop-down menu appear when a menu option is clicked, and disappear when the mouse is moved off it. I will use this code as a starting point for the menu system.

A neat (ie fast and auto-configurable) way of dynamically building the menu is needed. A config file can enable this - a single line can list all options for one top-level menu item. The first option could be the name of the top menu, or alternatively, the menu name could be on a preceeding line by itself.
 
 

compton

2:29 pm, Monday, 26 March 07

The menu works ok. It reads the config file, which specifies the top-level labels and the options for each menu. The problem I currently face is how to determine the correct position for each menu. Obviously, it should appear just below the appropriate label.

A little research into the CSS position property reveals that absolute positioning does not in fact position an element in relation to the entire page as its name might suggest, but in relation to the element's "containing block". This block is the (first) parent of the element that uses a positioning style other than static (ie one whose position property is absolute, fixed or relative).

This is great for me - it means I just have to wrap each menu's top-level label and its options in a div with one of these position properties. Then I can position the menu options relative to this container using absolute positioning.

It works great, but IE 6/7 aligns by default with the right of the containing block, while FF aligns with the left. Turns out not to be a biggie, and is easily fixed by specifying left:0px in the CSS rule for menuitems.
 
 
1 2 3  Leave Comment
About This Page