Advertisment

Manage Online Content

author-image
PCQ Bureau
New Update

Coming up with a pretty looking website is not a bigger deal than maintaining it. Especially when the website is showcasing frequently changing content-news, latest instructions, articles and so on. Time to go online with a content management system in place. 

Advertisment

PCQLinux 2005 bundles a popular and open source content management system called Drupal, to get you started. Let's get right into setting it up and playing

around with it. 

Install Drupal





Install the RPM named MySQL-shared-compat-4.0.23-0.i386.rpm, php-4.3.9-3.i386.rpm and php-mysql-4.3.9-3.i386.rpm found in the directory PCQLinux/rpms on CD 1 of PCQLinux 2005. Install the RPM named drupal-4.5-1.i386.rpm found in the directory PCQLinux/RPMS on CD 3 of PCQLinux. 



Besides these RPMs, you will also need to install MySQL database server. Refer to the MySQL section in the article 'Connect your Java web application to various Databases' to install and set up
MySQL. 

We need to create a database named drupal (say) in MySQL. Create the database by issuing the following:

Advertisment

mysqladmin -u root -p create drupal

Change to the directory /var/www/html/drupal/database and issue the following:

mysql -u root -p drupal < database.mysql 

Advertisment

When prompted issue the password for the MySQL's root user. Open the file named conf.php found in the directory /var/www/html/drupal/includes in a text editor. Change the value for the variable $db_url so that it looks as follows:

$db_url = "mysql://root:passwd@localhost/drupal"; 

In the above substitute passwd with the password that you had set for MySQL root user. To get a glimpse of Drupal, key in the following URL in the Web browser:

Advertisment

http:///drupal/

You will be greeted by the login page of Drupal. Click on the hyperlink 'Create the first account'. Fill in a username (say admin) and email address (say

admin@cybermedia.co.in) and click on 'Create new account'. 

Note down the password (which will be also mailed to the e-mail address you specified) shown on the subsequent page and click on the Log in button. This will log you in as the administrator who will have total control over the Content Management System (CMS). 

Advertisment

Start customizing your website





Click on administer>users>add to add a new non administrative user to the system. Fill in the username (say shekhar), e-mail and password and click on Create Account. Next we will start customizing the site as administrator and then to view the customized site we will log in as a non-administrative user to play around the customized site. 

Next, click on administer>settings and fill in the name of your website, and optionally, the e-mail address, mission statement and slogan. 



With Drupal, you can select from amongst a few themes for your website. For this click on Administer>Themes. From amongst the four listed theme, select Enabled and Default besides your preferred theme. Click on the Configure button, besides the selected theme and here you can specify a logo for your website. 

Publish content





While still as logged in as admin user, click on create content>page. Fill in the title and body. Note that you can use HTML tags as well as embed PHP code for any dynamic content (say to retrieve the contents from a database). Click on Log Out and login as user shekhar. And voila, you will be able to see the content submitted on the front page. But the most noteworthy feature is to post comment to this content. Get ready for some feedbacks from the audience of the Web page. 

Advertisment

Add more Jazz





Adding a page or a story is the minimal feature provided by Drupal. Log in as admin and click on the administrator link, which will reveal a plethora of features that you can add to your website-blocks, polls and forums, to name a few. Blocks are the boxes that you usually see on the top, left, right or bottom of a website that may contain breaking news, navigation, login box etc. To create a box, click on administer>blocks. To create a new block click on add. Fill in a title for the block, block's body and a brief description (say block 1) about the box. Once the content has been added, next we have to specify the placement of the block. For this, click on list under Blocks. Against 'block 1', click on Enabled, For the block's width, select 5. For Region, select left. And the block will start showing up on the left side of your website.

Add a poll





Click on administer>modules and click on Enabled for poll. Next, click on create content>poll. Enter a title for the poll, for example, 'which operating system do you use at work'. For Choice 1,2 and 3, type in MS Windows, Linux and Mac respectively. You can specify a 'Poll duration' for the time for which the poll will be active. Click on submit. The poll gets posted on the main page. 

We leave u here to explore Drupal-a simple yet feature rich content management system - further.

Advertisment