Feature
News
1/24/2005
02:02 PM
Connect Directly
RSS
E-Mail
50%
50%

Pennies For Your Thoughts - Part Two

Put the perfect front door--a portal server--on your low-cost online community system, using open-source software and bargain-basement hardware. Part Two of a two-part series.

In Part 1 of this recipe, I showed you how to configure a LAMP (Linux, Apache, MySQL, PHP) server intended for use as a community portal, and to install a discussion forum. Now, in Part 2, we will add a content portal, creating a clearinghouse for news, blog-style updates, and document stores.

Any server capable of running LAMP applications can be built into a complete community discussion, and information hub in just a few hours -- and with completely free software. Both the forum and portal offer rich opportunities to customize features. Their template systems can be used to push the look-and-feel of your client's brand. More important, they provide a reliable and accessible place for customers and employees to hear and be heard.

For this part of the Recipe, I will assume that you have already built the server platform described in Part 1. (If you haven't built it, please see Part 1 for details.) Assuming you have the server platform ready, you need only one new component:

Content Management System: Also referred to as "portal software," the CMS provides a Web-based storehouse of information. This storehouse can be easily catalogued without programming knowledge and browsed by a large viewing audience. For this Recipe, I used Mambo, a popular CMS available as open-source software. Mambo's design is highly modular, meaning that content elements -- such as a particular type of link list or news feed -- can be designed once, then applied to many pages.

Also, this part of the Recipe, like Part 1, is best done with two systems on hand. Now that you have everything you need, let's dig in.

Building a Portal Server in 25 Easy Steps

1. Go to mamboserver.com and download the latest supported version of Mambo. At the time of this writing, that is Stable Release 4.5.1a. Save MamboV4.5.1a-Stable.tar.gz to the home directory on your Linux server.

Mambo is arguably the best, most feature-filled of the free portal systems; here's a look at its Admin screen:

To view this picture, click here.

To install Mambo, you must extract the software on a machine running Apache, PHP and MySQL. Here's a shot of the Extract screen:

To view this picture, click here.

2. Open a file browser window by clicking Computer / Home, and then browse to the public_html directory. Right click in the window, and select Create Folder. Call the folder "portal."

3. You must ensure that the portal directory is world-executable, just as you did with the forum directories in Part 1 of this Recipe. To do this, in the Home directory window, click to public_html, and then right-click the portal folder. Select Properties, Permissions tab, and ensure that Others: Execute is checked on. The "Number view:" should read 755. (You will change this after the Mambo software is extracted, but for now, you want it to be 755.)

4. Browse back to the home directory, and double-click MamboV4.5.1a-Stable.tar.gz . In the window that pops up, click the Extract button. Next, click to browse to the public_html/portal directory, then click the Extract button. The Mambo source files will be placed in the portal directory.

5. Now it's time to adjust some file permissions; this will ensure that Mambo can properly install.

Open a terminal window in Applications / System Tools / Terminal, and use cd public_html to reach the proper directory. Next, type: chmod 777 portal to temporarily make the main portal directory open to all access. This will ensure that the portal can create new files during the installation.

Now enter cd portal. Next, enter this series of commands to make necessary files fully accessible:

chmod - R 777 administrator

chmod - R 777 images

chmod - R 777 mambots

chmod 777 cache

chmod 777 components

chmod 777 language

chmod 777 media

chmod 777 modules

chmod 777 templates

6. Just as you did to configure the forum in Part 1, you will now use a second computer on the LAN to drive the installation. This will test whether your server software is visible to the outside world.

Using the second machine, open a browser window and browse to the public_html/portal directory. (In our recipe this is http://192.168.20.10/%7Eintranet/public_html/portal)

7. The pre-installation check for Mambo should appear, with all setup items green. This means that the Web server has the proper access to create new files for the Mambo portal. If any items are listed as "Unwriteable," it typically means you missed a step in the permission-setting sequence above. Repeat the chmod command for the item or items listed in red text.

Here's a look at the pre-installation check, which verifies that the server is capable of running Mambo, and that file permissions are set correctly:

To view this picture, click here.

8. Click Next to proceed. In this step, you will accept the GNU License governing Mambo. Check the box, then click Next.

9. In this step, Mambo will set up its database resources. You can use the same database defined for the forum to store your portal information as well. In higher-security environments where the portal and the forum administrator will not be one and the same, return to Steps 12 and 13 of Part 1 of this recipe to create a new MySQL database, username, and password. For this part of the Recipe, you will combine the portal and forum into one database.

First, enter localhost for the host name, username smf_user for the database login name, password for the database password, and smf_forum for the database name. Keep the mos_ table prefix the same; it will help distinguish between the application data stored in the MySQL database.

Next, uncheck Backup Tables, and check Install Sample Data. Then click Next to continue.

This next screen shot shows Step 1 of Mambo's MySQL database configuration:

To view this picture, click here.

10. After the server processes the request -- this may take 15 seconds or more, depending on the speed of your server -- the Mambo installer will ask for a site name. For this recipe, I used Techbuilder Community Portal. Enter it, then click Next to proceed.

11. Create a portal administrator account by assigning a contact e-mail and administration password. The username will always be "admin." Click Next to continue.

12. The final installation step displays the administration username and password, and reminds you to delete the installation directory for security purposes. Do that now by browsing to the public_html/portal directory, clicking on the installation folder, and pressing the Del key. Then right-click the trash can in the lower-right hand of the screen and select Empty Trash.

13. Now you should tighten the permissions on the portal directories. Open a terminal window in Applications / System Tools / Terminal, and use cd public_html to reach the proper directory.

Issue chmod 755 portal to restore the portal to the standard access level for public Web sites.

Next, do cd portal and enter the following series of commands to re-protect certain files and directories:

chmod - 6R 755 administrator

chmod -R 777 administrator/backups

chmod -R 777 administrator/components

chmod - R 755 editor

chmod - R 755 cache

chmod - R 755 mambots

chmod - R 755 help

chmod - R 755 includes

chmod 644 configuration.php

chmod 777 templates

14. To begin configuring the site, click the Administration button on the setup screen, then enter admin for the username and the administration password configured in step 11. In the future, the administration panel can be accessed at any time by browsing to the portal/administrator directory. In our recipe, this location is http://192.168.20.5/%7Eintranet/portal/administrator.

15. Three standard templates ship with Mambo. We will use the most basic one.

While logged in to the Mambo administration panel, select Site / Template Manager / Site Templates from the top menu. Select the button next to JavaBean, and click the button labeled Default across the top of the screen. This makes the JavaBean theme the default view for the portal's content.

Mambo's template system allows you to create data elements which can be employed in different look-and-feel layouts, depending on user or administrator preference. Here's a look at the Installed Site Templates admin screen:

To view this picture, click here.

16. Check the appearance of the portal by opening a new browser window and viewing the portal main page. For our recipe, this URL is http://192.168.20.5/%7Eintranet/portal . You should see a screen similar to the one below.

To view this picture, click here.

17. The Mambo administration controls provide extremely fine levels of detail, and if you plan to create a highly customized interface, they merit further study. Here's a shot of the Mambo admin panel:

To view this picture, click here.

Here are two basic tips for navigating the interface and enabling and disabling portal content items:

* When using the Web interface to create any sort of document or entry on the portal, avoid the use of the Back button. Any screen that allows you to edit and save text will have Save and Cancel buttons in the upper right corner. Use those instead.

* A red X signifies that a module is not published or not active, while a green checkmark indicates that it is active or in use. Clicking directly on the X or checkmark symbol will toggle the active status of the item.

18. To create a new poll for the portal page, select Components / Polls and click New. Use the Lag setting to define how long users must wait until they can vote in the poll a second time. Set this to a high number if you want to leave polls up for a long time and enforce a one-vote-per-person rule. Or, to restrict the poll to appear only on certain pages, use CTRL-and-left-click to highlight just those menu components that should carry the poll. To display the poll on all portal screens, click All. Then click Save.

Here's a shot of Mambo's Add Poll form. Note that multiple polls can be shown on a page, and that each page can show multiple polls.

To view this picture, click here.

19. Once a poll is saved, it must be published before it can be displayed to users. To do so, click the red X under the Published column. To disable the default poll, click its Published icon to switch it off.

20. Admin access lets you change any aspect of the site, either from the administration panel or by logging in using the Login Form on the portal's main page. However, most day-to-day content adding and editing should be done in the front-end, using a designated publisher. Publishers have access to all content on the front end, but cannot use the administration panel.

Create a publisher account by selecting Site / User Manager in the administration panel. Click New. Fill out the personal details of the publisher, and assign them to the Publisher group. Then activate this user account by clicking Save.

This next shot shows a publisher being added to Mambo:

To view this picture, click here.

21. News is one of the most important functions of a portal front page. You can create news items from the portal front-page interface.

To do so, first log in to the publisher account on the portal front page. Then click News in the Main Menu. Click Latest News to access the proper news category (by default, the only news category). Finally, to begin creating a new entry, click New at the bottom of the news list.

22. Let's publish a text item. Doing so in Mambo is similar to working with an HTML editor. But there are a couple of key differences.

Although it is possible to use standard HTML coding to include in-line images in Mambo, you'll find it much easier and more powerful to use a special Mambo coding tag. This tag, %7Bmosimage%7D -- Mambo uses curly braces for its internal codes. -- tells Mambo to insert an item from a list of images, defined in a special tab on the editor screen. Each time the browser sees %7BBmosimage%7D, it moves down the list of images and selects the next. This means you can easily change art in a news story without having to touch HTML code.

Here's how: First, start the news item with a Title, which will serve as the headline. Next, select Latest News under Category. If you want the entire news item displayed on the front page, place all of the text in the Intro Text window. If the story is lengthy and you want to take readers to a separate screen for the full text, place just the introductory sentences or paragraphs in the Intro Text window; then place the rest of the story in the Main Text window. Note that proper HTML should be used for line-breaks and paragraphs.

23. Now let's assign images to the story. First, scroll down in the editing window until you see the Images tab. The media library is displayed, with all of the images available to Mambo. To add an image to the story, click the image in the gallery list. Then select Insert. This adds the image to the roster of pictures for this story.

To assign formatting -- such as right-justify or an alternate, non-graphics text tag -- click on the image name in the Content Images list. Then select the desired values for Alt Text and Align. Be sure to click Apply when finished with each image. Also, remember to add one instance of %7Bmosimage%7D per Content Image to the text of the news story, or the image will not display. To populate the portal with additional graphics, place files in JPEG or GIF format in the portal/images/stories directory; this will make them available in the Images tab.

Here's a view of the Mambo story editor:

To view this picture, click here.

24. When the news story is ready for prime time, click the Publishing tab, change State to Published, and click Show on Front Page. Click the Save icon (floppy disk) to complete the story.

If you want to time-delay the story, click on the Start Publishing button and move the date to the future. (This feature allows content managers and publishers to load several stories at once while spreading their release over several days.) Then click the Save icon as above.

Here's a view of our Newsflash screen:

To view this picture, click here.

25. Verify that the news item is properly published. To do this, click the Logout button in the lower left section of the Mambo screen. Then click Home to return to the portal home page. If all has gone according to plan, a news item will be visible on the front page. If not, log in to the editing account again and click the pad-and-paper editing icon to return to the story editor. Verify that the story is set to be Published, and at a date in the past, not in the future.


This is Part 2 of a two-part Recipe. Part One explains how to configure a basic Linux, Apache, MySQL, and PHP (LAMP) platform machine, and then install a discussion forum.

Author JASON COMPTON is a technology writer who has covered topics ranging from 8-bit entertainment to supercomputing for more than a decade. He wishes to thank bob2 (Rob Weir) on #ubuntu for assistance with this article.

Comment  | 
Print  | 
More Insights
The Business of Going Digital
The Business of Going Digital
Digital business isn't about changing code; it's about changing what legacy sales, distribution, customer service, and product groups do in the new digital age. It's about bringing big data analytics, mobile, social, marketing automation, cloud computing, and the app economy together to launch new products and services. We're seeing new titles in this digital revolution, new responsibilities, new business models, and major shifts in technology spending.
Register for InformationWeek Newsletters
White Papers
Current Issue
InformationWeek Tech Digest - September 10, 2014
A high-scale relational database? NoSQL database? Hadoop? Event-processing technology? When it comes to big data, one size doesn't fit all. Here's how to decide.
Flash Poll
Video
Slideshows
Twitter Feed
InformationWeek Radio
Sponsored Live Streaming Video
Everything You've Been Told About Mobility Is Wrong
Attend this video symposium with Sean Wisdom, Global Director of Mobility Solutions, and learn about how you can harness powerful new products to mobilize your business potential.