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 www.littleripples.com 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 http://extensions.joomla.org/extensions/access-a-security/backend-a-full-access-control/7010





Follow the instructions here ->
http://blueflyingfish.no-ip.biz/joomla15/noixacl_v206_install_2.htm

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 'mod_mainmenu_noix.zip site:http://joomlacode.org'


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.

Friday, 25 September 2009

Blank Admin links in Magento

On the website Rock Marine Services Ltd I noticed a couple of problems in the admin area - firstly the link 'CMS/Manage Pages' was blank and 'system/configuration/Catalog' was blank also.

>> take a look at this forum http://www.magentocommerce.com/boards/viewthread/44474/


SSH is really the only way to be doing this work, its much much quicker than ftp. For SSH instructions that will cover all you need for this job see my instructions at
Transfer a website using ssh . It should be in the top five links there.

Wednesday, 23 September 2009

Receiving the error 'Warning: simplexml_load_file() [function.simplexml-load-file]: (null)(null)*/lib/Zend/Locale/Data/tr.xml:2104: parser error : out

These seems to be a problem that's effect installation on Heart Interntet shared hosting accounts.
I found the solution for this on this forum thread http://www.magentocommerce.com/boards/viewthread/44409/P15/

you need to open your .htaccess file in your magento folder and add the following


RLimitMEM 1280000000
RLimitCPU 150 200
RLimitNPROC 25 30

Monday, 21 September 2009

Joomla intermittently diplaying broken or blank page in Internet Explorer 8 -

This problem was highly strange as it does not appear in all IE 8 all the time. Infact I had done extensive tests on IE 8 on my home computer and NEVER encountered the problem. However my colleague could see it on his, but intermittently. Here is a list of key phrases that kind of sum up this problem, it gives you an idea of what a bizarre error it was.

* Joomla blank page in ie 8
* joomla blank page in internet explorer 8
* joomla only left menu blank page in ie 8
* joomla only left menu blank page in internet explorer 8
* joomla htmlmap ie 8 problem
* joomla htmlmap internet explorer 8 problem
* Joomla blank page in some ie 8
* Joomla blank page in some internet explorer 8
* joomla sometimes displays blank page in ie 8
* joomla sometimes displays blank page in internet explorer 8
* joomla sometimes displays broken page in ier 8


I had to go around to his to fix the problem as otherwise the 'lag time' would be too much. ie I would have to run a test - then call him to find out the effect!
Once at his place the problem had disappeared, on multiple refreshes the problem re-arose. After turning each module on and off and then multiple refreshing I found the problem coming from this component
'html maps' that can be found here 'http://extensions.joomla.org/extensions/style-a-design/design/7332'
The solution for me here was to move all items that I had in image maps to 'Flexbanner' - where you can just paste all your code in if you wish. Flexbanner can be found at http://extensions.joomla.org/extensions/search/flexbanner

I hope this item helps others. Yet again another reason to hate internet explorer.

I found this comment on IE 8 that really sums it up for me "I hate internet explorer. It is an absolute nightmare and the newest edition not being fully standards compliant without the need to go diging around in settings is ridiculous.

That said, the average computer user plugs in the address on whatever default browser and settings are included with the PC and complains when it doesn't look right. Whos fault is it? Mine of course. "

Check out the IE 8 Incompatibilty list is you still don't believe how bad IE is! Even microsofts own website is on it!!!!!
http://www.cmswire.com/cms/web-cms/popular-websites-incompatible-in-internet-explorer-8-003992.php