کد:
http://articles.techrepublic.com.com/5100-10878_11-6134517.html
Takeaway: Building a dynamic Web site needn't be a chore of tedious programming. Using a tool like XOOPS, you can get a powerful site up and running without a lot of effort. Jack Wallen shows how it works.

This article is also available as a TechRepublic download.




Recently I wrote a series of articles on phpWebsite. For many years phpWebsite was my Web site tool of choice. But lately I have come across a tool that blows away any other Web site construction tools available. Not only is XOOPS powerful but the XOOPS community is taking its creation/development very seriously, with modules and themes by the hundreds.
This article will give you a solid understanding of what XOOPS is and how it is installed. Once up and running your site is only limited to your imagination and time available.
Understanding XOOPS

XOOPS (pronounced Zoops) is an acronym of eXtensible Object Oriented Portal System. Though started as a portal system, XOOPS is in fact striving steadily on the track of Content Management System. It can serve as a Web framework for use by small, medium and large sites as a content management or storefront. The key features of XOOPS are:

  • Database-driven: XOOPS uses a relational database (currently MySQL) to store data required for running a Web-based content management system.
  • Fully Modularized: Modules can be installed/uninstalled/activated/deactivated with a click using the XOOPS module administration system.
  • Personalization: Registered users can edit their profiles, select site themes, upload custom avatars, and much more!
  • User Management: The ability to search for users by various criteria, send email and private messages to users through a template-based messaging system.
  • Supported World-wide: XOOPS was created and is maintained by a team of several hard-working volunteers working from all over the world. The XOOPS community has more than dozen official support sites around the world for support of non-English speaking users.
  • Multi-byte Language Support: Fully supports multi-byte languages, including Japanese, Simplified and Traditional Chinese, Korean, etc.
  • Versatile Group Permissions System: Powerful and user-friendly permissions system which enables administrators to set permissions by group.
  • Theme-based skinnable interface: XOOPS is driven by a powerful theme system. Both admins and users can change the look of the entire Web site with just a click of a mouse. There are also over 60 themes available for download!!

Installing XOOPS

First, you should make sure that your system meets the minimum system requirements. XOOPS will require of you the following:

  • WWW Server (Apache, IIS, Roxen, etc)
  • PHP 4.0.5 and higher (4.1.1 or higher recommended)
  • MySQL Database 3.23.XXI am going to be installing XOOPS in the Apache environment.

