Sunday, October 26, 2008

Upgrade Drupal 5.x website to Drupal 6.x version

Before upgrading from Drupal 5.x to Drupal 6.x version, we need to follow the below mentioned steps.

• Make a backup of all files and database. If anything goes wrong during upgrade process, than you can restore your Drupal 5.x web site. Must make a copy “Files” and “Site” Folder from the Drupal installation directory on your local system.

• If your site needs some particular module, ensure that those modules are available because few Drupal 5.x modules are still not available.


• Disable all contributed modules and set your Drupal site to default theme such as Garland or Bluemarine. You should upgrade modules and themes after you have completed core Drupal upgradation.

• Login in Drupal 5.x web site administrator panel. Navigate to modules setting page. Disable update_status module and uninstall this module.


• Again in Drupal 5.x admin panel, navigate to Logs -> Status report
If there is any problem fix it before upgrade.

• Upgrade all installed modules to its latest version available for Drupal 5.x


• Set your Drupal site to off-line mode. This can be done as follow. In Drupal admin panel Navigate to : Administrator -> Site Configuration -> Site maintenance -> select site status as off-line -> Save Configuration.

• Now using any FTP delete all files and folder from the Drupal installation directory.


• Download the latest version of Drupal 6.x from drupal.org. Unpack the files and upload it to the Drupal installation directory.

• Copy and paste “Files” and “Site” Folder from your backup to Drupal installation directory.


• If other system files such as .htaccess or robots.txt were customized, re-create the modifications in the new versions of the files using the backups.

• Run update.php by visiting http://www.example.com/update.php (replace www.example.com with your Drupal installation's domain name and path).


• Replace all custom old modules to their latest version compatible with version 6.x

• Re-enable custom and contributed modules and re-run update.php to update custom and contributed database tables.


• Upload any new theme for your site and enable it.

• Now you have updated your Drupal 5.x website to Drupal 6.x . Now login to admin panel and set your website status to online mode.

Drupal and Twitter

Twitter module provides twitter notification for new posts. Each user can use their own twitter account to post updates too, as well as have a custom format string.

For more information on twitter, see http://twitter.com/.

Galleria

Galleria is a javascript image gallery written in jQuery. It loads the images one by one from an unordered list and displays thumbnails when each image is loaded. It will create thumbnails for you if you choose so, scaled or unscaled, centered and cropped inside a fixed thumbnail box defined by CSS.

For more information please visit http://devkick.com/lab/galleria

Saturday, October 25, 2008

FTP of drupal.org

We can directly download modules from drupal.org even if the site is off-line. Navigate to ftp link ftp://ftp.drupal.org/pub/drupal/files/projects.

Host name : ftp.drupal.org
User name : anonymous
Password : your email_address.


After providing these informations just browse to the directory /pub/drupal/files/projects to download the contributed modules.

Sunday, October 19, 2008

HTML Validator

There is an interesting addon from firefox for validating the HTML pages, HTML Validator is a Mozilla extension that adds HTML validation inside Firefox and Mozilla. The number of errors of a HTML page is seen on the form of an icon in the status bar when browsing.

The extension can validate the HTML sent by the server or the HTML in the memory (after Ajax execution)

Thursday, October 16, 2008

CSS/JS Aggregator bug

In drupal, CSS Aggregation works almost with compressing the files like cleaning
out white spaces (just like a zip program ).

To reduce the count of request CSS Files can be combined.This can break your theming if you have not followed good coding guide lines. Especially while commenting the files good standards needs to be followed. Namespaces should not be overlapped.

On the other hand we can disable the option 'Optimize javascript' files in 'Javascript Aggregation' settings so that invalid comments in js files are not taken in to account and js flow will not get screwed up.

Sunday, October 12, 2008

Free email tracking for web pages

SpyPig is a simple email tracking system that sends you a notification email as soon as the recipient opens and reads your message. We have to specify an email address which we will notify by email when your message has been read. They will provide an tracking image in which we need to embed with the message body. whenever the recipient opens the email you will be notified immediately.

Friday, October 10, 2008

Performance improvement guidelines for drupal sites

In most of the web pages, less than 20% of the total response time is used to retrieve the HTMl document. That means the other 80+% is used to process what's in the HTML file: CSS, JS, images, videos. And in many cases, that number is even higher.

In order to improve the performance on drupal sites, drive in to the following procedures. This includes both the server side caching and YSlow for Firebug recommendations.

Drupal Side

Ø Enable the CSS Aggregation and JS Aggregation from the drupal administrators settings (In drupal5 JS Aggregator is a separate module - http://drupal.org/project/javascript_aggregator).

o If js errors are encountered, disable the option ‘optimize js files’ from your drupal settings or make sure all the comments in the JS files are valid.

o After enabling the ‘CSS Aggregator’, if the theme gets messed up make sure that the CSS files are commented properly.

Ø Activate the memcache (http://www.danga.com/memcached/) by installing this service. Memcache is intended for use in speeding up dynamic web applications by alleviating database load.

o Install the drupal-memcache module in drupal5 as a module (http://drupal.org/project/memcache).

o After installing this module, add the following lines in settings.php

§ $conf = array(
'cache_inc' => './sites/all/modules/memcache/memcache.inc',
// or
// 'cache_inc' => './sites/all/modules/memcache/memcache.db.inc',
);

o This will override the default cache file (ie) cache_set() and cache_get() functional calls will get data from the memcache server and not in the drupal cache table. So number of db calls and query time will be reduced.

Ø If the information is retrieved from views, avoid the usage of calling views_view() for many times and store the output of the views in cache by using cache_set(). Clear the cache periodically based on the view type and avoids showing the static information.

Ø Enable the ‘page caching’ from drupal settings so that anonymous users will be benefited and re-construction of web page will be avoided.

Apache Side

Ø Add an expires headers for all the files types like CSS, Images etc.

o Changing the future date for the Expires headers is easy enough: simply edit your .htaccess file. Your Apache server must also have mod_expires installed; this is available by default on most servers.

Ø Add the gzip component so that web pages are written to the cache in GZIPped form.

o Following lines has to be written in .htaccess file for gzip

§ “AddOutputFilterByType DEFLATE text/css application/x-javascript”.

Ø An ETag uniquely identifies a file, and is used to verify if the file in the browser's cache matches the file on the server..

o Following lines has to be written in .htaccess file for disable etag

§ “FileEtag none”.

References :
1. http://wimleers.com/article/improving-drupals-page-loading-performance
2. http://video.yahoo.com/watch/1040890/3880720