6. The Basics of Joomla! Extensions: Components, Modules, Plugins, and Languages

A lot of the power behind Joomla! is the ability for developers and users to extend and build on its framework and functionalities. Chapter 1 described what extensions are and defined components, modules, and plugins. Another extension type is installable language packs, which translate the common text used throughout Joomla! and in components, modules, and plugins into other languages.

Joomla! comes with a number of built-in extensions such as the Web Links component, the Latest News module, and the TinyMCE Editor plugin. You can extend the functionality of your site by installing additional extensions that are produced by independent developers. This chapter will discuss best practices in using the core extensions, choosing additional extensions, using the Joomla! Extensions Directory, and installing extensions, as well as give you recommendations for some very useful extensions that every site can benefit from or that are extremely popular in the Joomlasphere.

Core Joomla! Extensions

The extensions that are included with a basic Joomla! installation provide everything you need to create a basic Web site. We will do this by building a new submenu called Using Extensions. The first step is to create an article that says something like “This is for showing extensions” and link it from a Single Article menu item in the Menu Manager. Each of the menu items we create will have this as its parent. Figure 6.1 shows the page associated with this menu item.

Image

Figure 6.1. Web site front end displaying the Using Extensions menu link


Tip

If you installed the default sample data in Joomla! 2.5 or the Learn Joomla! sample data in Joomla! 3, you will be able to follow along in this chapter without actually building the menu. If you wish to do that and did not install the sample data, you can follow the instructions below.

• You can install a new Joomla! site in a folder on your server. To do this go to your server file manager and create a folder; for example, you might call this folder ojbchapter6. Follow the instructions in Chapter 3 to install Joomla! in the folder. When you are finished, you will have a new site to which you can browse at http://mydomain.com/ojbchapter6. This is our recommended approach since you can practice on this second site without changing anything on your actual site, and thus you will not lose any work you have done on your content.

• You can replace the data in your site by rerunning the installation as described in Chapter 4. However, you will lose any changes you have made to your site’s content.

Once you have the sample data, on the About Joomla! menu click on Using Joomla!, then click on Using Extensions. This menu will give you a list of each of the extension types and has further detailed breakdowns within each type. We will cover each in turn. Open a second tab or window in your browser, go to the administrator, and log in. As we cover each extension, visit the administrator interface for that extension.


Components

Joomla! comes with four major components used to produce content: Content, Contact, Web Links, and News Feeds. In addition, the Search, Smart Search, and Users components may be accessed from front-end menus. You will see these listed if you click on the Components link in the Extensions submenu in your site administrator. The Banners component produces front-end displays, but these are presented in modules. In addition, there are components that are used to manage the administration side of your site. It is a good idea to understand and use these core extensions first, before adding new ones for specialized purposes. This will keep the management of your site as simple as possible, and you know that these have had the widest possible testing and support by the Joomla! Project developers.

All Joomla! core content extensions have certain elements in common. They all have administrator interfaces that show lists of items, including a toolbar of icons that allow you to create new items; delete items; set their state as Published, Unpublished, Archived, or Trashed; check in items that have locks on them; set the configuration options for the component; and access a Help screen. Some toolbars contain extra items that apply only to that specific component. Figure 6.2 shows the toolbar for the Contact Manager, which is typical.

Image

Figure 6.2. Toolbar for the Contact Manager in (A) Joomla! 3 and (B) Joomla! 2.5


Tip

Completely deleting content items such as articles, contacts, or categories is a two-step process. First you must trash the items. Then, using the filter bar, you must select just the trashed items. At that point the Trash icon will change to the Delete icon. Select the items you want to permanently delete and click the Delete icon.


Each toolbar for a component contains an Options icon. This is used for two main tasks. First, it allows you to set the default options for the display of the component. This determines how your content will display if you don’t change any settings in the individual items or use the menu options. Second, it allows you to set user permissions specifically for the component. By default, permissions for the component are the same as the global permissions, but this interface allows you to make them different. For example, you may not want to allow users in the Manager group to edit contacts, although they can edit all other content. This is the interface where you can control that, as shown in Figure 6.3. Basic details of using the access control system were discussed in Chapter 4.

Image

Figure 6.3. Configuration options for the Contact Manager: changing the Manager group’s permission to not allow editing of contacts (Permissions tab)

Each of the manager interfaces also includes filters (as shown in Figure 6.4) that allow you to limit the list of items according to the status, category, access level, or language and also allow you to search titles. Other options allow you to sort by specific fields. Some extensions have additional options.

Image

Figure 6.4. Filters for the Contact Manager in (A) Joomla! 3. In (B) Joomla! 2.5 the filters are arranged horizontally.


Tip

Parts of this chapter assume that you are logged in as a super administrator on your site. As such you will see every option in all of the administrator interfaces, but if you have limited the permissions of other users, they will not always see exactly what you do. Keep this in mind when explaining to other users how to do certain tasks.


All of the Content components are displayed using what are called views or layouts (you will see both terms used). The layout displayed on the front end of your site is most often determined by a choice you make when creating a menu item. As seen in Figure 6.5, which shows the display for choosing a layout for a menu, each of the core content types can be displayed as a list of items in a category or as a list of categories. In addition, most allow display of a single item, and some allow creation of new items. In this chapter we will refer to the layouts by the names used in the Menu Manager.

Image

Figure 6.5. Screen listing layout options for Contact menu items in Joomla! 3.0. Joomla! 2.5 does not use the sliders but instead shows the whole list.

Content

