Web development
Project Management Open Source Software
There is almost an year since working with qdpm, http://qdpm.net/, which is a great tool for project management, however I wanted something more complete and if possible that had svn support for the projects.
update: qdpm supports gantt charts from version 5.5
Here is what I found:
1. Clockingi.com, http://www.clockingit.com/ has nice graphical reports, gantt charts and svn support
2. Codeni, http://www.codendi.com from XEROX, supports svn/cvs repository browsing and gantt charts, seems a complex and mature product
3. Collabtive, http://collabtive.o-dyn.de/, it’s a simple, lightweight project management too, useful for a very small team or a freelancer
4. project-open, http://www.project-open.org/
5. endeavour, http://endeavour-mgmt.sourceforge.net, you can check it’s features here: http://endeavour-mgmt.sourceforge.net/features1.html
6. Redmine, http://www.redmine.org/, gantt charts, integrations with SVN, CVS, Mercurial, etc.. written in Ruby on Rails
Jquery Regex Validation
A quick post about validating anything you want using regex. I used it in a project that created forms on the fly, so validations like email, numbers and so on wasn’t so simple (I couldn’t do it by just adding the validation as a class: class=”email”)
so first step is adding what we need before the </head>:
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.validate.pack.js">
now just after the above code we add our regex method:
<script type="text/javascript">
$.validator.addMethod(
"regex",
function(value, element, regexp) {
var check = false;
var re = new RegExp(regexp);
return this.optional(element) || re.test(value);
},
"Please check your input"
);
</script>
and the final thing is ading the validation we need – you can use php to add them from the database for instance:
<script type="text/javascript">
$(document).ready(function(){
$("#myFieldId").rules("add", {regex: "^(0|[1-9][0-9]*|[1-9][0-9]{0,2}(,[0-9]{3,3})*)$"});
})
</script>
Overlength date field error in prestashop
Recently I got this error when trying to send emails in prestashop.
An email was bouncing back and it contained the following message:
This message has been rejected because it has
an overlength date field which can be used
to subvert Microsoft mail programs
After a lot of headaches and a cofee
I manage to detect what was wrong:
Presta uses in the email class a variable $templateVars
this was like:
$templateVars = array(
‘{date_facturare}’ =>
‘Nume Firma: ‘.$invoice->company.’<br>’.
‘Cod fiscal: ‘.$invoice->tax_code.’<br>’.
‘Registrul Comertului: ‘.$invoice->reg_data.’<br>’.
‘IBAN: ‘.$customer->iban.’<br>’,
‘CNP: ‘.$invoice->cnp.’<br>’,
‘{firstname}’ => $customer->firstname,
‘{lastname}’ => $customer->lastname, …
However the problem was because of a , instead of .
'IBAN: '.$customer->iban.'<br>',
should have been:
'IBAN: '.$customer->iban.'<br>'.
Because of the wrong “,”, $templateVars[0] was taking a long value and apparently Swift Mailer was appending it to the header date of the email hence the error with the overlength date field.
Cakephp – JsController could not be found
Recently I wanted to test the ajax capabilities from cakePHP and after setting up the links to prototype.js and scriptaculous.js just as shown on cakePHP website, I’ve noticed the ajax is not working.
In the javascript error console I noticed the error:
JsController could not be found
The problem was that I thought cake will include the above js files automatically from it’s core libraries. Of course it doesn’t so to solve the problem just download prototype.js and scriptaculous.js and place them in the js directory inside webroot
That’s it!
GoDaddy 500 Internal Server Error – Windows Shared hosting

Today I needed to move some sites to a different server. A wordpress and an old oscommerce. The server was a windows server from godaddy – the hosting was a shared one
After setting up the database and the files I run into this error:
500 Internal Server Error
› Continue reading
Godaddy custom php.ini problems and solutions
Godaddy can be a killer of time for a programmer. It can take ages to figure out some things that are just now standard to webhosting.
Recently I took care of a client that had a windows hosting package and needed a script setup that required custom modifications to php.ini.
I’ve placed php5.ini to root web directory (for godaddy if you have php5 installed, php5.ini is required otherwise php.ini) the custom settings were in effect and guess what? mysql wasn’t working anymore:
Fatal error: Call to undefined function mysql_connect() in xxxxxxxx
Solution is to set up a complete php.ini file (you can take it from your computer) from which settings like upload_tmp_dir should be set up from the original php.ini
Of course how the heck you can read the original php.ini? You don’t need to, just create a a test.php and place phpinfo(); there and you should be able to read all the variables that required path alterations to fit the server.
Questions? Please let me know
How to add a custom font on your website
I’ll keep things short so people who want to add a custom font to a website will easily accomplish the task.
in your css file:
p {
font-family: ‘Custom-Font’, verdana, arial;
}
for safari and mozilla browsers:
@font-face{
font-family:’Custom-Font’;
src: url(‘Custom-Font.otf’) format(‘opentype’);
}
for IE:
add this to your html page (the css will be visible only to IE users):
<!–[if IE]>
<style type=”text/css” media=”screen”>
@font-face{ font-family:’Custom-Font’; src: url(‘Custom-Font.eot’); }
</style>
<!–[endif]–>
Note: in order to create an eot (Embedded Open Type) file, use the WEFT tool from Microsoft