This is the fourth in the series of Creating a Web Site using Drupal. Here are the earlier ones: First, Second and Third.
Unlike earlier, this post is all text and doesn’t contain a screencast.
Moving Drupal from sub directory to root
Since I have had enough of sNews, I finally thought it is time to move my Drupal installation from /drupal to /. It was as simple as connecting via FTP and moving all the content of /drupal directory one level up. I made sure that I didn’t have index.php or index.html residing at / before you move. I went through some forum posts at drupal.org on what else I should be doing and saw that some have advised to modify the value of $base_url in sites/default/settings.php. I noticed that it’s commented out in my case and hence didn’t modify it.
Setting up Google AdSense
I downloaded AdSense module from here to my local computer, extracted the contents and uploaded the adsense folder to modules directory of my host using FTP. Then I went to Administer->Site building -> Modules and enabled Profile module first since AdSense module depends on it. Then going to Site configuration -> Google AdSense will prompt the creation of a field which will contain my AdSense Publisher ID. I created that field, entered the Pub ID by going to My Account. Back to AdSense configuration and entered the color values for the ad under Group 1 Attributes of Ad groups. If I wanted to track the performance of this ad group, I would create a channel and enter that for Custom channel ID 1. To actually add the ads to my site, I went to Site building -> Blocks and selected the first unconfigured AdSense block and set its position to right. I clicked on configure to set the format (dimensions) of ad, then the Group and Channel it belongs to.
Setting up Forums
I activated the forum module that comes with Drupal at admin/build/modules. A entry by the name ’Forums’ will be created under Content Management. I added a container and named it ’Script Install 4 Free Discussions & Help’. I then created 3 forums and set each of their parent to be the container. Keep in mind that you control the order of appearance of these forums (which comes first) by settings their weight.
The default permissions for these forums are perfect. Anonymous users will be able to only view but not post.
Setting up Clean Search Engine Friendly URLs
Simpler URLs like http://www.scriptinstall4free.com/categories/cms are better than say, http://www.scriptinstall4free.com/taxonomy/term/5. This is possible using a module called pathauto. I initially downloaded dev version of it and had problems. Then uninstalled it and tried the regular version, pathauto-5.x-1.2 which works well. Config options for this module are at admin/settings/pathauto. It is advisable to not create index aliases (General settings section).
I set [vocab]/[catpath] pattern for Forum path settings, checked Bulk update forum paths and Create feed aliases. I entered the following for other path settings:
Node path settings: content/[title] <– this will result in story and page content type URLs like http://www.scriptinstall4free.com/content/moved-drupal-installation
Category path settings: [vocab]/[catpath] <- this will result in category URLs like http://www.scriptinstall4free.com/categories/forum-scripts/smf
User path settings: user/[user] <– this will result in URLs like http://www.scriptinstall4free.com/user/admin
checked Bulk update forum paths and Create feed aliases for all the above and clicked on Save configuration.
From this time on whenever you create any sort of content, the generated URLs will be based on the above pattern rules. The list of generated URL aliases can be found at admin/build/path. Here these can be edited or new ones manually added.
Setting up Forms
I installed webform module and set up a form that can be accessed at http://www.scriptinstall4free.com/form/request (only there for this tutorial purpose).
The problem with this module is that it doesn’t present an option to make the generated forms inaccessible to anonymous users. So I am not using it until I figure a solution to this.
This marks the end of this tutorial. Are you aware of any other useful Drupal modules? Do share with everyone by commenting below.
We hope you found this how-to helpful. Please social bookmark this tutorial and help us and others. Thanks in advance.


20 Jan 08
6:34 am
i have a problem on my search content in my site.. every time i tried to search a content it always says there are no results.. please help me.. ^^
20 Jan 08
8:58 am
David,
Did you enable Search module?
24 Jan 08
9:56 am
Yes i did, but still it doesnt work. please help me..^^
27 Jan 08
7:56 am
You need not just to enable the module. You also need to run a cron job to index your content.