Sunday, 25 October 2009

Book Review: Working Effectively With Legacy Code by M Feathers

Although this book's code examples are in C++ and othe languages that are not PHP, which is the code that I mainly work in, it is an excellent book that provides a lot of food for thought in how to deal with 'Legacy Code' and how to make improvements and add features to old code in a way that can be tested and not send a trail of destruction through out your code.
I actually even recommend this book if you aren't working on a Legacy system but your starting a fresh project of a decent size and haven't got much experience then this book will save you a lot of time and money as you are likely to see what mistakes to avoid before you make them.

Sunday, 18 October 2009

Anyone want a Booking Availability Calender for their website

I've recently been having quite a bit of interest in the PHP booking calendar that i put together. However I'm not 100% happy with the back end code. The functionality of it is fine but some is written in procedural code and I'd like it to be fully written in OOP. It would then be better for other programmers who'd like to use the code and add their own features.

Anyway to cut a long story short if their's anyone who would like to add a booking calender to their website I'd do the next one at half price.

Here are the features of the Booking Availability Calender.

* Able to Add/Edit and Delete rooms.

* Each Room to have a couple of images

* Each room has a title and description

* Check Availabily button that then provides a price information chart and calender for the current month.

* the ability to add and delete days from the calender.

If you would like to see some screen shots and more infromation on the booking calender then have a look at this article 'Availability Calender' Or to download the code I have wrote so far take a look at this site 'PHP Booking Availability Calender'

Wednesday, 14 October 2009

Setting up restricted file content for your users in Joomla

What I want to do is have a more personalised experience on my website. So that customers can log into there accounts and see quotes, invoices, timesheets, use helpdesk and have special messages for them only.

I searched through a large amount of extentions that would do what I was looking for, most of them were based around the highly recommended Community Builder - Joomla Extension , although CB itself is free the add ons to do what I wanted are not.

After some searching - here are some of the key phrases I searched.
joomla article permissions free
JomSocial Profile
joomla community builder article restriction

I found this one

Follow the instructions here ->

One thing I did find though was that I was having problems finding the relevan files to download. I found using this technique to be useful and that was to type the file name and search the site from google ie ' site:'

Once set up you'll find that you can't access any of your articles. You'll need to open up the permissions in the 'Manage Groups' section.
Here's how to do it.

> goto 'components' on the main menu
> scroll down to 'Access Control'
> click on 'Manage Groups'
> go to the group that your in ie 'Super Administrator'
> on the left hand side theres a menu named 'Adapters' click on content
> then you'll need go through all the 'sections' and open up all the catergories so you have permissions to make changes, edit, add etc

Thursday, 1 October 2009

Increase Session Times

One customer has recentlty complained that it some cases they do not get long enough to complete an order. This is down to the default settings, what needs to be done is the session time needs to be increased. to this you can either increase the session time out in the session call itself -

ini_set('session.gc_maxlifetime', '28800');

or a better way would be to include it in your php.ini file .

session.gc_maxlifetime = 1440

Note: session.gc_maxlifetime timescale is 3600 = 1 hour

If you're on a shared server you may think you haven't got access to your php.ini file. But what you need to do is open notepad - write the above line in it and save it as 'php.ini' in your 'public_html' folder. Once saved this will add this line to your php settings.