The toolbar at the top of the Poll Manager provides quick access to the following functions: l Publish: Select one or more polls from the list and then click this icon to publish them..
Trang 1Using the Polls
Component
IN THIS CHAPTER
Introducing the Poll Manager Creating and managing polls Displaying polls
Joomla! 1.5.x includes a Polls component that enables you to create and
run polls and surveys for your site The Poll Manager allows for the
ation of single question polls with up to 12 answer choices You can
cre-ate and run multiple polls and you can view the results from one or more
polls in an easy- to- read chart format
The Polls component works in conjunction with the Polls module The
com-ponent handles the creation of the Poll content, while the module handles
the actual display of the polls You control the placement of the polls on the
page by assigning the module to the desired module position
Introducing the Poll Manager
The Poll Manager is the interface to the component You can use the Poll
Manager to create and manage all the polls on your web site To access
the manager, go to the Components menu and select the Polls option The
Poll Manager interface loads in your browser Figure 15.1 shows the Poll
Manager as it appears with the Joomla! sample data installed
Joomla! 1.6
There is no Polls component in Joomla! 1.6.
Trang 2FIGURE 15.1
The Poll Manager interface in Joomla! 1.5
The toolbar at the top of the Poll Manager provides quick access to the following functions:
l Publish: Select one or more polls from the list and then click this icon to publish them.
l Unpublish: Select one or more polls from the list and then click this icon to unpublish
them
l Delete: Select one or more polls from the list and then click this icon to delete the poll(s).
l Edit: Select a poll from the list and then click this icon to edit the poll details.
l New: Click to add a new poll.
l Help: Click to access the online Help files related to the active screen.
Below the toolbar and above the list of polls are two sorting and searching tools to help you man-age long lists of polls:
l The Filter field on the left works like a search box Type a word or phrase into the field
and then click Go The page reloads and displays the results of the search To clear the screen and return to a full listing, click the Reset button
Trang 3to 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
Trang 4FIGURE 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
Trang 5the 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.
Trang 6Deleting 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.