We covered the use of the Content component in Chapter 5. In this section we will highlight one additional but vital function: the ability to create articles from the front end of your site. This is extremely powerful because it allows you to enable users who do not have access to your site administrator to create and manage articles.

In Joomla! each user is assigned to one or more user groups. As we discussed in Chapter 4, there are default user groups that are present in your Joomla! installation when you first install it, but you can change them, add new ones, or delete them. These groups then are used to control what individual users can do and see. We recommend that you initially simply leave the default groups as they are, and then as you gain more experience, you can modify them as needed. The following list describes the ability of different users to work on articles in the front end if you do not modify the default groups and permissions:

• Authors can create new articles and edit any articles they have written.

• Editors can do anything an author can do but can also edit articles written by other people.

• Publishers can do anything an editor can do but can also publish an article, which means that it is available for visitors to your site to see (assuming that the access level is set to Public).

• Managers, administrators, and super administrators have the same rights as publishers in the front end.


Tip

We show a detailed example of using ACL to create a more complex set of groups in Chapter 13. The basics of ACL were discussed in Chapter 4.


Create a Create Article menu link with the Using Extensions menu link as the parent. Set the access level to Special. This means that only authors, editors, publishers, managers, administrators, and super administrators will be able to see it. Log in to the front end of your site. Clicking the Submit Article link will open a blank editing screen as shown in Figure 6.6. The editor is the same here as in the administrator. As the site’s super administrator or administrator, you can insert images, a “Read more” link, and page breaks. You select a category, whether an article is Featured, the language, and whether it should be published. If you want to save your work but are not ready to publish it for the world to read yet, you should change the state to Unpublished. If the feature has been enabled, you can also use the Image and URL fields (disabled by default).

Image

Figure 6.6. Front-end article submission form

Users who are authors or editors will not have the option to publish an article or to make it Featured. This is useful when you want to have content reviewed or proofread before it appears on your public site. If you want your users to be able to publish their articles from the front end, you can make them publishers; however, be aware that doing this will allow them to edit and change the publication status of other articles in your site. Figure 6.6 shows what the front-end article-editing screen looks like when submitting a new article, as it would be shown to a publisher who has the permission to publish articles.

Users who are allowed to edit an existing article will have an edit link available in Joomla! 3 or see an Edit icon in Joomla! 2.5 when they view a page with that article (this could be the article itself, a category or section blog, or a category list). Clicking the icon will open the same editing screen.

As we discussed in Chapter 5, the Content component gives you many options for displaying articles. Most importantly, within each article and category description you have the flexibility to design your content the way you desire it.

The Content component offers the widest variety of ways to present your content, called layouts, that can be linked from menus (most of these were explored in Chapter 5):

Single Article: This displays one article.

List All Categories: This displays the complete list of categories in com_content using a tree structure. By default, when you click on the category name, you will get a page showing all of the subcategories of that category and an article category list of all the articles directly in that category, although there are many other options.

Category Blog: This displays the introductory text (everything before any “Read more” link that you have inserted) for nonarchived articles in a category that a user is allowed to see. Parameters allow you to control the number of columns in which these are arranged as well as other layout details. Clicking the “Read more” link or a linked title (you must enable these options in the parameters) will lead to a Single Article display.

Category List: This displays a list of all nonarchived articles in a category that a user is allowed to see (for example, only publishers and editors can see unpublished articles that they have not written). Clicking an article name leads to a Single Article view.

Featured Articles: This displays the introductory text (everything before any “Read more” link that you have inserted) for articles designated as Featured that a user is allowed to see. Parameters allow you to control the number of columns in which these are arranged as well as other layout details. Clicking the “Read more” link or a linked title (you must select these options in the parameters) will lead to a Single Article display.

Archived Articles: This displays articles that have had their status changed to Archived. These articles do not display in lists or blogs but can be searched. You can create a display of archived items by creating a navigational link such as an Article Archive menu item by using the Archive module or by linking directly to an article from within the text of another article. Archiving is extremely useful when you have a large number of articles.

Create Article: This displays the edit screen for creating a new article.

Web Links

The Web Links component provides a simple way to organize information that involves links to other sites. Each item consists of a URL (the link) and optional text. Individual links must be assigned to categories. As with creating articles, one powerful aspect of Web links is that they can be submitted by users who are authors, editors, or publishers in addition to being created in the administrator by a person with back-end access. Web links are organized into categories (which are required for all links). Figure 6.7 shows the front-end editing screen for submitting a Web link, which you can add to your submenu, again limiting it to the Special group.

Image

Figure 6.7. Front-end editing screen for submitting or editing a Web link

Web links, like articles, can be edited in the front end of your site. Users with the right to edit Web links will see the Edit icon when visiting the front end. By default, this follows the same rules as for Content except that there is no “edit own” permission. A key difference between Web Links and Content is that access control does not apply to individual Web links, just to the component as a whole and to the categories to which specific Web links are assigned. (This may change in later releases of Joomla! 3.)


Tip

If you look both on your site and at Web sites that discuss Joomla!, you will discover that people spell Web links many different ways, such as weblinks and web-links. Don’t worry; they all mean the same thing. You will also see many spellings of news feeds.


As with articles and all other core components, you create a new Web link in the administrator by clicking on the New icon on the toolbar. Add a title, the link, and a description (this is optional). You can also decide what you want to happen when the link is clicked, for example, opening in the same browser tab or window, opening in a new tab or window, opening in a pop-up with or without a modal or browser navigation. This option is found in the Basic Options tab or slider. Experiment with different options. As you learn more, you may find uses for each of these options, although the usual choice is to open the link in the same window. Figure 6.8 shows the back-end editor for Web links.

