Hacks and Hints TechieVarta

Icon

Another Techie Varta

Drupal: Impressions and Plugins

Readers of this site know that this site runs WordPress for theblogs. Today I want to talk about what I run for my web site. I use great Web Site management software called Drupal. Both WordPress and Drupal are similar in several aspects. Like WordPress, this software is written in PHP and can use MySql as the backend. Both the software are extensible using modules and have a wide variety of modules providing various extensions. Both software allow themes and have a wide variety of themes available.

However, there are several key differences. Drupal is full WebSite management software which also has a blog management feature. WordPress on the other hand is a blog only software and does a great job at it. I could have used Drupal for blog however, I found WordPress before I found Drupal and I was already running WordPress before I built my main site. I am extremely happy with WordPress and do not see a reason for change. I have not experimented with Drupal’s blog feature to know more.

To use Drupal, you should install several plugins.

Essential Drupal Plugins

Site Management Related Modules

  • Category: This software allows you to hierarchically structure your site in tree-like structure. It automatically builds menu as needed.
  • Path Auto: This module automatically creates your URL alias based on page titles and various rules. this can significantly increase search engine ranking.
  • Global Redirect: If path aliases are enabled, the pages on your site are generally accessible using two different paths: default Drupal path and alaised path. This module changes that such that the default Drupal URL results in sending a redirect to the aliased page rather then serving the page. This makes sure that your site is not unnecessarily put in sandbox by Google.

Search Engines Related Plugins

  • Google Analytic: This module provides support for Google Analytics
  • GSiteMap: This module provides on demand Google sitemap generation.

Content Creation Related Plugins

  • TinyMCE: This plugin brings in rich WYSIWYG editor inside Drupal for content creation.
  • Image: : This module allows users to manage Images inside Drupal.
  • Upload Image: This module allows users to upload images on the Drupal website.
  • Weather: I wanted to display weather on my Drupal site. I tried this module and found it to be not very useful. I eventually ended up creating a custom modules. After trying HTML code from Weather.Com and AccuWeather.com, I ended up using AccuWeather.com’s weather related HTML in my custom module.

What I did not like about Drupal?

The Drupal software menu system is non-intuitive. “Site-Building” what does that mean? Modules are enabled in “Site Building” and configured in “Site Configuration”. I wished there was a way to configure the modules as a button as soon as they were enabled. With software like Drupal, you land up with 10s of module. I wish there was a way to organize modules in categories.

The way user authorization is separated from actual module configuration is another thing I don’t like. It is nice that you can see authorization level at a single place, but equally nice will be a way to configure authorization level whenever a module is configured. I suggest that we provide a method to configure authorization both in module level and in user management section.

Drupal and WordPress on the same Site

The great advantage of Open Source Software is that the users have choice. I can run software from different sources and use their strongest parts to come up with a very useful end result. I and based on my reading from the web many others, believe that Drupal is great site management tool and WordPress blogging infrastructure is superior to that of Drupal’s . It is rather easy to run Drupal and WordPress on the same server however it is very difficult to run them in integrated fashion. It will be wonderful to develop a WordPress Module for Drupal and have WordPress site inherit Drupal’s theme or even have its own theme. But, that way they can share the same users.

Another area where the integration will be useful is in sitemap generation. It will be good if there was a way to have Drupal’s sitmap include WordPress sitemap. I had to do some php hacking to get that working.

Wordpress essential plugins

As the readers of this site know, I use WordPress as the blog management software. One of the great things about WordPress is its capability to use plugins. The WordPress websites includes 100s of plugins. This is the great thing about the open source software. It gives you choice. You editor tested several different plugins before came up to the list of plugins for this site and will like to share it with you. Here is the list:

  • Next Gen Gallery: If you are going to host several pics on your site, you need this plugin. It allows easy organization of your album and allows you to select one of the several effects for your pics.
  • WordPress Video Plugin: If you like including YouTube, Google video, etc. on your sites, you want this plugin, unless of course you want to start coding in HTML which I don’t necessarily enjoy.
  • Enhanced Links: The default presentation of links in WordPress is pathetic specially if you want any significant number of links on your site. This plugin makes job of managing links significant easier.
  • TinyMce Advanced: The visual editor for WordPress is called TinyMCE. This plugin enables several new toolbar buttons for your site.
  • WP Cache: As the name suggests, this plugin significantly improves performance of your WP site.
  • Google Sitemap Generator: This plugin generate sitemap.xml for your site and informs all major search engines about it.
  • All in one SEO Pack: This pack tries to optimize your site for major search engines.
  • Ultimate Google Analytics: This provides an easy way to use Google Analytics with WordPress sites.
  • WordPress.com Stats: This plugin provides another useful way to mine users of your site.

