Thiết kế web với joomla 1.6(5).x part 35 pdf

8 159 0
Thiết kế web với joomla 1.6(5).x part 35 pdf

Đang tải... (xem toàn văn)

Thông tin tài liệu

Chapter 15: Using the Polls Component 333 l The Select State filter on the far right allows you to filter and display the Polls according to whether they are published or unpublished. This provides an easy way to identity all polls that are currently active on the site. To reset this filter, change the combo box back to the default setting. The main content area of the screen contains a list of all the polls in your Joomla! site. The columns provided are: l # : An indexing number assigned by Joomla! This number cannot be changed. l Checkbox (no label): Click in a checkbox to select a poll; this is needed if you want to use several of the toolbar options, referenced above. l Poll Title: This field displays the full name of the poll. Note that Joomla! uses the ques- tion being asked in the poll as the name of the poll. Click on the name to edit the poll’s details. l Published: A green checkmark in this column indicates that the poll is active. The field will show a red X if the poll is disabled. Note that both the individual poll and the page or module containing the poll must be published for the poll to appear to site visitors. Administrators can toggle between the two settings by clicking on the icon shown. l Votes: A running count of the number of responses to each poll. l Options: Indicates how many options, that is, answer choices, the poll contains. l Lag: Use this field to limit the number of times the same visitor can respond to the poll during a specific time period. The integer value in this field indicates how long a visitor must wait before submitting an additional response to the poll time measured in seconds l ID: The system-generated user ID number. Finally, at the bottom of the screen, below the content area, is the Display # option. Change the value in the combo box control to alter the number of polls that are displayed on the page. The default value can be altered by changing the List Length option on the Global Configuration Manager. Creating and Managing Polls All polls content is created and managed through the Poll Manager. The sample data included with the default system includes one poll entitled “Joomla! is used for?” That Poll can be edited to change the content for your use, or you can create a new poll from scratch by using the New option on the Poll Manager. Creating polls To create a new poll, click the New icon on the toolbar at the top of the Poll Manager. Figure 15.2 shows the New Poll dialogue. Part III: Working with Components, Modules, and Plugins 334 FIGURE 15.2 The New Poll dialogue. The toolbar at the top of the New Poll dialogue provides quick access to the following functions: l Preview: Click this icon to view how your poll will appear to site visitors. The poll appears in a lightbox on top of your browser page. l Save: Click this icon to save your work, create a new poll, and exit the New Poll dialogue. l Apply: Click to save your work and create a new poll without exiting from the New Poll dialogue. This option lets you save without exiting the screen and it useful in case you are interrupted or you otherwise want to save yet keep working on this screen. l Cancel: Cancels the task and exits the New Poll dialogue. l Help: Displays the Help files related to the active screen. The Details section of the New Poll dialogue includes the following fields: l Title: This field is used to create the question for the poll; this field is also used as the Poll’s name inside the Poll Manager interface. This field is required. l Alias: The alias is the internal name for the item. This field only accepts lowercase letters. Spaces are not permitted. If you leave this field blank, the system automatically uses your title for the alias, after modifying it to fit the system formatting requirements. Chapter 15: Using the Polls Component 335 l Lag: Input an integer value to specify how long a visitor must wait before responding to the poll again. The time is calculated in seconds. The default value is 86,400. l Published: Set the control to Yes to publish the poll. Note that setting the poll to Publish is only half of what is needed to make it visible to site visitors; you also must display the Poll module. The Options section of the New Poll dialogue includes a set of fields that are used to input the answer choices for the poll. The system supports up to 12 answer options. Although you can cre- ate a poll without filling in any of the Option fields, the result would be a poll with no answer choices; therefore, for all practical purposes this section requires at least two entries. To create a new poll, follow these steps: 1. Access the Poll Manager by clicking on the Polls option under the Components menu. The Poll Manager loads in your browser. 2. On the Poll Manager interface, click the New icon on the toolbar at the top of the Poll Manager. The New Poll Dialogue opens. Refer to Figure 15.2. 3. In the Title field, type the question you wish to pose in the Poll. This field is required. 4. Set the Published option to Yes. 5. Enter the answer choices in the Options fields. 6. Complete any other fields you wish; all other fields are optional. 7. Click the Save icon on the toolbar at the top right to save your new poll. The dia- logue closes and returns you to the Poll Manager. Editing and deleting polls Existing polls can be edited from the Poll Manager. To edit a poll, either click on the poll name in the Poll Manager or select the poll and then click the Edit icon on the Poll Manager toolbar. Regardless of which method you use, the system opens the Edit Poll dialogue. The Edit Poll dialogue is identical to the New Poll dialogue, with the same fields and requirements as discussed in the preceding section. To make changes to a poll, simply alter the desired fields in the Edit Poll dialogue and then click the Save or Apply icon on the toolbar. Any changes you have made are applied immediately. To delete one or more polls, follow these steps: 1. Open the Poll Manager. 2. Select one or more polls. 3. Click the Delete icon. Part III: Working with Components, Modules, and Plugins 336 Caution Deleting a poll is permanent and cannot be undone. Moreover, there is no confirmation dialogue — clicking the Delete icon immediately deletes the poll! Displaying Polls Although the poll component is used to set up and organize your polls, you must take additional steps to place the polls on the page. The question with the answer choices is displayed to front-end site visitors through the use of the Polls module. A summary of the results of one or more polls can be displayed inside the content area of pages by using the Poll Layout Content Item option under the Menu Item Manager. Cross-reference The creation of new menu items and the various Menu Item Types are discussed in Chapter 8. Using the Polls module The Polls module, like all other modules in your system, is created and controlled from within the Site Module Manager. A new Polls module can be created by clicking on the New icon on the tool- bar or, if you have installed the Joomla! sample data, you can modify the existing Polls module to suit your needs. Cross-Reference Turn to Chapter 20 for more information on creating and managing the various Site Modules. Figure 15.3 shows the default Polls module, with the Joomla! sample data loaded. The toolbar at the top of the Polls module dialogue provides quick access to the following functions: l Save: Click this icon to save changes made to the module and exit the Polls Module dialogue. l Apply: Click to save your work without exiting from the Polls module dialogue. This option lets you save without exiting the screen and it useful in case you are interrupted or you otherwise want to save yet keep working on this screen. l Cancel: Cancels the task and exits the Polls module. l Help: Displays the Help files related to the active screen. Chapter 15: Using the Polls Component 337 FIGURE 15.3 A poll displayed using the Polls module, shown here in the default configuration with the Joomla! sample data. The workspace on this dialogue has three sections labeled Details, Menu Assignment, and Parameters. The Details section of the Polls module includes the following fields: l Module Type: This field is determined by the system and is not editable. The label mod_poll tells you that this is a Polls module. l Title: The name of the module. l Show Title: If this control is set to Yes, the module title appears wherever the module appears on the front end of the web site. l Enabled: Set this control to Yes if you want the module to appear on the front end of your site. l Position: The combo box control is used to assign the module to one of the template’s module position holders. l Order: This field is only applicable if more than one module is assigned to the same mod- ule position, in which case this is used to control the ordering of the modules. Part III: Working with Components, Modules, and Plugins 338 l Access Level: Set the control for Public, Registered, or Special, depending upon which User Groups you want to be able to see the module. l ID: This internal ID field is set automatically by the system and cannot be edited. l Description: The description text is supplied by the system and cannot be edited. The Menu Assignment area, at the bottom left of the dialogue, shows a list of all the menus and menu items in the system. This control allows to you designate the pages where the module will appear. Module parameters On the right hand side of the Polls module dialogue is the parameters section. The controls here work closely in combination with the settings assigned in the Polls component to control the behavior of the polls on the page. The controls available are broken into two groups: Module parameters and Advanced parameters. The Module parameters are: l Poll: This control allows you to select the poll that will be displayed by the module. The list of polls reflects the polls created by the Polls component; it will only display those polls marked as published in the Polls component. l Module Class Suffix: Use this field to add a suffix to the CSS classes that relate to this module; this enables you to provide styling that affects only this specific module. The Advanced parameters are: l Caching: Set this control to specify whether this module follows the Global Caching set- tings (set in the Global Configuration Manager). l Cache Time: If you want to cache the contents of this module, enter an integer value here. The value represents the time, in seconds. Displaying multiple polls If you have created more than one poll with the Polls component, you can display them by using multiple modules. A Polls module displays one poll at a time, so displaying multiple polls requires having multiple modules. Running multiple modules allows you to match polls to appropriate page content or functionality or to show the same poll in different positions on different pages. Displaying poll results The results of a poll are shown in the content area of your site’s pages. The results of the current poll can be viewed by a site visitor by clicking on the results button on the Polls module. Clicking the results button takes the viewer to a page that shows the poll results in a graphical summary view. If there is more than one poll active on the site, the visitor will also see on the results page a combo box control that allows the visitors to switch between poll results. Chapter 15: Using the Polls Component 339 FIGURE 15.4 Poll results are displayed inside of the content area. You can also link directly to the poll results page by creating a new Menu Item and selecting the Poll Layout Content Item option. Figure 15.4 shows the poll output. To link directly to the poll results page from a menu, follow these steps: 1. Under the Menus menu, click the name of the menu where you want the link to the poll to appear. The Menu Item Manager loads in your browser. 2. Click the New icon on the toolbar. The New Menu Item dialogue opens. 3. Select the option Poll Layout from under the polls choice. The second page of the New Menu Item dialogue opens. 4. Give the item a Title. This field is required. 5. On the Poll parameters, select the name of the poll whose results appear by default. This field is required. 6. Select any other options you desire; all other fields are optional. 7. Click Save. The system creates the new menu item, closes the dialogue, and returns you to the Menu Item Manager. Part III: Working with Components, Modules, and Plugins 340 Note If your system contains multiple polls, the results of all will be available to viewers. There is no way to restrict the view to the results of only certain polls. The output will always display all published polls. Summary In this chapter, we covered the use of both the Polls component and the Polls module. You learned the following: l How to create, edit, and delete polls l How to configure the Poll Manager to work in concert with the Polls module l How to create a Polls module . box back to the default setting. The main content area of the screen contains a list of all the polls in your Joomla! site. The columns provided are: l # : An indexing number assigned by Joomla! . toolbar at the top of the Poll Manager. Figure 15 .2 shows the New Poll dialogue. Part III: Working with Components, Modules, and Plugins 334 FIGURE 15 .2 The New Poll dialogue. The toolbar at the. made to the module and exit the Polls Module dialogue. l Apply: Click to save your work without exiting from the Polls module dialogue. This option lets you save without exiting the screen and

Ngày đăng: 04/07/2014, 06:20

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan