Some pretty pictures

Below are the themes that will be included in the new Integrated Contact Form. Full credits to CSSGlobe and Templatica.com for these templates which I just adapted for use. However, I am sad to announce that I am pausing work on the script as I really need to focus on my studies and eliminate any distractions. But for now, some pretty pictures:

New Integrated Contact Form default theme
The new default theme
(More after the break) Continue reading Some pretty pictures

Modular Development

I am really glad I used modular development for ALS now. It makes it so easy to reuse code from ALS in my Integrated Contact Form. I am currently using the update module (by the way, I just realized the fgetcsv() function requires a length parameter in PHP 4 (optional in PHP 5) – eg. fgetcsv ($fp,256). Refer to here for more details. ) and I do have plans to reuse my CAPTCHA module as well. I should really adopt modular programming as the basis of all my future scripts and projects.

I realized I do make lots of careless mistakes in my coding sometimes. For example – in my CAPTCHA module, I defined the file as a gif in the headers, but I used imagepng() to generate the actual image, so I suppose it’s a png file in a gif container (though I am not perfectly sure).

Anyway, I was basically cleaning up the ICF code in the past few days. It’s really a mess after not having touched it for 2 years (the latest build was 20071011 – meaning it was realized on the 11th Oct 2007). Keep you guys updated.

UPDATE
A quick peek at one of the themes. Sadly, I have to remove support for ALS themes and singular stylesheets (meaning you have to create a theme in order to customize the look) – but the whole thing is a lot more flexible now.
Integrated Contact Form Black Theme

Integrated Contact Form to be updated

It’s being a while since I updated Integrated Contact Form (now at v0.06B) – in fact so long that I can’t seem to remember when was the last time I actually updated the script. As some of my script users would probably know, I am most efficient in writing code during exam periods (don’t ask why) and so I will try to see if I can do an update to the script over the next 2~3 months or so.

For new visitors, Integrated Contact Form is a simple web contact form powered by PHP that is meant to protect your email from spammers. However, what makes it unique is that it offers 2 ways of delivering the message – by storing the message in a MySQL database that can be viewed with the included admin panel and the more conventional way of emailing the message.

I have in mind a major update, pushing the script to its first final version – v1.00, though depending on my workload and study progress, I may release small updates featuring a few improvements. It would be a rather major rewrite of the code though. Here’s a list of what I have in mind right now:

  • CAPTCHA Validation (available as an option). I am still considering whether to use reCAPTCHA or to use my own CAPTCHA module from ALS.
  • Email validation (available as an option). If turned on, the visitor would be sent an email, where they would have to click a confirm link before their email is sent.
  • Prevent too many emails from being sent in a short period of time.
  • Full-fledged Administration panel (for those storing messages in the database). More details below.
  • Greater theme flexibility. I have the intention of including these themes together with the download.
  • Use of Scr.im API to release Email addresses safely when the system fails (due to a problem with the SMTP port maybe?)
  • And finally, a restructuring of the files – I don’t like the way the files were organized in the previous build

Anyway, let me talk more about the new Administration Panel I have in mind. Currently, while the admin can read and even reply to messages that are stored in the database, the entire platform does not feel very complete. As such, I have plans to create a complete communications platform that does not involve your personal email. Well, this is done by threading (using reference numbers), sending PHP mail() headers and maybe even PHP-IMAP functions (though that is still under consideration). Right now the concept is still in its infancy, but I will keep you guys posted as it is refined.

As usual, you can keep yourself updated via my Twitter (@wuxiaotian) or the RSS feed (dedicated to ICF updates).

PHP Check For Updates Script

This is the beginning of a new series: Code Snippets, where I do a small coding tutorial whenever I have time. Note that I am not an expert in various coding languages, so please do not flame me if there are better ways to code – I am just sharing what I know.

Anyway, today we are going to do an updating checking script. You have seen many desktop applications that automatically check for applications, but slowly, many web scripts available for download are also implementing this feature (eg. WordPress). And so in this tutorial, I would teach you how to go about creating a PHP script that checks your server for updates. Read on for the full tutorial.
Continue reading PHP Check For Updates Script