Archive for March 6th, 2006

Mar 06

Php List Duplicate Messages

Recently I set up php list for sending birthday messages to people on the loyalty list. I was worried when I got 2 emails when I sent a test message. However I found out that it is a feature and not a bug because 2 mails are sent only when testing to show you what the text version and the html version will look like.
You can find a discussion about it here Duplicate Messages

0
comments

Mar 06

Creation of new event handler from a function in JavaScript

Creating a dyanmic event handler in the Javascript function is quite easy. JavaScript has an inbuilt function ‘addEventListener’ which creates a new event handler.

The syntax of the function is



element.addEventListener( type, listener, useCapture);

type : Representing the type of event being handled.
listener : The listener is the method or function which is called when the event occurs. Preferably the function be an inline function.
useCapture : The value of this parameter is either true or false. When useCapture is assigned true the method/function is called after the creation of the event handler. Otherwise the event is called only at the time, when it is triggered.

An example is given below

td.addEventListener(“click”, function() { alert(“Simple Example”); }, false);

For more reference click here

0
comments

Mar 06

Migrating to Drupal CMS

Yesterday I nearly finished porting my web site to Drupal CMS (Content Management System). Everything works seamlessly however I will have to change the site header and keep it common among all the applications on the web site. The applications I currently have are Drupal for my web site, b2evolution for the Blog, phpGedView for the Family Tree.
The down side to all this is that I cannot get a common look and feel for the whole site and each application has its own look and feel.

What I’m really happy about is that my old home made php script works seamlessly with the new site so I did not have to leave out any content and adding content is a breeze.

Hopefully I will have a lot more content in the weeks to come.

0
comments

Mar 06

First Look at PHPList

We needed to implement an application that could send news letters to a list of subscribers. The first thing that came to my mind was to set up a mailing list because that was the usual way to go. However a friend suggested an application called PHPList.
As with most applications studying the UI is the most difficult part. However the features that PHPList offers is pretty cool. And would fit right in for our Newsletter applicaiton.
Since we are all lazy to implement the infrastructure to manage lists of users, their subscription, an option for them to unsubscribe, change their attributes, monitor views etc.
All these are implemented in PHPList. Our newsletter also needed to send customised letters to all the users. Ie the mail should contain the Users name.

PHPList has a feature where you can get the content of a message from a website. What we did was implement a JSP that took an attribute (ie. Name and added that attribute to the output) now PHPList could grab the page after passing the Name of the user. This fit right in to how we wanted our application.

I will let you know how it progresses.

0
comments

Mar 06

Linux Modem Worries

Today I ran into a funny problem. I tried to set up a moden on a FC4 Box. I went through the manuals and it suggested using a tool “wvdialconfig”. The configuration went on Fine but when I tried to dial out. The thing just would not dial. The OH LED did not come on. However it did dial when when I pulled out the Telephone line. Looks like it could be a AT Command problem. I will try again this week and post the results on this blog.

0
comments

Mar 06

MySQL Dump / Grant Privileges

Sometimes the most simplest of commands can be a blocker if you do not have access to them. Today I was in a far out place with no connectivity and no way of knowing what the command for granting privileges were.
I could not find the documentation. Finally I called a colligue and asked him to google for the command.
So just to remind me the commands are
GRANT ALL PRIVILEGES ON test.* TO ‘root’@'localhost’ IDENTIFIED BY ‘goodsecret’ WITH GRANT OPTION;

The other one is :
mysqldump –add-drop-table –all-databases

Better Still the link to mysqldump command

0
comments