Coders Army
You're in the army now
You're in the army now
Sep 15th
I recently had to set up a SOAP service for a client. So I thought it was the perfect opportunity to get to grips with the Zend_Soap_Server.
Everything went swimmingly. I agreed on a structure with the customer and following the Zend Framework reference manual i managed to set up the server in no time at all using the auto discover feature.
Now I use a linux environment and tested the service with php_soap, nusoap and Zend_Soap_Client, and it all worked perfectly. it was so easy to use i found myself laughing.
But…. and here is the killer. Its only after I spent two whole days writing and testing the service that I hand it over to the customer and… it doesn’t work.
More >
Jun 15th
EDIT: Since This article has been written the original code has taken down from our Subversion repository. to download a copy click here
In the course of my trying to do various things with the Zend Framework I am constantly haveing to create rich text editor fields.
Now the guys at Zend Framework have done a bang up job of of getting things started and the Dojo and jQuery libraries that are part of it are spectacular.. except that they dont offer an advanced text editor. Which I think is a bit of a shame. So I decided that In order to make my job a whole lot easier I would create a plugin that I could reuse as and when I needed it.
Please do bear in mind that this is not a completely finished plugin so feel free to fix the bits I miss. If you want to see/use my original code you can find it over at http://subversion.zucchi.co.uk.
So far This helper has allowed me to call the TinyMCE editor form countless views and forms.
Mar 12th
We have a couple of Acer Aspire One net books which we continually have silly little hiccups with. We finally had quite a big issue happen very recently one of the net books just refused to connect to the internet at all.
The symptoms were quite obvious.
As the AA1 has a strong tendency to just die without warning when the battery runs out I suspected that it may have been caused by a corrupt file or three.
So now for the solution…
Turns out it is as simple as deleting a few files in order to force the networking to reset itself and not as severe as re-imaging the whole machine as Acer support has mentioned to a lot of people who have has the same kind of problems. It would be nice if companys who provide machines with linux on it would take the time to use google to find the solution instead of having a windows monkey sat on the phone not having a clue what they are doing and giving duff advice.
All right i’ll stop ranting now… the command you need to get everything running smoothly is
rm -Rf ~/.gconf/system/networking/*
This removes all the network connection settings and no need to use sudo. All you need do then is reboot and wait for the network manager to appear so you can connect to your network again.
Hope this manages to help some people
Mar 6th
In this part I am going to go through setting up some translation methods and setting up your database connection.
initTranslate()
Zend_translate provides us with a very powerful way of translating text in a website, I would strongly recommend reading the manual for more info on the full extensibility of the component.
I tend to use the GetText method of translation. Mainly due to its increased speed over other methods as it is a compiled source rather than plain text. If this sounds daunting then dont worry as there are a number of free applications that will help you to build the files you need… I use a combination of POEdit and the GTEditor Plugin for Eclipse. POEdit is by far the more powerful of the two as it will compile the relevant files for you as well as attempt auto translation. Gted only allws for the editing of the human readable source but I find it is a nice clean and intuitive interface.
So here is the code to throw into your Initialise class.
public function initTranslate()
{
$settings = Zend_Registry::get('settings');
if (Zend_Registry::isRegistered('Zend_Cache')) {
Zend_Translate::setCache(Zend_Registry::get('Zend_Cache'));
}
$options = $settings->translate->options->toArray();
$locale = Zend_Registry::get('Zend_Locale');
Zend_Registry::set('Zend_Translate',
new Zend_Translate('gettext',
$settings->translate->path ,
$locale->toString() ,
$options));
}