Installing XOOPS is as nearly straightforward as you can get. The only hitch in the system is the directory structure created after the unpacking of the tar (or zip) file. But I get ahead of myself.
The very first thing to do, obviously, is to download the proper file. Hop on over to the XOOPS download page and snag the current release in whatever package format you prefer. I prefer the tar.gz format.
Once you have that file you'll need to upload that file to your Website server. Now, before you get to excited and start unpacking, I would recommend you create your database for the site first. I prefer using phpMyAdmin because of its ease and reliability.
With the database created it's time to start dealing with directory structure.
When you unpack the xoops-release_number.tar.gz (where release_number is the actual release number) file you will have a main directory, xoops-release_number and the following sub-directories and files: docs, htdocs, release_notes.txt, upgrade, xoops.md5, xoops_md5.php. The main subdirectory is the htdocs directory. This is where the bulk of the site resides but not where you want it to remain (unless you don't mind having your users pointing their browsers to http://www.yourdomain.com/xoops-release_number/htdoc/). In order to change these subdirectories, you should move them to the document root of the Web server. So from within the xoops-release_number move every file and subdirectory into the document root (in Apache /var/www/html/).
Once you have all of the files in place you need to change the permissions of certain files and directories. Specifically:

  • The uploads/ directory must be made writable. This is done with the command chmod o+w uploads.
  • The cache/ directory must be made writable. This is done with the command chmod o+w cache.
  • The templates_c/ directory must be made writable. This is done with the command chmod o+w templates_c/.
  • The file mainfile.php must be made writable. This is done with the command chmod o+w mainfile.php.

With the proper permissions in place it's time to fire up your browser and begin the installation. Load up the page http://www.yourdomain_or_ip/install/ and you will be greeted by the installation screen as seen in Figure A. Select your language and click Next.
Figure A

You'll see the installation screen first. The next screen, Figure B is an information-only screen that tells you what XOOPS is and what is required. Click Next.
Figure B

This screen describes system requirements. If you have run the above commands (for permissions) correctly, your next screen should look like that in Figure C. If not, check the permissions as indicated above. Once you are given all green lights, click Next.
Figure C

If everything installs fine, you'll see this screen. The next screen, Figure D, requires information regarding the database created for the site, as well as location of the directories. I have blurred out my personal information for security's sake. With all of this information correctly entered, click Next to move on.
Figure D

Enter information about databases and directories on this page. The next screen, Figure E, is a warning page that tells you exactly what you must do to continue. This shows how well thought out the XOOPS tool is. What you are required to do at this point is remove the install directory and change the permissions of the mainfile.php file for the sake of security.
Figure E

Read the warning page carefully. The commands necessary are:
rm -rf install
and
chmod 444 mainfile.php
Once that is done you must click through a few more screens to verify if the information given is correct and finally allow the XOOPS installation system to create the tables on the database. Once all of this is finished an administrator for the site must be created. Do this and finally you will be sent to your installed site. Log in as the administrator. Once logged on you will find yourself on a bare-minimum Web site ready for modules and configuration, as seen in Figure F.
Figure F

When you're done you'll have a site that's set and ready to go. Modules, modules everywhere

While logged on as the administrator an Administration Menu is available. Click on that to see the administration button. When the System Admin button is clicked the various administration tools are revealed. You should see something similar to Figure G.
Figure G

Here's the Administrator Menu. From here you can see the Modules tool. If you click on that link a list of installed modules will be revealed. The only module currently installed is the System Admin module. Bare bones eh? For this article I am going to grab the Word Press module and install it. All XOOPS modules can be found in the module repository from the main XOOPS site.
Grab the WordPress module and move it into the /var/www/html/modules directory. Once the module is located in the proper directory unpack the file and then go back to the browser and click on the Modules link within the System Admin tool.
Once this new page opens you'll see something like that in Figure H . NOTE: In Figure H the effect of mouse hovering over the System Admin button is also revealed. Nice touch.
Figure H

When you add a module, it will appear in the System Admin tool. To install the newly located WordPress module simply click the icon (looks like a floppy disk trying insert itself into a computer) under the Action heading and then click Install when prompted. Now, within the System Admin tool, there will be two module buttons on the left, as seen in Figure I, and two modules listed as installed.
Figure I

The modules will appear after being installed. All modules are installed in this same manner.
Configuring the XOOPS site

When you click on the System Admin tool you will remember there were a number of possible configurations to deal with. When you first get your XOOPS site up and running there are a couple of items you will want to pay close attention to. The first is the Preferences configuration.
Click on the Preferences link and a new window will open revealing the following items:

  • General Settings
  • User Info Settings
  • Meta Tags and Footer
  • Word Censoring Options
  • Search Options
  • Mail Setup
  • Authentication Options

The first item to visit is the General Settings link. With the exception of one, these settings are self-explanatory. The one setting that's a bit vague is the Use gzip compression. This setting allows (if your host is configured to do so) your pages to be compressed with the gzip format. With this setting enabled, files appear faster on browser. NOTE: With this setting enabled, your server will take a slight performance hit. So if performance is critical to your server, do NOT enable gzip compression.
The next setting to visit is the User Info Settings. Here the XOOPS site can be enabled to allow new users to register, minimum password requirements, and a wide variety of user configurations. This is very important when you want to create a community-based Web site.
In the creation of a community-based site, the Mail Setup configuration will be another critical feature. Users will want to send private messages to one another. And the admin will want to send messages to the users. To do this you will have to set up the mail system. Most of these configurations are straightforward. Some, however, are not. One such configuration is the Mail Delivery Method. Here you can configure the XOOPS site to use the PHP mail() function, sendmail, SMTP, or SMTPauth. The PHP mail() function should work fine in many instances (it is the default after all).
But there may be setups that will require the use of another type. Say for example you want all messages to come from you business domain and no other. In that case you will have to configure your XOOPS site to use the method that will connect to your company's mail server. This configuration will depend upon how your company is set up for email use.
Obviously, on a public site, Word Censoring Options will be necessary. Setting this up will keep users from posting profanity or other derogatory words (of your choosing) on the site. Make sure you enable this and then list all words (separated by the | character). NOTE: This feature IS case sensitive, so use all variations of these words possible.
Another key feature is Authentication. From the Authentication configuration you can set up your XOOPS site to connect to an LDAP server for its authentication. Very nice.
Finally it will be very important to stop by the Meta Tags and Footer configuration. Here you will insert all the necessary meta tags that search engines will use to find your site. Take the needed time to do this. One other nice feature is the footer configuration. With XOOPS there is no need to hack into a resource file to configure the footer of your site. And the same goes with the copyright notice. It's all browser configurable. Sweet.
Blocks

The blocks configuration is where each individual site block can be edited, positioned, given weight, made visible or hidden, created, or deleted. What's nice about this feature (besides the ultimate control over the look of the site) is that the creators have included the ability to use PHP Script in the creation of new blocks. When creating a PHP Script block simply add the script and select the PHP Script from the type drop down list.
WARNING: I have found, using FireFox 2, that the Site Image Manager tool opens a popup. If you have popup blocking enabled the manager tool will resize your browser (and all its tabs) to the point of being unusable. HOWEVER, it doesn't resize the actual browser, instead it resizes the windows within the browser with no means to get them back. The real problem is that even if you allow popups the browser still resizes. So this is a bug and not a "feature". This isn't a problem in either Internet Explorer or Opera. But for some reason, FireFox is having fits with this popup window. This problem is currently only occurring on FireFox 2 for Linux. FireFox on both the Mac and Windows platform do not seem to be effected by this bug.
There is a solution to these problems. In the Preferences screen go to Tabbed Browsing and take a look at the Javascript Popups selection. If you configure the Load These Popups Into Existing Windows to Unresized Popups, the problem magically goes away.
User ranks

I have to confess that I'm not sure why they have included this configuration in the standard System Admin module. It seems to me this configuration belongs in the bulletin board module. But users do have the ability to make comments on various block within the site. Because of this the creators of XOOPS seem to think they should earn rankings as they post more and more comments. My personal take on this is that it belongs within a specific module (bulletin board). You can add new ranks and edit current ranks within this feature as well.
Final thoughts

XOOPS has to be one of the most powerful dynamic Website creation tools available not only from within the open source community but as well as from any proprietary company. With a huge repository of modules and themes available, XOOPS will easily handle your company's needs





موضوعات مشابه: