Part III: Working with Components, Modules, and Plugins 400 Related Articles The Related Articles module displays a list of links to articles that are considered to be related to the article the user is viewing. The front-end output of the Related Articles module is shown in Figure 17.30. The criteria for selection of Related Articles is keyword matching, and is based upon the key- word tags associated with the articles. To employ this feature, articles must be tagged with keywords. Cross-Reference Tagging articles is discussed in Chapter 5. The default system with the sample data installed includes a Related Articles module. The module, however, is neither published nor assigned to any pages. The module is named Related Items. Note The system name for this module type is mod_related_items. The Parameters section is divided into two sections: Module parameters and Advanced parameters, as shown in Figure 17.31. FIGURE 17.30 The front-end output of the Related Articles module. Related Articles module Chapter 17: Working with the Site Modules 401 FIGURE 17.31 The Related Articles module, as it appears in the admin system. The Module parameters section contains two controls: l Show Date: Set this option to Show if you wish to display in the list of articles the date of publication along with article names. The default setting is Hide. l Module Class Suffix: This field allows you to specify a suffix that will be automatically appended to all CSS styles that affect this module. The use of a specified suffix makes it possible for you to style this module individually. The Advanced parameters section contains caching options: l Caching: This control allows you to exempt a specific module from the site’s caching, as set in the Global Configuration. Select the option No Caching to prevent the contents of this module from being cached. The default setting is Use Global. Part III: Working with Components, Modules, and Plugins 402 l Cache Time: The time, in minutes, you want the contents to be cached. Enter an integer value here. The default value is 900 minutes, meaning that after 900 minutes the system will re-create, or refresh this module. Note this control is only meaningful if the caching for the module is enabled. To add a Related Articles module to your site, follow these steps: 1. Log in to the admin system of your site. 2. Access the Module Manager. To do so, go to the Extensions menu and select the Module Manager option. The Module Manager loads in your browser. 3. Click the New icon on the toolbar at the top of the Module Manager. The New Module dialogue opens. Refer to Figure 17.2. 4. Select the option Related Articles, and then click the Next button. The Related Articles Module dialogue loads in your browser. 5. In the Title field, type a name for the module. This field is required. 6. Set the Enabled option to Yes. 7. Set the Position control to assign the module to a position on the page. 8. Set the Menu Assignment to specify the pages upon which the module will appear. 9. Select any additional options or parameters you wish; all other fields are optional. 10. Click the Save icon on the toolbar at the top right to save your new module. The sys- tem creates the module, closes the dialogue, and returns you to the Module Manager. Tip To get the most out of the Related Articles module, you need to not only tag your articles, but you need to tag them consistently and accurately. The key to getting good results with this module is solely determined by the integrity of the underlying tag schema. Search The Search module makes it possible for you to place a site search box on any page inside of a module position. Site indexing is handled automatically and all you need to do is enable and pub- lish this module to allow visitors to search the site with ease. There are few configuration options; all parameters related to this module are focused on the appearance of the search form. Chapter 17: Working with the Site Modules 403 The default system includes a Search module. The module, named simply Search, is published on all pages and assigned the module position named user4, as shown in Figure 17.32. Note The system name for this module type is mod_search. The Parameters section is divided into two sections: Module parameters and Advanced parameters, as shown in Figure 17.33. FIGURE 17.32 The front-end output of the Search module in the default Joomla! system. The module is shown here in the user4 position of the default template. Search module Part III: Working with Components, Modules, and Plugins 404 FIGURE 17.33 The Search module parameters. The Module parameters section contains two controls: l Module Class Suffix: This field allows you to specify a suffix that will be automatically appended to all CSS styles that affect this module. The use of a specified suffix makes it possible for you to style this module individually. l Box width: Enter an integer value here to set the width of the text field for the search form. l Text: Enter text here to set a default message inside the search text field. The text you enter here displays in the search field until the user clicks in the text box to type their query. Typically this is used to hold a prompt such as, “Search this site.” l Search button: Hide or display a search button on the form. In either event, the user can initiate the search by pressing the Return key on their keyboard, but with the button pres- ent they also have the option to click on the button to start the search. l Button position: Position the button relative to the search text field. The options are Right, Left, Top, and Bottom with the default option being to the right of the search form. Chapter 17: Working with the Site Modules 405 l Search button as image: Select whether button will be drawn using CSS or with an image. If yes, you must make sure you have an image file named searchButton.gif saved to the images/M_images directory on your server. l Button text: Specify any text you want to appear on the Search button. If this is left blank the system will use the default search string specified in the language file. The Advanced parameters section contains caching options: l Caching: This control allows you to exempt a specific module from the site’s caching, as set in the Global Configuration. Select the option No Caching to prevent the contents of this module from being cached. The default setting is Use Global. l Cache Time: The time, in minutes, you want the contents to be cached. Enter an integer value here. The default value is 900 minutes, meaning that after 900 minutes the system will re-create, or refresh this module. Note this control is only meaningful if the caching for the module is enabled. To add a Search module to your site, follow these steps: 1. Access the Module Manager. To do so, go to the Extensions menu and select the Module Manager option. The Module Manager loads in your browser. 2. Click the New icon on the toolbar at the top of the Module Manager. The New Module dialogue opens. Refer to Figure 17.2. 3. Select the option Search and then click the Next button. The Search Module dialogue loads in your browser. 4. In the Title field, type a name for the module. This field is required. 5. Set the Enabled option to Yes. 6. Set the Position control to assign the module to a position on the page. 7. Set the Menu Assignment to specify the pages upon which the module will appear. 8. Select any additional options or parameters you wish; all other fields are optional. 9. Click the Save icon on the toolbar at the top right to save your new module. The sys- tem creates the module, closes the dialogue, and returns you to the Module Manager. Tip Site search in Joomla! is enabled by the search plugins. Some of the settings for the plugins can be used to con- figure your search, for example, by specifying what is or what is not included in the search results. To learn more about configuring the search plugin, see Chapter 19. Sections The Sections module provides a list of links to the content sections of your site. The module is pri- marily intended to function as a navigation block and has very limited configuration options. The default Joomla system with sample data installed has a single Sections module; however it is neither published nor assigned to any page. The module is named Sections and is shown in Figure 17.34. Part III: Working with Components, Modules, and Plugins 406 FIGURE 17.34 The Sections module as it appears on the front end of the site. Sections module Note The system name for this module type is mod_sections. The Parameters section is divided into two sections: Module parameters and Advanced parameters, as shown in Figure 17.35. The Module parameters section contains two controls: l Count: Type an integer value into this field to specify the maximum number of sections that will be shown in the module. The default value is 5. l Module Class Suffix: This field allows you to specify a suffix that will be automatically appended to all CSS styles that affect this module. The use of a specified suffix makes it possible for you to style this module individually. Chapter 17: Working with the Site Modules 407 FIGURE 17.35 The Sections module parameters. The Advanced parameters section contains caching options: l Caching: This control allows you to exempt a specific module from the site’s caching, as set in the Global Configuration. Select the option No Caching to prevent the contents of this module from being cached. The default setting is Use Global. l Cache Time: The time, in minutes, you want the contents to be cached. Enter an integer value here. The default value is 900 minutes, meaning that after 900 minutes the system will re-create, or refresh this module. Note this control is only meaningful if the caching for the module is enabled. To add a Sections module to your site, follow these steps: 1. Log in to the admin system of your site. 2. Access the Module Manager. To do so, go to the Extensions menu and select the Module Manager option. The Module Manager loads in your browser. Part III: Working with Components, Modules, and Plugins 408 3. Click the New icon on the toolbar at the top of the Module Manager. The New Module dialogue opens. Refer to Figure 17.2. 4. Select the option Sections and then click the Next button. The Sections Module dia- logue loads in your browser. 5. In the Title field, type a name for the module. This field is required. 6. Set the Enabled option to Yes. 7. Set the position control to assign the module to a position on the page. 8. Set the Menu Assignment to specify the pages upon which the module will appear. 9. Select any additional options or parameters you want; all other fields are optional. 10. Click the Save icon on the toolbar at the top right to save your new module. The sys- tem creates the module, closes the dialogue, and returns you to the Module Manager. Tip Sections, as the term is used by this module, refers to only content sections, not to any other kind of section that may exist in your system. Note as well that your content sections are subject to the access level control settings you gave them. If you have restricted access to any sections, links in the Sections module may not be visible to all users. If you are having problems with the display of this module, check both the access level set- tings for the sections and the Section parameter named Show Unauthorized Links. Statistics The Statistics module displays information about your site and hosting environment in a module position. The module is configurable and can be set to display basic information about your server, your site visitor traffic and information on the contents of your site, including the number of arti- cles and web links. The default system with the sample data includes a Statistics module but it is neither enabled nor assigned to any pages. The module is named simply Statistics and is shown in Figure 17.36. Note The system name for this module type is mod_stats. The Parameters section is divided into two sections: Module parameters and Advanced parameters, as shown in Figure 17.37. The Module parameters section contains five controls. For example to display on your site, at least one of the first three controls must be set to Yes. l Server Info: Set this to Yes to display basic information about your server, including the OS, the Time, whether Caching or Gzip are enabled, and the version number of your PHP and MySQL installations. The default setting for this control is No. . shown in Figure 17 . 31. FIGURE 17 .30 The front-end output of the Related Articles module. Related Articles module Chapter 17 : Working with the Site Modules 4 01 FIGURE 17 . 31 The Related Articles. suffix makes it possible for you to style this module individually. l Box width: Enter an integer value here to set the width of the text field for the search form. l Text: Enter text here. to set a default message inside the search text field. The text you enter here displays in the search field until the user clicks in the text box to type their query. Typically this is used