setAttribute/getAttribute(“style”) crossbrowser alternative

The JavaScript methods setAttribute and getAttribute are very handy when you are designing dynamic effects for your website, but those methods have a lot of bugs in IE (6 an 7 at least), I use these two crossbrowser functions as alternatives instead of using directly setAttribute() and getAttribute(), I’ve been using them for quite a… Continue reading setAttribute/getAttribute(“style”) crossbrowser alternative

How to upgrade Ubuntu from 8.10 to 9.04 using the command line and the Internet?

You can upgrade your linux system using the package manager APT which is available on debian based distributions: First we have to update all the packages installed: $ sudo apt-get update $ sudo apt-get upgrade Now we make sure that we have the update-manager-core package installed with: sudo apt-get install update-manager-core Then we start the… Continue reading How to upgrade Ubuntu from 8.10 to 9.04 using the command line and the Internet?

SMF mod: Add Posts Navigation

Description and Features: Enhance your website accessibility and add posts navigation arrows within posts to let you and your visitors navigate very easily between posts and pages: Place top and down arrow within posts Topmost arrow or downmost arrow take you to the previous or next page No additional images loaded No JavaScript Unlike all… Continue reading SMF mod: Add Posts Navigation

A note on JavaScript arrays creation & initialization

I use PHP a lot in my projects and it happens that sometimes I combine PHP with another language and write completely useless code. PHP arrays can be created and initialized with like this: <?php $cities[] = “mecca”; $cities[] = “medina”; ?> I thought that the same would apply to javascript… Yes, it can work,… Continue reading A note on JavaScript arrays creation & initialization

Get file extension on PHP

There are many ways to retrieve files extension with PHP, but we will have to choose one that feets our needs and gives more reliable results. When dealing with file extension you should know that a file extension is not always 3 characters long (ex:  foto.jpeg, index.html) and that it doesn’t start after the last… Continue reading Get file extension on PHP

Install PHP 5.2.6 on CentOs 5.x

Oddly enough, PHP 5.2.6 is still not available on the default CentOS repositories ([base], [updates], [addons], and [extras]), the latest PHP version available in those repos is PHP 5.1.6! In order to install PHP 5.2.6 you can add the CentOS testing repository and enable it then install or update PHP. To add the CentOS testing… Continue reading Install PHP 5.2.6 on CentOs 5.x

MySQL script files how-to

What is a MySQL script file?.. Why use it? A MySQL script file (aka MySQL batch file) is a regular text file containing MySQL statements separeted by terminantors, statements in a MySQL script file can be run from the MySQL client, this is very useful, many PHP script available online come with MySQL script files… Continue reading MySQL script files how-to