Extra! Extra! Creating a school newspaper website

Last modified: May 19, 2009 - 12:27

This tutorial shows you how to create a school newspaper website in Drupal. The tutorial was created as part of the GHOP contest.

It is assumed that you have Drupal 5.x or higher installed.

This figure shows a Drupal website after installation.

Configuring the site

To begin, we’re going to set up the site to match the newspaper information. This can be accessed in Administer > Site configuration > Site information. For example purposes, we’ll call this newspaper "The Gator Gazette."

Don’t change the Default front page field unless you know what you’re doing. Enter your information and click Save Configuration.

Users and Roles

To allow others working on the paper to post their content, we’ll set up users and roles. Roles control what different types of users can do. First, we’ll set up roles. Go to Administer > User Management > Roles.

The two we’re going to add in this example will be editors and contributors. Type in what you want to name the role in the text box and click Add Role. Repeat this for any roles you want to add. Don’t create roles for individual people, but for groups.

After you’ve added your roles, it’s time to set what they can do. Click edit permissions to the right of the role you want to edit. In our example, editors have full control. Contributors can create page and story content, and edit their own content. You can modify these to fit your needs.

Now we’ll set up users. Go to Administer > User Management > Users.

Click Add user and enter the user information. User names should follow a common format, such as jsmith (first initial and last name), john.smith (first name and last name), or smithja (last name, first initial, and middle initial). This will help prevent confusion. Make sure to make the password complicated. Check the roles you want. In our example, the jsmith user is a contributor. When you’re finished, click Create new account.

Repeat this process for all users you want to add.

Modules

Now we’re going to enable the Drupal modules we want to use later. Go to Administer > Site Building > Modules. The ones we need enabled will be shown in the table below. All the others we need should be enabled by default.

Name Description
Path Allows users to rename URLs, such as changing http://www.example.com/taxonomy/term/1 to http://www.example.com/schoolnews. This helps users use the site better.
Poll Allows users to vote on an issue.
Search Allows users to search the site.
Upload Allows users to upload files, such as pictures, to the site.

Taxonomy

Taxonomy is a really amazing feature that allows you to categorize content and then organize it later. This helps create defined sections for your site, such as Sports or Drama. To start using it, go to Administer > Content Management > Categories. Then click Add Vocabulary.

This vocabulary will be called Article Categories. Enter the name, and if you like, a description and help text. Then check Story, because that’s what we’ll be categorizing. Once you’ve done that, click Submit.

After the vocabulary has been added, click the add terms link, which is next to the name of the vocabulary you just added.

In the term name field, enter the name of the section of news. In our example, we added Academics, Drama, Editorials, Events, School News, and Sports. These are the sections of the newspaper. After this has been done, it’s time to add content.

Adding content

Click Create content > Story on the left navigation bar.

Type in the title of the story and the category you would like to place it in. Then enter the story content. Under the box for entering the story, there’s a link that says Input Format. Click it to expand a menu. Then click the button next to Full HTML. That will allow the code at the top of the article to work.

But what does that code mean?

<img src="files/mathboard.gif" width=”150” align="right" />
<cite>By Danielle Williams</cite>

This is the code to insert an image, followed by the code to format a byline. The syntax:
<img src="path/to/image.jpg" width="width-of-the-photo" />
<cite>Author Name</cite>

But before you can use this code, you have to upload a picture. To do that, Click on File attachments, lower on the page. Click on Browse and find the image you want to upload. Then click Attach.

After you click Attach, it may take awhile to upload the image to the Internet. After it’s finished, it should look like the following:

The small gray text under the file name shows the location of the file. Copy and paste that into the code. It’s recommended that you keep the width of the image the same, and also the align="right" value.

After you’re finished, click Submit.

And that’s your finished article!

Themes/Layout

Now, we need to change the site to an appealing design and layout. Go to Administer > Site Building > Themes. A good 3-column layout is Chameleon. Check Enabled and click Default next to the theme. Then click Save Configuration.

Your site now has a different theme. Now, we can set up the layout. Go to Administer > Site Building > Blocks. To begin, we’re going to create a few blocks.

The first block we’re going to make is a local weather block. In this example, we use AccuWeather (http://www.accuweather.com). The website gives us code to put into our website. We click Add Block at the top of the Block page and paste the code into the content box. Give the block the description "Local Weather".

In the Input Format box make sure to check Full HTML. Then click Save Block.

The next block we’re going to create is Contact Information. We enter the school information and then save the block.

After you save that block, it will come back to the list. Organize the modules how you like, putting some in the right sidebar. Our site is finished.

Adding a poll

If you want to add a poll, go to Create Content > Poll. Enter your poll information. The poll will now show up on the front page and in the Poll block, wherever you put it on the page.

If you don’t want the poll to show up on the front page like a story does, when you create the poll go to Publishing Options and un-check Promoted to front page.

 
 

Drupal is a registered trademark of Dries Buytaert.