Wishlist

I wish there was a plugin which rewrote the URL to something clearer.  Something like clear url for Drupal.

Create a full featured web/blog host at your home: Part 2

Part 1

As promised here is the part 2 of the post.

Setting up Web Server

The next task is to setup your web server. There are several servers you can choose. My favorite is Apache. It comes bundled with most Linux distributions. You probably want to setup the apache server as a virtual host. To setup the virtual server, fire up your favorite editor to configure apache configuration and add something like the following:

<VirtualHost  *:80>
	DocumentRoot /srv/www/htdocs
	ServerName example.com
	ServerAdmin root@localhost
	<Directory /srv/www/htdocs>
		AllowOverride None
		Order allow,den
		Allow from all
	</Directory>
	CustomLog /var/log/apache2/example.log
</VirtualHost>

Restart apache by doing something like /etc/init.d/apache restart. If you took my earlier warning about security seriously, you would have firewall on your server blocking all accesses to your web server. Use your favorite firewall management tool for the server to open hole through server firewall. Suse’s yast makes this process relatively straightforward. I am sure other distributions have something similar.

Edit /etc/hosts on the web server machine and add a host entry for the web server’s IP address as your machine’s NATed IP address. This step is not absolutely essential but it makes life a lot simpler. Fire up firefox on the Linux machine and make sure you can access http://<your-machine’s name>/. If you try to access the same web page from another machine in your network, this is probably very slow. That is because the DNS is resolving your machine’s the hostname as external IP address of your NAT box and the packets are not directly going to your Linux machine. If you have this problem open /etc/hosts on Linux and c:\windows\system32\drivers\etc\hosts on Windows machine and add an entry with webhosts name and its NATed IP address. The entry will look something like:

 192.168.32.8    example.com

At this time you should be able to go to the newly configured host and access the web site. You are now ready to configure blog software.

Setting up Blog Software

Now it is time to setup you blog software. After evaluating several blog software, I decided to use WordPress. I will strongly recommend WordPress to nearly everyone trying to host their blog site. It is easy to administer. There is a very strong community out there. You can easily find plugin for almost anything you want to do. WordPress is based on PHP so make sure you have PHP installed before you start. WordPress also has dependency on MySql make sure you have MySql installed. The next step is to create MySql user.

To create the MySql user do the following:

>mysql -u root -p

Password: <enter mysql password>

mysql>create <db-name>

mysql>use <db-name>

mysql>GRANT ALL PRIVILEGES ON *.* TO

        '<user>'@'localhost' IDENTIFIED BY

        '<db-pass>' WITH GRANT OPTION;

Note down the db-user and db-pass entered in this process.

You are now ready to configure and install the WordPress. Download WordPress and unzip it at a place where your webserver can serve. In the wordpress home directory, there is a file wp-config-sample.php. Copy it to wp-config.php. Edit this file to provide DB name, DB username and DB password.

Fire your Web Browser and point it to the blog’s home directory. Follow on screen direction to complete the WordPress install. You are all set. Drop me a word if you have problem installing.

Happy blogging.

Next time essential WordPress plugins.

Create a full featured web/blog host at your home: Part 1

If you are wondering why will I want to do this. Just scroll down to the FAQ section.

WARNING: Running a server at home is always a security risk. So be careful.

The blog host setup will involve network setup, actual host setup, web server setup, and blog software setup.

Network Setup

You will need a good Internet connection. A cable or FIOS connection will offer good enough bandwidth for your site. In most cases the blog host will share the Internet connection with other machines. You will need a good NAT box. Linksys and Netgear both make lots of good affordable NAT boxes. Most Install the NAT box and connect your Linux machine to the NAT box. If you do not know how to configure NAT box, just Google for it or look at the NAT’s manual.

Next you will need a public hostname so that your friends can find you. I use DynDNS. They offer free web host name in 10s of domains. You may want to sign up with a service which is supported by your NAT box. Sign up with dynamic DNS provider and configure your NAT box with the DNS information. In most cases DNS takes immediate effect however in some cases DNS entries can take up to 72 hours to propagate through the network.

Open a command prompt and type > nslookup <your dns name>. If this resolves to the public IP address of your NAT box, you are all set with DNS configuration.

Web/Blog Host Configuration

For web/blog host you will need a reasonable machine. If you have an old reasonably powered P4 machine, that will be a good candidate. Install an Operating system on the machine. Linux is most suitable web host. It offers good mix security and performance. Unlike Windows most Linux distributions work on old machines lying in your closet. You can use any decent Linux distribution on this machine. I use OpenSuse. Since this machine will be externally accessible update any security patches. Also, configure rather restrictive iptables based firewall.