Image

Figure 6.8. Back-end editing screen for submitting or editing a Web link

There are three layouts for Web links that you can link from a menu:

List Web Links in a Category: This displays a list of all of the Web links in a selected category along with any description for the links. Clicking a link will take you to the link location.

List All Web Links Categories: This gives a list of all of the categories in the Web Links component that a user is allowed to see. Each title links to a Category List layout that also shows the other subcategories in that category.

Submit a Web Link: This displays the submission form for creating a new Web link.

There is no way to directly display a single Web link with its descriptive text. However, you can achieve this effect by making a category with a single Web link in it and using a Category List layout. If you want a menu link that goes directly to another site, you should use the External Link menu item type.

As with all components, you can set the default or global options by clicking on the Options icon on the toolbar in the administrator. There you will see tabs to create the standard settings for all Web links on your site, as shown in Figure 6.9. These can be overridden in each individual Web link.

Image

Figure 6.9. Interface for setting the global options for Web links

Figure 6.10 shows a front-end view of a list of Web links in a category. We linked this from our Extensions submenu after adding some links to the Uncategorised category.

Image

Figure 6.10. Web Links Category list in the front end. The List layout includes a description.

The Web Links component is a good solution for managing and displaying a number of different kinds of content. For example, a common use is to have links to external sources of information about a topic. It can also be used to present a directory of vendors or others who may even pay to be listed, as well as to display the Web sites of your members or a blog roll (a list of blogs that you recommend). Another use is to link to selected media coverage of your organization or topic. It can even be used to manage links to documents and other areas of your site.

News Feeds

News feeds are ways that you can display content from another Web site on your Web site. The News Feeds component gives you an easy way to do this. You simply take the feed URL from a site with a feed you want to include and put it into a new news feed item. To obtain the URL of a feed, look for a feed link or an RSS Feed icon or symbol indicating a feed link on the site from which you want to have a feed. News feeds are organized into categories. Figure 6.11 shows the screen for creating a news feed. You can set options for the number of items to show in the Publishing Options tab and whether to display the description or image for the feed in the Display Options slider. The process for creating and editing news feeds is the same as that for Web links; the only difference is the specific options available.

Image

Figure 6.11. Creating a new news feed

It is important to be careful when selecting news feeds to add to your site. Most sites have terms of service for their feeds, and you should review them carefully. Some feeds are designed solely for personal use in news readers, not as Web site content. Providers of these feeds may disable feeds to your site if they detect misuse. Do not give in to the temptation to use content from other sites as a substitute for original content.

One very useful way to use the News Feed component is to display your own feeds from any social networking site that allows this. Simply look for the RSS Feed icon or symbol.

The News Feed component offers three layouts that can be linked from menus:

Single News Feed: This displays the latest content from one news feed.

List All News Feeds in a Category: This displays a list of all of the news feeds in a selected category that a user is allowed to see along with any description for the feed. Clicking the link will take you to the Single News Feed layout.

List All News Feed Categories: This gives a list of all of the categories in the News Feed component that a user is allowed to see using a tree structure. Each title links to a Category List layout that also shows the other subcategories in that category.

Figure 6.12 shows the front-end view of a Single News Feed.

Image

Figure 6.12. Single News Feed display in the front end

Contacts

One of the most important kinds of information that your Web site can provide is how to contact you or other people in your organization. The Contacts component provides a useful way to organize and present contact forms, contact directories, and profiles. It contains a large number of fields that you have the option of using or not using. These include complete address fields, an image field, a free-form “miscellaneous” field, and the ability to create an e-mail contact form for anyone listed. Although the component’s interface makes it seem complex, you can ignore any part of it that you are not interested in using.

Individual contacts can be created only in the administrator. As with all other Content components, each contact must be placed into a category. One benefit of the category structure is that it allows you to use different features of the component in different categories. For example, you might have a category that consists solely of information about contacts, another category that can include only contact forms, and another that may include only the miscellaneous field, which can serve as an informational page.

The Contacts component has four layouts that can be linked from menus:

Single Contact: This displays the latest content from one contact.

List Contacts in a Category: This displays a list of all of the contacts in a selected category that a user is allowed to see. You can select specific fields such as name, position, and phone number to include in the display. Clicking the link will take you to the Single Contact layout.

List All Contact Categories: This gives a list of all of the categories in the Contacts component that a user is allowed to see. Each title links to a Category List layout that also shows the other subcategories in that category.

Featured Contacts: When editing a contact in the administrator, you can mark individual contacts as Featured. This layout displays a list of those contacts.

If you are using contact forms, we suggest enabling the Captcha plugin, which will serve to prevent spam form submissions. This is discussed in more detail in the “Plugins” section of this chapter. It is also generally preferable not to show the e-mail addresses of your contacts.

Figure 6.13 shows the contact-editing screen in the administrator back end.

Image

Figure 6.13. Creating contact details for an individual contact (we have already filled in the name on the first tab)

Administration and configuration of contacts work in the exact same way that administration and configuration of Web links and news feeds do.

One important feature of the Contacts component is that each contact can be linked to a specific user and automatically use that user’s e-mail address as the address for a contact form. The Contact Creator plugin will automatically create a linked contact record for each new user if you choose to enable it. Figure 6.14 shows a contact form in the front end.

Image

Figure 6.14. Front-end contact form with the Captcha plugin in use. If you use the default options, you will need to click to open the slider containing the contact form.

Banners

