Polls


PostNuke's built-in polling module provides a very quick and easy way to get feedback from your site users. It doesn't provide many options or features, but the simplicity is also an aid to lowering the maintenance needs of the module. You can see an immediate example of the Polls module by looking at your site's home page. In the right column, a default poll is created as part of your installation, titled "What do you think of PostNuke?"

Now, you can replace that demo poll with one of your own. Click the Polls link in the Administration Menu. The Polls Administration page appears, as shown in Figure 6.1.

Figure 6.1. Creating polls for your site.


This example assumes you are making a site about books. The poll will ask users what fiction genre they like the most. In the Poll Title text box, enter "What's your favorite fiction genre?" Set the Language to All so the poll will always appear. For each of the Option # text boxes, use the following entries:

  • Mystery

  • Science Fiction

  • Fantasy

  • Romance

  • Western

  • Historical

  • Other Fiction

Options 812 are still blank. You don't need to use all of the choice fields. Any extras left blank are automatically deleted. Now click the Create Poll button. The page refreshes and clears, and it might appear nothing has happened, but your poll has now been added to the system and made live automatically. Go back to your site's home page to see your new poll on the right. It should look similar to Figure 6.2.

Figure 6.2. Learning about your users.


You cannot schedule the poll; after it's submitted, it is live to the public and replaces whatever poll was previously live. The most recent poll is always displayed.

From the poll interface, users can also click Results or Polls. The Results link allows users to see the current poll numbers without first casting a vote. The Polls link returns a list of the older polls that users can view. They can see the results of those polls and even cast their own votes.

Tip

Like the article modules covered in Chapter 5, "Article Modules," you can also enable comments for the polls that allow users to talk about their choices in a thread beneath the results.


Advanced Polls

Advanced Polls is a third-party module developed by Mark West of the PostNuke development team. Version 1.1 is available with the online book materials, or you can check for a more current version of the module at Mark West's website (markwest.me.uk).

By decompressing the archive files, you see the module's files are already arranged in the folders modules/advanced_polls/. Copy the entire advanced polls directory to your server under your PostNuke modules directory.

When you regenerate your modules list, you see the Advanced Polls module near the top of the table. Select Initialize under the module actions to create the new database tables. Next click to Activate the module to make it available for use. The state should now read Active.

Back on the main Administration page, a new link and icon appear called Advanced Polls. Enter the Modules Management area and select the New Poll link. Though their basic functions are very similar, the Advanced Polls module clearly has a great deal more options (see Figure 6.3).

Figure 6.3. Adding an advanced poll.


The Date and Time fields allow you to schedule a poll's appearance. Through the Poll Authorization Method, you can manage or prevent duplicate votes by User ID, IP, or Cookie. Polls can be scheduled to recur automatically after expiration so your site can monitor the changing opinions of your visitors. In addition, you can configure exactly how a tie is handled in the results.

Create an advanced poll for comparison using the same data we applied earlier to the stock PostNuke Poll module: "What's your favorite fiction genre?" with the options:

  • Mystery

  • Science Fiction

  • Fantasy

  • Romance

  • Western

  • Historical

  • Other Fiction

Choose the other options as you see fit. They are fairly straightforward, and if you regularly use polls on your site, you should have no problems applying them all to other examples.

Your poll won't display without a block for an interface. So go to the Blocks Administration page and click the New Block link. Fill in the title for your poll and choose a position of Right for your block. The Advanced Polls module is chosen using the Block drop-down menu. Scroll to the bottom of the list and you see the following options:

  • advanced_polls/Show a Poll Displays your poll for voting; is identical to the core Poll block.

  • advanced_polls/Display List of Open Polls Allows users to have easy access to multiple active polls simultaneously.

  • advanced_polls/Show Results of the Most Recently Closed Poll Is great for sites that don't run an active poll regularly or for keeping important results posted.

  • advanced_polls/Warns if Poll Is Unanswered Prompts users to answer important polls.

For the standard poll, you use the first option. After the block is created, it has additional configuration options for you to manage. You can display a specific poll only, the latest poll, or a random poll from those you've created. From this screen, you can choose to display the poll based on its programmed dates, or you can override the dates and permanently display the block. Choose the set of options you want to test first, and commit the changes. You have now created a Poll block, such as the one in Figure 6.4.

Figure 6.4. Blocks let users access your poll.


Your block is added to the table and grouped with the other Right Position blocks. Notice the poll appears on the top of the listing (see Figure 6.4). All new blocks appear at the top of their position's list and must be moved to their permanent location.

Tip

If you are moving blocks around, or just setting up a new block you've just added, disable the block to take it offline. Then, site users cannot see the blocks moving around, and you can reactivate the block(s) after everything is in the correct place.


Now return to the home page and try out your new poll. It essentially acts much like the core Poll module, but the advanced system provides much greater control over how the poll functions.

pnESP

This third-party module gives you the ability to create a complete survey for site visitors, with multiple database-driven questions, custom permissions, and results analysis. pnESP's full name is the Easy Survey Package for PostNuke.

It is more advanced than the Advanced Polls module, but to be fair in the comparison, the difference in the modules is more that pnESP allows you to survey your users with depth. The two modules are applicable to different types of polling that for the most part do not overlap. Both can be installed and used at the same time to poll for different types of information.

pnESP 1.0 is provided with this text's materials, or you might want to check the module's website (pnesp.sourceforge.net) for the latest version. Decompress pnESP's files and copy them to your server's modules directory. After you regenerate your module list, you see the regular Initialize option for the new module. You do not have to activate pnESP after initialization; it does that part for you automatically.

Click the new pnESP Administration icon, and you see the full configuration for the module (see Figure 6.5). Options are divided into five sections:

Figure 6.5. Detailed surveys made easy.


  • Content Creates and manages user surveys

  • Configuration Configures pnESP module settings

  • Analysis Reviews and exports survey results

  • Permissions Changes survey access rights

  • Help Learns about module features and terms

pnESP does have a lengthy setup time to prepare a survey, and it is strongly recommended that you plan out all questions and answers, including question types and layout styles, before you even begin with pnESP. It will save you a lot of time.

pnESP surveys do not generally appear in side blocks; users reach the survey pages through links in blocks. By default, questions appear in one long page, as shown in Figure 6.6, but you can also add breaks to give each question its own view.

Figure 6.6. A survey with three sample questions.


When you create a new survey, it must be activated to become available for public display. After being activated, it cannot be edited. In this way, pnESP's mode system allows you to maintain professional surveys with clean results.

For the sake of space, this chapter does not cover this entire module's setup. The majority of questions you might have about the product are likely answered in its included documentation. Just walk through the creation of a new survey and you will quickly see how it can work for you. Extensive information is also included in the module's documentation files (/modules/pnESP/pndocs/).



    PostNuke Content Management
    PostNuke Content Management
    ISBN: 0672326868
    EAN: 2147483647
    Year: 2003
    Pages: 207
    Authors: Kevin Hatch

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net