Actions

J1.5

Difference between revisions of "Adding a new Poll"

From Joomla! Documentation

(How to Publish Your Poll Results as a Menu Item)
 
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 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 65: Line 63:
 
# 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.
 
# Select the '''No''' or '''Yes''' radio button to publish/unpublish your new menu item to your site.
Line 86: Line 84:
 
# Select from the '''Menu Image''' drop down menu an image that goes to the left or right of your menu item.
 
# 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.
 
# 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 17:16, 26 May 2013