Although it can be used in other ways, the Banners component is primarily designed to manage advertising. This can be advertising that you sell to earn money or simple marketing of specific events or sections of your site. The component allows you to set up images or Flash media that when clicked take users to specific URLs. It tracks the number of click-throughs that the banner receives, which allows you to use it for pay-per-click advertising.

Figure 6.15 shows the administrator back-end editing screen for creating an instance of a banner. Administration of banners is slightly more complex than that for the other components in that there are separate tabs for managing banners and clients. The banners themselves are placed in categories, but clients do not use the category structure.

Image

Figure 6.15. Creating a banner with the Banners component

The Banners component cannot be linked directly from a menu. Instead, banners are displayed using the Banners module. We created a Banners module using one of the sample images, and it displays as shown in Figure 6.16.

Image

Figure 6.16. Front end with a Banners module displayed

Smart Search and Search

Joomla! 2.5 and 3 come with two ways of managing search: Search (which is the same as the search used in Joomla! 1.5) and Smart Search.

The Search component provides basic search functionality for your site. Articles, category and section descriptions, Web links, and contacts can be searched. What is searched is controlled by the use of search plugins for specific areas:

• Search has one layout that can be linked from a menu. It displays a search form.

• Search forms are also displayed in search modules.

Smart Search provides the same basic structure of a menu link, module, and plugins. However, Smart Search has a number of additional options. Smart Search approaches search in a very different way from the basic search. It works in a manner similar to Google and other search engines, which means that it indexes the content on your site before a search ever happens and then searches the index rather than your content directly. This is much faster and more effective than the basic search approach. If you have not used Smart Search to index your content and you click on the Smart Search menu item and search for a word such as Joomla or fruit, you will not get any results. To index your content, go to the Smart Search screen in your administrator and click on the Index icon, which is shown in Figure 6.17.

Image

Figure 6.17. Smart Search toolbar with Index icon indicated

This will give you a modal screen that will tell you that indexing is in progress, as shown in Figure 6.18. Do not create any new content while indexing is being done. Depending on the speed of your host, indexing sample data may take as long as 10 minutes. Do not close the window until the message tells you that indexing and optimizing the index are complete. At that point you can close the modal, and you will see a list of all of your content items in the Smart Search screen, as shown in Figure 6.19.

Image

Figure 6.18. Smart Search indexing in progress

Image

Figure 6.19. Smart Search screen with indexed data

At this point if you create a Smart Search menu link, click it, and search for a word (such as Joomla or koala), you will get results, as shown in Figure 6.20.

Image

Figure 6.20. First page of Smart Search results for the word Joomla

To complete switching your site to using Smart Search you will need to do two additional things: replace the Search module with the Smart Search module, and enable the Smart Search Content plugin. These steps will be discussed in the “Modules” and “Plugins” sections of this chapter respectively.

Once you have indexed your content, you can take advantage of some of the advanced features of Smart Search. For example, the second tab in the Smart Search administrator interface shows your site maps (as shown in Figure 6.21). These are ways that your content data is organized and by default include the content type, language, author, and country and region (from the Smart Search-Contacts plugin). Clicking on each of these will reveal more detailed lists. If you click on the Advanced Search options in the front end of your site, you will see that these same maps are available, as shown in Figure 6.22.

Image

Figure 6.21. Smart Search content maps

Image

Figure 6.22. Smart Search with advanced options displayed

In addition, Smart Search offers the option to link filtered and saved searches. To create a filter, go to the Search Filters tab and click the New icon. Search filters allow you to limit the search results to specific subsets of your site content, as shown in Figure 6.23. For example, you can limit by date (in the Filter Time Line tab or slider) or by author (in the Filter Details tab or slider). You can also use the content maps. This example limits the search to articles.

Image

Figure 6.23. Smart Search filter example, with search limited to articles

When your filter has been created, it will appear in the list of filtered options for creating a Search menu link and also in the Smart Search module. This can be very useful when you do not want users searching everything on your site or you want to lead them to specific kinds of content. Figure 6.24 shows how to create a Filtered Search menu link that limits the search to articles that mention extensions. Figure 6.25 shows how to set up a filtered search in a Smart Search module.

Image

Figure 6.24. Smart Search menu link with a filter and saved search query

Image

Figure 6.25. Smart Search module with a filter set in the Basic Options tab or slider

In deciding whether to use Search or Smart Search for your site, the most important consideration may be whether the developers of any extensions you install have provided plugins for one or the other. If you cannot use Smart Search because a plugin is not available for a key extension on your site, you may want to ask the extension developer if one is planned. You can always start your site using basic search and then switch to Smart Search when plugins are available for all of your key extensions.

Users

The Users component allows users to register and manage their passwords and profiles in the front end, and site administrators to manage users in the back end. In the front end it offers six layouts for each of these tasks.

In the administrator you can use the Users component to create new users, block users, write notes about users, and create new groups to control what users can see and what actions they can take. Probably the most common uses that you will have for the Users component are creating users and occasionally resetting a password for a user who cannot remember anything about his or her account.

Joomla! allows you to add new fields to the user profile with the User Profile plugin. This is discussed in the “Plugins” section of this chapter.

Administrator Components

Although many users do not realize it, the site administrator is actually managed by a large number of other components, such as Config, Menu, Language, Module, and Plugin. Although they aren’t used to create content, they do manage your site, so it is good to know they are there. Most of the time you will know they are there only if you happen to look at the URLs for pages in your administrator.

Modules

