Actions

J1.5

Difference between revisions of "Adding a new Poll"

From Joomla! Documentation

(Option 1: How to Publish Your Poll Using the Poll Module)
 
(16 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{inuse}}
 
 
 
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.  
 
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.  
  
Line 9: Line 7:
 
# Click the '''New''' toolbar button to create your poll.
 
# Click the '''New''' toolbar button to create your poll.
 
# Type the question that you wish to poll in the '''Title''' field .
 
# Type the question that you wish to poll in the '''Title''' field .
# Type an abbreviated title of your poll in the '''Alias''' field.  
+
# Type an abbreviated title of your poll in the '''Alias''' field.
 
# Change, if desired, the number of seconds between votes for each user in the '''Lag''' field.
 
# Change, if desired, the number of seconds between votes for each user in the '''Lag''' field.
# Select the '''No''' or '''Yes''' radio button to publish or not your poll.  
+
# Select the '''No''' or '''Yes''' radio button to publish or not your poll.
 
# Type in the '''Options''' fields the possible choices for the answers of your poll.
 
# Type in the '''Options''' fields the possible choices for the answers of your poll.
 
# Click the '''Save''' or '''Apply''' toolbar button to implement the new settings:
 
# Click the '''Save''' or '''Apply''' toolbar button to implement the new settings:
Line 19: Line 17:
 
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.
 
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.
  
==Option 1: How to Publish Your Poll Using the Poll Module==
+
==How to Publish Your Poll Using the Poll Module==
  
 
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.
 
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.
Line 32: Line 30:
 
# Select the '''No''' or '''Yes''' radio button to choose if your module title is published.
 
# Select the '''No''' or '''Yes''' radio button to choose if your module title is published.
 
# Select the '''No''' or '''Yes''' radio button to enable/publish your module to your site.
 
# Select the '''No''' or '''Yes''' radio button to enable/publish your module to your site.
# Select the module position from the drop down menu.  
+
# Select the module position from the drop down menu.
 
# 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
 
# 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
 
# Select the '''Access Level''' as to who is able to see this module on your Web site.
 
# Select the '''Access Level''' as to who is able to see this module on your Web site.
Line 59: Line 57:
 
# Click the '''New''' toolbar button to create a new menu item.
 
# Click the '''New''' toolbar button to create a new menu item.
 
# Select '''Poll> Poll Layout''' from the list of '''Select Menu Item Type'''
 
# Select '''Poll> Poll Layout''' from the list of '''Select Menu Item Type'''
 +
 +
'''Menu Item Details:'''
 +
 
# Type the title of your poll in the '''Title''' field.
 
# Type the title of your poll in the '''Title''' field.
 
# Type the abbreviated title in the '''Alias''' field.
 
# Type the abbreviated title in the '''Alias''' field.
 
# Leave the '''Link''' field as is. (??? - to verify)
 
# Leave the '''Link''' field as is. (??? - to verify)
# Select the menu from the '''Display In''' drop down menu that you wish to present your poll results.  
+
# Select the menu from the '''Display In''' drop down menu that you wish to present your poll results.
 
# Select the parent/child menu item as to where you wish your menu item to be located in the '''Parent Item''' drop down menu.
 
# Select the parent/child menu item as to where you wish your menu item to be located in the '''Parent Item''' drop down menu.
 +
# Select the '''No''' or '''Yes''' radio button to publish/unpublish your new menu item to your site.
 +
# New Menu Items default to the last place. Ordering can be changed after this Menu Item is saved in the '''Order''' drop down menu.
 +
# Select the '''Access Level''' as to who is able to see this module on your Web site.
 +
# 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)
  
button from the list of installed modules.
+
'''Parameters - Basic:'''
# Click the '''Next''' toolbar button
+
 
 +
# Select the poll from the '''Poll''' drop down menu.
 +
 
 +
'''Parameters - System'''
 +
 
 +
# Type (if needed) the page title. (If left blank, the menu item title will be used)
 +
# Select the '''No''' or '''Yes''' radio button to publish/unpublish your page title.
 +
# Type the CSS class of your page if different from the standard CSS class for pages.
 +
# Select from the '''Menu Image''' drop down menu an image that goes to the left or right of your menu item.
 +
# 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==
 +
 
 +
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<br>
 +
Edit this line of code at the end of the file
 +
<pre>
 +
parent::display($tpl);
 +
</pre>
 +
and changed it to this
 +
<pre>
 +
if ($_REQUEST['poll'] == "SHOW_RESULTS") parent::display($tpl);
 +
</pre>
 +
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
 +
<pre>
 +
?poll=SHOW_RESULTS
 +
</pre>
 +
* Use this if you do not have SEF URLs enabled
 +
<pre>
 +
&poll=SHOW_RESULTS
 +
</pre>
 +
For example, if your URL looks like this www.domain.com/index.php?option=com_content ...    add &poll=SHOW_RESULTS to the end<br>
 +
if your URL looks like this www.domain.com/my-poll ...  add ?poll=SHOW_RESULTS to the end<br>
 +
 
 +
 
 +
 
 +
<noinclude> </noinclude>
 +
 
 +
[[Category:Archived version Joomla! 1.5]]

Latest revision as of 18:16, 26 May 2013

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

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.


Contents

How to Create a Poll in the Poll Manager

  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

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

  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

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