Next you will need to configure port forwarding on your NAT box. Logon on to your Linux machine and type “ip addr” to get IP the address assigned to your machine. Now logon to admin interface of the NAT box. Find the place where you can configure port forwarding. Configure it to forward port 80 to the IP address of your Linux machine.

In part 2 I will go over the details of Web Server and Blog software configuration.

FAQ

Why do you want to create a website at your home when there are so many other options?

Because I can. Because it is fun. Because I have full control over the software which runs the site. Because it serves my intellect.

Will this slow down your home network?
For most average users, it is not a big deal. Most cable service providers offer you enough bandwidth to run a reasonable site at home. If your site really gets busy and gets too much traffic, you may have to move site to ISP. But, at that time you can also become part of Adsense and earn some money. Most users will never reach that level of usage.

My Choice of Linux Distribution - OpenSuse 10.3 Review

As I was setting up my blog host I had a critical decision to take. Which OS? I have been using Linux for more then a decade now. I remember the days in India when I had to download 13 floppies of Slackware at 9.6Kbps to install Linux. I have used RHEL, Kubuntu, Fedora Core, Mandriva. But, since I was installing a new machine for this blog, I decided to experiment with OpenSuse which I had never used in past.

I must admit I am hooked. Following OpenSuse instructions I decided to perform a network installation. The installation procedure worked ok although it can use some improvements:

  1. I wish the installer tested a couple of mirrors and automatically selected the mirror to use
  2. I wish that the installer asked all the questions in advance and started the installatio rather then stopping during the installation process to ask the question. That way I could start installation process, go for a drive and come back to a brand new OpenSuse desktop

In most Linux and Windows machines finding the any program to run from Start menu has been a pain. The Suse menu system on the other hand is clean and nicely categorized. I like the multi-tab menu interface a lot.

At the top of it yast is great. I was able to find new packages easily (although package manager is slow to start), the firewall configuration is easy and intuitive. I tried configuration creating virtual host using the yast interface without much luck.

But even with its deficiency the OpenSuse is superior to Kubuntu, RHEL, and Mandrive. My next favorite is Ubuntu which I run on my laptop. That is for another day.

Running Multiple WordPress blogs on the same machine

My initial plan was to divide posts by categories and not create blog per category. But it quickly became clear that this option was rather limiting since my wife’s and my interest are very different and two of us have variety of interests of our own. WordPress by default allows only one WordPress blog per machine.

To create new blog we had to do the following:
- Move existing blog to a new location
- Create a new blog

To move existing blog to a new location, first I moved directory from base blogs directory to blogs/Random (new home for the blog) directory. When I retried logging on to the site, I was presented with logon screen without any graphics. I tried logon with success and click on options/general and configured new location for the blog. After submission everything works.

The next step was to create a new blog. I started by unzipping the WP code in the new location. There are two ways to create a new blog. Either you can create a new database (one per blog) or you can keep one database and create new table prefix. I decided to use a different table prefix for every blog. Based on what you decide edit wp-config.php to reflect the decision.

Follow usual installation process and you have created multiple blogs on the same site.

Now I have another Technology blog . Future WordPress related blogs go in there.
Good luck!

Free VOIP Calls to India

This entry was first posted on my Random thought blog . It is now extended and brought to more natural home.

At present I use Vonage phone in India to call between the India and the USA. I did not think Vonage’s price justified the use I have for the service.

I decided to experiment with other VOIP services. I bought a few unlocked VOIP phones. It was pain to find reasonably priced VOIP phones. Most VOIP phones are targeted towards business users and not home users. At last I ended up with SPA901. I bought it from BestBuy for Business.

I setup FWD and Gizmo for calling between the VOIP only phones. Using FWD I can call out to 411, 1-800 number etc for free. Also I can use Sip Broker to call from normal phone to my SIP phone.

The only thing I cannot do is to call from SPA901 to PSTN phones. For this purpose I subscribed to VoipCheap. VoipCheap service allows limited free calls to multiple destination.

SPA does not allow simultaneous service to multiple VOIP providers. I needed a method to use different service based on destination. Here comes Voxalot. It allows you to define call plan and use different service provider based on extension.

The VoipCheap service does not place any restriction on how many account a user can own. So you can keep signing up new accounts and configuring them at Voxalot as you run out of free credit at VoipCheap. You don’t need to make any changes to the SPA phone in India to activate new accounts @ VoipCheap. If you need call out service to Indian POTS phones. Go ahead and sign up with one of several reasonably priced VOIP service providers and configure appropriate dial plan at Voxalot.