Modules are small areas of content that display on your page in the space around your component. As discussed in Chapter 4, modules are placed in specific positions in your template. Each module has a unique set of configuration parameters, which are documented in the Help screens. The modules can be grouped into several categories: Content, Display, Utility, User, and Navigation. All modules have some common parameters, although they all have parameters that are specifically related to their functionality.


Tip

Modules have official names that are shown in the drop-down list of types in the Module Manager filter bar. These are the names we use in the chapter. However, each individual module of a certain type (for example, each Banners module) has its own title, which is displayed in the list shown in the Module Manager. These are not always consistent even in the core data, and in your site you will definitely want to devise meaningful names for each module.


The common parameters for all modules in Joomla! 3 are found on the Details, Advanced Options, and Menu Assignment tabs, while in Joomla! 2.5 the same areas are found in three areas of the module edit screen. You can open this screen by clicking the name of any module. In the Details area you can do the following:

• Edit the title

• Enable or disable the module (similar to publishing and unpublishing an article; if you select No, the module will not be visible on the front end of your site)

• Assign the module to appear in a position in your template

• If there are multiple modules in a position, place it in a particular spot in the display order

• Assign an access level to determine who can view the module

Menu Assignment allows you to decide what pages to display your module on: On All Pages, Only on Pages Selected, or On All Except Those Selected. If you choose either of the two last options, you can check any pages defined by menu links that you want your module either to appear or not appear on. These are arranged based on the menu structure.

The advanced parameters allow you to set a number of options related to templates. These will be discussed in Chapter 7. This group of parameters will also allow you to enable or disable module caching. Caching is the process by which data is stored for a period of time, which allows a Web site to display content faster. For most sites, we recommend disabling caching for all modules. If caching is on, changes to content displayed in modules will not immediately be apparent and could be confusing, and the content data will not be refreshed until the caching time has expired. In very large and/or very busy sites, caching can improve Web site performance considerably, but for most sites, caching does not result in appreciable improvement.

Figure 6.26 shows the four module-editing tabs for the Banners module in Joomla! 3, which is fairly typical.

Image

Figure 6.26. Editing screen for the Banners module in Joomla! 3: (A) Details, (B) Basic Options, (C) Advanced Options, (D) Menu Assignment

Content Modules

Content modules display information about articles and categories for the Content component. For many of them you will need to know the category for the content you want to display.

Latest News: Displays a linked list of the most recent articles from selected sections or categories. The links lead to a Single Article layout.

Most Read Content: Displays a linked list of articles based on the number of times the article has been viewed. The links lead to a Single Article layout. (This is called Articles Most Read in the sample data.)

Articles-News Flash: Displays the introductory text of either the most recent article or a randomly selected article. The link leads to a Single Article layout. (This is called News Flash in the sample data.)

Articles-Related Articles: When displayed on a Single Article page, displays a linked list of other articles with the same metadata keywords. The links lead to a Single Article layout. (This is called Articles-Related Items in the sample data.)

Archived Articles: Displays a linked list of months in which archived content was published. The links lead to an Archive layout for that month.

Articles Category: Displays a list of articles from one or more categories.

Articles Categories: Displays a list of categories with one parent category.

Display Modules

Display modules display content other than that from the Content component.

Banners: Displays one or more banners managed by the Banners component.

Feed Display: Displays the content from one of the news feeds managed by the News Feeds component.

Random Image: Displays an image randomly selected from a folder that you select in the Menu Manager.

Footer: Displays the Joomla! site credit. You are free to disable this module.

Custom HTML: Displays content that is created directly in the module using your site editor. This is great for displaying specific text on your site.

Weblinks: Displays a list of Web links from a specific category.

Utility Modules

Utility modules provide specific functionality for your site.

Search: Displays a search box for basic search. It is strongly recommended that you disable this module if you are using Smart Search. Although it will work, it will be confusing for your users to have two different search results pages and different search results depending on how searching is done.

Smart Search: Displays a search box for Smart Search. This includes some advanced options, but be aware that not all advanced options will make sense for your site design. You should enable this module only if you are using Smart Search and have indexed your site content.

Syndicate: Displays a link that allows other people to take a feed of your site’s content. This can be a good way to keep your visitors up-to-date with your site content. You should consider posting a copyright policy for use of your site’s content on other sites.

Statistics: Displays some simple statistics about your site.

Wrapper: Displays a page from another site in an iframe. Some sites have policies that prohibit the display of their content in iframes, and they may block such use through server settings. You should use an iframe to wrap content from another site only if you know that the site allows it. Many sites for media sharing, such as YouTube, use iframes for embedding, and you can use the Wrapper module to provide a safe way to display embedded media from such sites.

Language Switcher: Displays a list of content language choices for a user. This module should be used only in conjunction with the Language Filter System (multilingual) plugin.

User Modules

User modules display information related to authentication and logged-in users.

Login: Presents a form for logging in to the site with optional links to registration and forgotten password pages.

Who’s Online: Displays a list of currently logged-in users.

Latest Users: Displays a list of the most recently registered users.

Navigation Modules

There are two main types of modules that are used to create navigation for a site:

Menu: Displays navigational links. Menus are discussed in more detail in Chapter 5 and in Chapter 9.

Breadcrumbs: Displays the path from the home page to the current page with links to each of the pages in between. This helps users maintain their orientation on your site, especially if you do not have a menu with a home page link on every page.

Administrator Modules

Modules are also used in the site administrator, for example, to create the Quick Links or Quick Icons module shown on the Control Panel, the menus, and the status information shown on the administrator screen. However, most users never change these since they are not visible to site visitors. We recommend not changing these until you are an experienced user.

