November 6th, 2009 by Andrew Male
Another week comes to an end and we get ever closer to Christmas, which in my book isn’t a bad thing. The build up to Xmas is always the best bit; buying in the food, putting the tree up, eating nuts, chocolates and sweet meats, watching the festive films and yuletide offerings on the goggle box.
So, during this past week I have stored some interesting posts and blogs articles which I’d like to offer to you now, a (very) early present:
Only a few I know but with presents it’s not only about the size is it…?
October 16th, 2009 by Andrew Male
Here are a couple of useful links that we’ve come across whilst building our latest Magento installation:
Removing Product Comparison - Some pointers for PHP developers to remove the product comparison block from a Magento installation.
Magento SEO - This one is very interesting giving useful advice for maximising the Search Engine Optimisation (SEO) performance for a Magento site.
September 16th, 2009 by Andrew Male
I am now able to create this new blog after a number of hours trying to work out why Wordpress wasn’t outputting the trailing slash on the post page URLs and so not allowing me to access the admin pages for the blog.
Read the rest of this entry »
July 13th, 2009 by Andrew Male
It’s not often that the works of Friedrich Nietzsche and Kierkegaard spring to mind in the non-philsophical PHP coding world. However whilst working on the latest set of feature updates for our content management system, Miromanager2.0, I found the need to be looking to see if smoothing exists before attempting to use it.
Part of Miromedia’s next release version of the new CMS will be the ability to easily (for the developers at least) create client-specific customisations that sit outside the core code. Such things include modules and HTML output relating to a certain industry sector that would not necessarily apply to other customers.
In order for use to achieve this we needed a customisation model that would site alongide the base code but would not be affected by future release of the base code. So, a new directory strucutre and mirroring of customised objects has been adopted making use of: is_dir(), is_file() and function_exists(). These being used to determine if customisations exist for a particular PHP object and if function overrides exist. In this way the base code will only execute customisations where they have been created.
…the question now remains if I can call a similar function call passing myself to find out if I truly exist. As yet I have been unable to find such a method either in the existing PHP manual or future upgrades however if I do find one and call it and the call comes back false will I explode in a puff of existential logic?
June 16th, 2009 by Andrew Male
Never forget that a disabled form field value will not be passed in PHP when posted. Consider the following:
<form action=’ ‘ method=’post’>
<input type=’text’ name=’enabledField’ value=’value_1′ />
<input type=’text’ name=’disabledField’ value=’value_2′ disabled />
</form>
When this form is posted retrieving the two fields will return as follows:
<?php echo $_POST[enabledField]?> returns value_1
<?php echo $_POST[disabledField]?> returns nothing
This is always worth remembering to save you time trying to work out why your post values are not being passed. Of course they are ways around this e.g. duplicating the field with a hidden text field, or simply not disabling the field in the first place.
June 4th, 2009 by Andrew Male
Miromedia’s latest and greatest version of its Content Management System, Miromanager2.0, was officially presented to its very first customer earlier this week. An overview training session had been arranged to demonstrate the various new capabilities and user interface. This brand new version of our Miromanager builds on the solid foundations created in earlier versions of the software and incorporates many changes that have been requested from existing clients who either use our CMS or have experience of other systems.
The training session demostrated the various new aspects and enhancements added to Miromanager2.0, including:
- On page inline editing
- Robust navigational drag/drop manipulation
- XAJAX data updating
- Brand new User Interface
- CSS based page content template
As with all software demos the developer always their fingers (or more likely, toes) crossed, hoping that they will not stumble across any issues that were not previously fixed during test passes. In this case though their proved to be no hidden gotchas, testament to out internal QA process so a big thank you to our testers.
After the session I was very pleased to hear that the client was impressed with the functionality and usability; it would give them much more control over their site than the previous CMS they used. This was one of our main aims when designing Miromanager2.0; to make the process of editing web site content as intuitive as possible thus giving the client ownership of their site and content. They are free to spend more time updating content and less time battling with a confusing or cumbersome content management system.
Miromanager2.0 has arrived…
…i shall put my R&D trumpet away now and get back to the code face.
January 20th, 2009 by Andrew Male
Using the subversion from the command line makes it much easier to accidentally commit changes across a whole project when you only really need to commit certain files that you were working on. If this were to happen you would assume there’d be an easy way to tell subversion “Sorry, I’ve commited that in error please rollback my changes” in a similar way to Microsoft SourceSafe. Unfortunately not.
So whilst looking for a way to do this I came across a solution, which involes a revision merge and commit; basically taking your changes back to a previous revision and then commiting that one.
svn merge -r 73:68 /location/of/your/files/my_file.php
svn commit /location/of/your/files/my_file.php -m "reverted to revision 68."
There was some minor housekeeping needed on the file after the initial merge to remove any conflicts but the process worked, if only this could be done with a single command.