J1.5

Adding a new Poll

From Joomla! Documentation

Revision as of 18:15, 26 May 2013 by Wilsonge (talk | contribs) (removed Category:FAQ using HotCat)

The "J1.5" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

The Joomla! Poll Manager allows you to create polls using the multiple choice format on any of your Web site pages. They can be either published in a module position using the Poll module or in a menu item using the Poll component.


How to Create a Poll in the Poll Manager[edit]

  1. Log in to the Administrator back-end. To learn how to do this read: Logging in or out of the Administrator back-end.
  2. Click the Components> Polls menu item. You should see the Poll Manager screen.
  3. Click the New toolbar button to create your poll.
  4. Type the question that you wish to poll in the Title field .
  5. Type an abbreviated title of your poll in the Alias field.
  6. Change, if desired, the number of seconds between votes for each user in the Lag field.
  7. Select the No or Yes radio button to publish or not your poll.
  8. Type in the Options fields the possible choices for the answers of your poll.
  9. Click the Save or Apply toolbar button to implement the new settings:
    • The Save toolbar button will save your changes and return you to the Poll Manager.
    • The Apply button will save your changes but leave you in Poll [Edit]. You can then click Close if no other changes has been made or Save to leave this screen to return back to the Poll Manager.

You should now see the title of your Poll in the Poll Manager table. If you need to edit it, you can either double click the Poll Title or select the Poll by checking the check mark box and then click the Edit the toolbar button.

How to Publish Your Poll Using the Poll Module[edit]

In order for your visitors of your site to participate in your poll, you must now publish it in the Front-end of your site. You must first activate a new Poll module.

  1. Click the Extensions> Module Manager menu item to view the Module Manager screen.
  2. Click the New toolbar button to activate your new poll module.
  3. Select the Poll radio button from the list of installed modules.
  4. Click the Next toolbar button

Details:

  1. Type the title of your Poll module in the Title field.
  2. Select the No or Yes radio button to choose if your module title is published.
  3. Select the No or Yes radio button to enable/publish your module to your site.
  4. Select the module position from the drop down menu.
  5. Select the order that you want this module to appear on your web site if there are more than one module assigned to this position
  6. Select the Access Level as to who is able to see this module on your Web site.

Menu Assignment

  1. Select from the Menu radio buttons All, None or Select Menu Item(s) from the List. If you choose this last option, then...
  2. Select the Menu items to determine which pages you wish to appear your poll.

Parameters: Module Parameters

  1. Select the Poll from the drop down list
  2. Type the CSS class (if needed) that is included with your CSS file (Cascading Style Sheet). This class is determined by the author of your template.

Advanced Parameters

  1. Select Global or Cashing from the drop down Cashing menu.
    • Global is the setting you have for this module in the Global Configurations section of your Administrator site. (??? to verify)
    • Cashing is the setting for (??? What is this for?)
  1. Click the Save or Apply toolbar button to implement the new settings:

You can now visualize your work in the Front-end of your site.

How to Publish Your Poll Results as a Menu Item[edit]

  1. Click the Menu> Mainmenu (or other menu) menu item to view the Menu Item Manager: [mainmenu] screen.
  2. Click the New toolbar button to create a new menu item.
  3. Select Poll> Poll Layout from the list of Select Menu Item Type

Menu Item Details:

  1. Type the title of your poll in the Title field.
  2. Type the abbreviated title in the Alias field.
  3. Leave the Link field as is. (??? - to verify)
  4. Select the menu from the Display In drop down menu that you wish to present your poll results.
  5. Select the parent/child menu item as to where you wish your menu item to be located in the Parent Item drop down menu.
  6. Select the No or Yes radio button to publish/unpublish your new menu item to your site.
  7. New Menu Items default to the last place. Ordering can be changed after this Menu Item is saved in the Order drop down menu.
  8. Select the Access Level as to who is able to see this module on your Web site.
  9. Click from the On Click, Open in: items:
    • Parent Window with Browser Navigation (creates the link within your site with browser navigation)
    • New Window with with Browser Navigation (creates an external link with browser navigation)
    • New Window without Browser Navigation (creates an external link without browser navigation)

Parameters - Basic:

  1. Select the poll from the Poll drop down menu.

Parameters - System

  1. Type (if needed) the page title. (If left blank, the menu item title will be used)
  2. Select the No or Yes radio button to publish/unpublish your page title.
  3. Type the CSS class of your page if different from the standard CSS class for pages.
  4. Select from the Menu Image drop down menu an image that goes to the left or right of your menu item.
  5. Select the SSL Enabled radio button Off, Ignored or On. This selects whether or not this link should use SSL and the Secure Site URL.

You can now visualize your work in the Front-end of your site.

How to Show/Hide the Results of a Poll[edit]

Joomla shows the results to the users after they vote on a poll. In order to keep those results hidden, you have edited the file that displays these results. that file is located here: components/com_poll/views/poll/view.html.php
Edit this line of code at the end of the file

parent::display($tpl);

and changed it to this

if ($_REQUEST['poll'] == "SHOW_RESULTS") parent::display($tpl);

This will hide the poll results for everybody including you. If you want to see the results yourself, all you need to do is modify the URL to include. Simply follow the steps outlined in "How to Publish Your Poll Results as a Menu Item" above and after you open that page in your web browser, you will need to add this to the end of the URL

  • Use this if you have SEF URLs enabled
?poll=SHOW_RESULTS
  • Use this if you do not have SEF URLs enabled
&poll=SHOW_RESULTS

For example, if your URL looks like this www.domain.com/index.php?option=com_content ... add &poll=SHOW_RESULTS to the end
if your URL looks like this www.domain.com/my-poll ... add ?poll=SHOW_RESULTS to the end