Plugins

Plugins are small but powerful pieces of code that carry out a wide variety of specific tasks. Items such as the editors used for creating content are plugins. Each of the buttons below the editor (Image, Pagebreak, Read More, Articles) is also a plugin. Plugins control everything from authentication to what areas of your site the search components actually search. With a few exceptions, most beginning users do not need to change anything in the plugins that are part of the basic Joomla! installation.

To configure a plugin, you go to the Plugin Manager and click the name of the plugin; or select the check box next to its name and click Edit. Most of the time you simply need to either enable or disable the plugin, but with some third-party plugins there may be additional parameters to set. Figure 6.27 shows the editing screen for the Contact Creator plugin.

Image

Figure 6.27. Editing screen for the Basic Options of the Contact Creator plugin

Joomla! installs with five plugins disabled that you may want to enable:

Smart Search Content plugin: If you enable this plugin, Smart Search will automatically update your site index each time you save a content item such as an article, category, contact, Web link, or news feed. If you do not enable this plugin, you will need to periodically update your index by clicking the Index button in the Smart Search administrator interface.

Captcha-reCaptcha plugin: This plugin provides you with protection from spam submissions on your forms such as contact forms and registration forms. You need to obtain keys from the reCaptcha Web site and to select reCaptcha as the Captcha option in Global Configuration.

User-Contact Creator plugin: If you enable this plugin, a linked contact will be created for each user that is created from that point on. This can save you a great deal of time if you want to have a contact for each user. Keep in mind that the plugin will create contacts only for new users; you will need to make links yourself for any existing users. How to do this is explained in the Contacts component section of this chapter. The Autopublish option means that the contacts will be published without you doing it individually in the Contact Manager. The Category option designates a category for the created contacts. The Automatic Webpage option does not create a Web page; it is intended for use if you already have Web pages associated with usernames.

User Profile plugin: If you enable this plugin, you will have the option to have extra fields in the user profile, such as name, address, birth date, and anything else you want. This is a sample User Profile plugin, and you may install different ones that have other fields. An important thing to note about this plugin is that you can disable each of the fields, and if you enable a field, you can make it required or optional. Each field is listed in two different places in the plugin edit screen because you can separately set the fields for registration/user creation and for profile editing. This can be useful if you have some fields you want to set at registration but do not want users to be able to change. Part of this interface is shown in Figure 6.28.

Image

Figure 6.28. Editing screen for the User Profile plugin

Language Filter System plugin: This plugin would be enabled if you are creating a multilingual site. It is used in conjunction with the Language Switcher module.

Languages

One of the most powerful aspects of Joomla! has long been its international community. You can install language packs for dozens of languages, which allow translation of the common interfaces. In Joomla! 2.5 these can be downloaded from the links available on the Joomla! community site and installed in the same way as any other extension. In Joomla! 3.0 you can install a language pack directly from the Extension Manager without having to find the package. Figure 6.29 shows the Joomla! 3 Article Manager as it appears with a French language package installed.

Image

Figure 6.29. Article Manager in French

Joomla! offers a number of language features that are managed in the Language Manager. Most importantly, Joomla! 2.5 introduced the ability to do basic management of multilingual content. This system is designed to present your site visitors with only content in the language that they select plus any content that you designate as being for all languages. Thus, it is good to think of it as a system for language filtering. It is not a system for managing translations of articles, nor is it a system for automatic translations.

There are several steps in implementing a site using this system.

First, in the Language Manager define one or more additional content languages on the Content tab of the Language Manager. Figure 6.30 shows how to define French as a content language. Note that in some places you will want to use fr-FR, which means French as spoken in France, and in other places you will want to use just fr.

Image

Figure 6.30. Creating a new content language

Second, for each language on your site define a completely separate category structure. Starting with a top-level category, when creating new categories select the language for each category. Figure 6.31 shows the Language field. Also create a complete category structure for language All. Then, when creating new content, always assign it to categories in the language that matches the content and designate each item with the appropriate language.

Image

Figure 6.31. Field for designating the language used

Create at least one menu for each language and one for the language All. Keep all the language links on a menu in the same language. At this point designate a home page for each language and one for All. This is done in exactly the same way you would normally designate the home page for a monolingual site, but instead of selecting All in the drop-down field, you select a specific language. So, to summarize, you need at least one menu per language and one menu link designated as the default page for each language. You also need an All default page, but this should be unpublished. If you click on the menu link on the administrator top menu, you will now see that each language’s home page is marked as shown in Figure 6.32.

Image

Figure 6.32. Menu list showing the location of default pages for each language

You continue along this path by also creating copies of other modules for each language. At this point, modules and template styles should also be assigned for each language.

Next, publish the Language Switcher module. This module allows users to select the language they want. Figure 6.33 shows the Language Switcher module as displayed in the front end of a site.

Image

Figure 6.33. The Language Switcher module on the front end of a site

Finally, as the last step, go to the Plugin Manager and enable the Multilingual Filter plugin. There are three main configuration options, but as a preliminary step you can leave them on the defaults. At this point you can test your site. A multilingual site is powerful, but implementing and managing one can be complex. You need to plan carefully before beginning. There are many more details that allow you to take advantage of this powerful system. We recommend that you visit the multilingual demo site at http://multilingual-joomla-demo.cloudaccess.net to see a fully implemented example before beginning. That site also contains a great deal of detailed information about each of the features. There is also extensive documentation at http://docs.joomla.org.

Adding Extensions

Although a lot of Web sites may not need extra functionality beyond what Joomla! provides out of the box, it is important to think about how you may want to extend your site and plan for the additional functionality you may need. The first best practice for choosing extensions is to know whether you really do need the functionality. It is quite common for people to install extensions just because they can and not because they have a need for them. Although it is good to try things, if you don’t need an extension or change your mind about offering or having the functionality that extension offers, remove the extension to keep your site safe. Unused and out-of-date extensions are one of the most common ways that people expose their sites to security issues. If you install an extension, it is important to keep track of the development of the extension and any security bulletins, issues, and upgrades. Upgrading your extensions is just as important as keeping your Joomla! installation up-to-date.

A second best practice is to pick extensions that have active development. There are a number of extensions floating around in the Joomlasphere that are very old, are outdated, and haven’t had active development or improvement for a long time. These are “dead” extensions, and most likely if they haven’t been developed in a long time, they haven’t had a security audit either. If you are unsure if an extension has active development, look either on the developer’s Web site or in the extension files themselves. You should see dates on the files or activity regarding the extension on the developer’s site. If you are unsure, it is probably best to look for a similar extension with the same functionality that is being actively developed.

Another best practice is to try to choose extensions that have good support options. These options can range from developer support that is free to developer support that can be purchased on an as-needed basis or as a subscription or support contract. A lot of extensions offer Web sites that have user-to-user support channels, such as forums, mailing lists, and knowledge bases. The support that comes with an extension isn’t always an indicator of how well an extension works or is coded, but it is pretty handy when you run into a problem you need help solving.

Some extensions are all-in-one mega extensions, usually components that cover a number of different functionalities in one package. Good examples of this are some of the media extensions that allow you to present audio, video, Flash, animation, and image files using one extension. Another example is the various community and social networking extensions that can turn your Joomla! site into a social network that offers messaging, audio, video, profiles, and other extended features. On the opposite side of the spectrum, there are plugins that may do only one thing, such as allow you to put an individual MP3 player inside an article. Some people like to get as many options and functionalities in one extension as they can to have fewer extensions to keep up with, while others like to use a number of individual extensions.

Both methods have their advantages and disadvantages. The advantage to multipurpose extensions is, as stated earlier, fewer extensions to keep track of for updates; the disadvantage is that if something goes wrong in part of an extension, all the other parts can be affected. The advantage to individual extensions that are specific in nature is that they tend to do what they do very well; the disadvantage is that it can be difficult to keep up with updates, and sometimes individual extensions can conflict with each other and cause problems on your site. The decision to use a mega extension or individual extensions is mostly about personal preference. One general guideline to keep in mind regarding mega extensions is that if you aren’t going to be using 50 percent of the functionality the extension provides, most likely you can use something that is less “mega” instead.

Using the Joomla! Extensions Directory

The Joomla! Extensions Directory is a directory of third-party developer extensions and tools located at http://extensions.joomla.org. To be listed in the JED, an extension has to be licensed as GPL, it must not have any current security issues, and the developer’s site and e-mail address must be in working order. The JED is one of the largest and most popular of the Joomla! family of sites, supporting both end users and the developers who support the project with their extensions. There are thousands of extensions to choose from, covering everything from account access to vertical markets. Both free and commercial extensions are listed. The front page of the directory has an extensive menu that helps you navigate through the various categories and highlights what is new to the directory, extensions that have been recently updated, a few randomly selected picks, and extensions that are selected by the JED editors as Editors’ Picks.

All the extensions listed have icons next to their names to denote whether they are components, modules, plugins, languages, or a combination. Another important part of the JED is the ability for the community to vote on or rate extensions and comment about their experience. Community reviews are a great way to get an idea of how well an extension works and how easy it is to use. It is also a nice way for community members to give kudos to a developer of an extension they like particularly well. A listing for an extension will include a link to download the extension and links to the developer’s Web site, to a demo if available, to documentation if available, and to support if the developer offers support for the extension in some way.

While you are surfing the JED for extensions, you may come across helpful notes from the JED editorial team that tell you whether you have to sign up or subscribe to an extension developer Web site to download the extension, whether an extension has been removed from the directory, or whether an extension has additional add-ons. A number of the mega component extensions such as Sobi2, JomSocial, Community Builder, and Virtuemart have vibrant third-party developer communities that specialize in providing add-ons for those specific extensions.

Searching the JED can help you find extensions with a specific functionality, and the advanced search can help you search by category, by whether the extension is commercial or free, by license, and by compatibility.


Tip

Extensions are downloaded as packages, which are archived, compressed files such as zip and tar files. Once you download an extension, do not unarchive, unzip, or expand the extension file unless the developer has given specific instructions to do so. Extension packages are installed using the package file, and the installation process uncompresses the zip file on the server itself.


Installing Extensions and Viewing Extension Information

The extension installer located in the administration back end of Joomla! sites allows users to install extensions and view information regarding extensions that have already been installed. It is also where extensions can be uninstalled if they are no longer useful or if they have security issues. You will find the extension installer by going to the top main menu, clicking on Extensions, and then clicking Extension Manager. Three extension installation options are available. In Joomla! 3 they are on separate tabs, while in Joomla! 2.5 they are on one page.

Upload Package File: Using this method, you browse for the extension on your computer; then, after selecting the extension package file, all you have to do is click the Upload File & Install button. Once the extension installs successfully, you will get a confirmation message that the installation completed.

Install from URL: Using this method, you can install an extension from any Web site as long as you give the full URL for where the extension is located (for example, http://somewebsitename.com/extensionname.zip). This method of installing extensions can be problematic if the extension is large and the connection speed is slow. It may take too long to download the extension from the other site to your site, which can cause the installation to fail. If the extension installs successfully, you will get a confirmation message that the installation completed.

Install from Directory: Using this method, you can specify a directory on your Web site where you have already uploaded an extension package to install. You can upload the extension using an FTP program or your hosting service’s file manager. Once the extension installs successfully, you will get a confirmation message that the installation completed. You will very rarely have to use this option.

Figure 6.34 shows the Extension Manager installation screen.

Image

Figure 6.34. The Extension Manager upload and installation screen

Some extensions upon successful installation will also give you additional information about the extension you have installed. Those messages vary from extension to extension.

While on the Extension Manager screen, you can see that there are other pages you can view, such as Update, Manage, Discover, Database, Warnings and install languages. If you click Manage, you will see a complete list of the extensions you have installed on your site (including core extensions), as shown in Figure 6.35. This page details the component name, whether it is enabled, the version number, the date of the extension as specified in the component’s XML data file, and the developer who created the extension. You can enable/disable an extension by clicking the icon beside the extension name that is located in the Status column.

Image

Figure 6.35. The Extension Manager Manage screen

In addition to disabling an extension you can uninstall an extension you no longer want to use by selecting the radio button by the extension name and then clicking Uninstall in the toolbar. Before installing or uninstalling any extension, it is a good idea to make a full backup of your site files and database. One thing to check after uninstalling an extension is that all the files associated with that extension have been removed, especially if you have uninstalled an extension because of a security vulnerability. You can check this by using the server File Manager and going to the appropriate folders in the root of your Joomla! installation such as for components, modules, plugins, templates, or languages. You also need to check those same folders located inside the administrator directory to assure that all the related files have been removed from the administrator section of the site. Make sure that you check over your site to ensure that nothing was broken by removing an extension. Normally this should not be a problem since you would not remove an extension you are actively using.

The other link that you will commonly use is Update. Update allows you to check for updates of either Joomla! itself or extensions you have installed (assuming the developer takes advantage of this feature). Click on the Find Updates icon. This will automatically check all of your extensions for updates. If any are found, click on the check box next to the name and then click the Update icon. You will get a success message if the update was successful or an error message if it was not.

In general, you should never need to visit Warnings, Discover, or Database, but they are useful if you have problems updating. They give you information that can help you understand what went wrong and how to fix it. Discover is used for a special kind of installation most often used by developers, and you are unlikely to ever need to use it.

Clicking on Install Languages presents a list of language packages that are available from the Joomla! Project. You can select one or more to install. Other language packages can still be installed in the same manner as other extensions.

Popular Extensions

As mentioned earlier, there is a very large and diverse community of extension developers who contribute to the Joomla! community. This portion of the chapter cannot cover all the extensions that are available, but we have included some that are helpful to a large number of sites and are very popular in the Joomla! community. All of these extensions can be found in the Joomla! Extensions Directory.

Akeeba Backup: Akeeba Backup generates full backups of a Joomla! Web site and can be configured to back up portions of a site. The backups contain a self-installer that is similar to the Joomla! installation process, which allows users to easily restore or move a Web site. It has a very easy-to-use interface and very good support.

Joomla! Content Editor (JCE): JCE is an advanced and configurable WYSIWYG editor that makes entering and editing content on Joomla! Web sites much more user friendly. It has integrated image/media, file and link handling, and uploading and supports plugins. One of the really nice features of JCE is the ability to configure editing options and abilities by groups or by individuals.

RokBox: RokBox is an all-in-one media plugin that allows you to easily insert media such as images, video, audio, files, and even other Web sites into content items. It has a large number of configurable options and excellent documentation, as well as an active support forum. There are also additional extensions that have been created for it that allow you to integrate it right into your content editor.

Xmap: Xmap is a site map generator for Joomla! that creates site maps based on the Joomla! menu structure. The site maps that are created are compatible with search engine site map requirements such as with Google Webmaster Tools. Xmap also supports plugins for a number of Joomla! extensions, allowing an entire site’s structure to be included in the site map. Site maps are important to users as a reference, and they serve an important function in making your site’s content easier to index by search engines.

sh404SEF: sh404SEF is an extension that allows you to customize the URLs that your site generates as well as offering some protection against some common security exploits such as flooding attacks or spam input on any forms you may have on your site. Customizing the URLs that your site generates can be very helpful in terms of search engine optimization.

BigShot Google Analytics: BigShot Google Analytics is a very easy and effective way to add Google Analytics Tracker code to your Web site, reducing the need to manually add it to your template. There are also options available for those that use Woopra, which is another Web site analytics solution.

• Forms are a useful feature for many sites. While we don’t recommend one particular form extension, there are a large number of solid, longtime Joomla! commercial and noncommerical extensions for form creation and management. Among those are RSForms, ChronoForms, and Fabrik.

• With the multilingual features that became available in Joomla! 1.6, demand for extensions to manage translation has increased. At this point there is no mature extension available, but Josetta shows promise.

Conclusion

The extensibility of Joomla! is a great part of what makes Joomla! a sensible choice for any use—as well as the supportive and vibrant third-party developers who actively work at making Joomla! better for all users. It means the resources you need to make your Joomla! site the best that it can be are available. With thousands of extensions available for any given practical application, the sky is the limit as to what your Web site can accomplish. Chapters 11, 12, and 13 present the practical application of Joomla! in specific scenarios, extensions that suit those specific purposes, and information on how to use Joomla! and extensions in those scenarios to the best advantage.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset