DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Poll

Author:Christopher
Created:2010-12-18T19:57:23
Changed:2012-08-28T16:32:35.190000000
Classification:jk_poll
Description:The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) ----
Keywords:forEditors, forAdmins, forIntermediates
Author:Johannes Krausmüller
Email:johannes@krausmueller.de
Language:en

img-1 img-2 EXT: Poll

Extension Key: jk_poll

Language: en

Version: x.y.z

Keywords: forEditors, forAdmins, forIntermediates

Copyright 2006-2012, Johannes Krausmüller, <johannes@krausmueller.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.org

Table of Contents

`EXT: Poll 1 <#__RefHeading__5708_1738894311>`_

`Introduction 3 <#__RefHeading__5710_1738894311>`_

What does it do? 3

Screenshots 3

`Users manual 5 <#__RefHeading__467_413120346>`_

Installation 5

Creating a poll record 5

Inserting the plugin for displaying the poll 6

Allow comments on polls with extension comments 9

`Configuration 10 <#__RefHeading__947_309396046>`_

Upgrading to version 0.6+ 10

Upgrading to version 0.9+ 10

Using TSconfig to add poll to every page 10

Hiding fields in the backend for editors 12

Templates 12

Add additional colors for the poll bars 16

Multilanguage polls 16

RealURL 18

`To-Do list 19 <#__RefHeading__965_309396046>`_

`ChangeLog 20 <#__RefHeading__967_309396046>`_

Introduction

What does it do?

A poll based on the extension quickpoll. A template-file can be used to define the output in the frontend. It is also possible to create a horizontal or vertical display of the percentage of users voted for an answer. Visit http://www.krausmueller.de for some demos of the extension.

Screenshots

Vote for an answer:

img-3 The vertical result of the poll:

img-4 The horizontal result of the poll:

img-5 Users manual ------------

Installation

Use the extension manager to install the extension.

Creating a poll record

To start a poll you have to create a new poll record. To do so, choose a site which contains the records an use the click-menu to create a new one.

img-6 A form opens, showing a poll record:

img-7 There are fields where you can put a title, an image and your question. The important part is the textbox for your answers.

Every line describes an answer. The amount of votes for an answer are shown in the textbox “Votes”. When you set up the poll this box should be clear or have a value of “0“ for every answer. To define in which color the answer should be rendered you can use the field “Color”. As colors you can use by default blue, red, yellow, green and black. Other colors can also specified (see section Configuration). If you don't define a color the default one is taken from the plugin configuration.

Here is an example for a poll with some colors defined:

Answers:

yes
no
don't know

Colors:

green
blue
yellow

To allow votes only until a special day but to show the result of the poll after this day you can use the field “valid till” at the very beginning of the form. Votes are only possible until the day specified.

Inserting the plugin for displaying the poll

You now have to insert a plugin as pagecontent to the page the poll should be displayed on in the frontend. To do so, create a new pagecontent and select “Insert plugin” as type. In the drop-down box “Plugin” you have to select “Poll”. After this you can see a form like this:

img-8 If the page where you created the poll record isn't the same as the one where you inserted the plugin, you have to define the page with your poll record in the field “Startingpoint. If it is the same page, nothing special has to be done. Save the form and view the page on which you inserted the pagecontent (use the button “Save document and view page” on top of the form). You should now see your poll.

There are several options to configure your poll. They are separated in “General Settings” and “Template”.

General Settings:

What to display

Option

What to display

Description

You can select the values “POLL” or / and “LIST”. With “POLL” you display the newest poll. “LIST” shows a list of all polls located at the specified Startingpoint.

Template

Option

Template

Description

You can set a template-file which should be used in the rendering process of the poll, if you'd like to adopt the layout to your needs (see also Configuration).

CSS file

Option

CSS file

Description

You can set a CSS file which should be used in the rendering process of the poll, if you'd like to adopt the layout to your needs (see also Configuration).

Count votes for every language separately

Option

Count votes for every language separately

Description

If checked votes are counted for every language seperately. Otherwise votes from different languages are summarized.

Check if user can vote for every language separately

Option

Check if user can vote for every language separately

Description

If checked a user might vote for every language available. Otherwise the checks if a user can still vote (see General Settings) are considered for every language an the user can only vote once.

Poll:

First answer is checked by default

Option

First answer is checked by default

Description

The first answer is already checked. So the error of no answer selected cannot occur.

Allow to vote for more than one answer

Option

Allow to vote for more than one answer

Description

Users can vote for more than more answer at the same time (checkboxes are used instead of radio buttons).

Allow only fe_users to vote

Option

Allow only fe_users to vote

Description

Only Frontend users can vote for an answer (you could set the cookie value to “no” to disable cookies).

Check IP before vote is possible

Option

Check IP before vote is possible

Description

When selected the IP-addresses of the visitors who voted for an poll are saved. This can be used to prevent visitors to vote more than once when they disabled cookies.

Allow another vote after x hours

Option

Allow another vote after x hours

Description

Allows another vote from an IP logged as already voted after specified value of hours. To specify values different from full hours use numbers like 0.5 for half an hour (you have to use a dot, commas are not accepted. Only takes effect if “Check IP before vote is possible” is selected in the option before.

Use captcha (Extension Captcha is required)

Option

Use captcha (Extension Captcha is required)

Description

To vote for an answer the user has to insert a special string (see extension Captcha from Kasper).

Use comments (Extension comments is required)

Option

Use comments (Extension comments is required)

Description

Enables the use of the extension “comments” (adds GET parameters which can be used for configuration of comments). See section “Allow comments on polls with extension comments”.

Page to forward to after vote

Option

Page to forward to after vote

Description

Forward to specified page after successful vote.

Type

Option

Type

Description

Specifies the type of the poll. It can be chosen between horizontal and vertical (see screenshots in section Introduction).

Color

Option

Color

Description

The default color if no color is defined in the poll record. The same values as in the poll record can be used here. If no color is given the default is blue.

Path for images

Option

Path for images

Description

Specify path where images can be found (e.g.: fileadmin/template/images/). Default value is EXT:jk_poll/images/

Height/Width

Option

Height/Width

Description

The height or the width of the poll bar (depends on the type of the poll selected before). You should try some values to find one which suits you best.

Factor

Option

Factor

Description

The factor is used to stretch the poll bars. The size of the poll bars is the percentage of votes in pixel. Due to this fact they could be rather small, the factor is multiplied with the amount of pixels. A suitable value should be between 1 and 3.

Show zero percent as 1 pixel

Option

Show zero percent as 1 pixel

Description

If set, options with 0 percent are shown as 1px line in the result.

Render bars with CSS

Option

Render bars with CSS

Description

Renders the poll bars with the help of CSS instead of classic use of images.

Width (pixels) for Google Chart

Option

Width (pixels) for Google Chart

Description

Specify the width of the image generated with Google Chart.

Height (pixels) for Google Chart

Option

Height (pixels) for Google Chart

Description

Specify the height of the image generated with Google Chart.

Use comments (Extension comments is required), but only on RESULT view

Option

Use comments (Extension comments is required), but only on RESULT view

Description

Enables the use of the extension “comments” only for RESULT view (adds GET parameters which can be used for configuration of comments). ents” (adds GET parameters which can be used for configuration of comments). See section “Allow comments on polls with extension comments”.

Limit number of answers shown to the top

Option

Limit number of answers shown to the top

Description

Only show the specified number of answers which were most voted for. All other answers are combined in an additional answer “Others” (can be hidden with TypoScript).

LIST:

Amount of polls (LIST)

Option

Amount of polls (LIST)

Description

Limit the amount of shown polls to the inserted value.

Show first poll in LIST

Option

Show first poll in LIST

Description

Specifies if the newest poll should be shown in LIST or not.

Hide current poll

Option

Hide current poll

Description

Specifies if the current poll should be shown in LIST or not.

Allow votes for old polls in LIST

Option

Allow votes for old polls in LIST

Description

When selected it is possible to vote for an old poll located in the list.

Show pagebrowser in LIST (Extension pagebrowse required)

Option

Show pagebrowser in LIST (Extension pagebrowse required)

Description

Divides LIST of polls to several pages (pagebrowser) using the extension “pagebrowse” (must be installed).

Items per page (if using pagebrowser)

Option

Items per page (if using pagebrowser)

Description

Set the polls shown on one page to the inserted value when using the pagebrowser.

Show results in LIST

Option

Show results in LIST

Description

Show the result of the polls already in LIST view.

Page for single view (POLL)

Option

Page for single view (POLL)

Description

If you only selected the value “LIST” in the section “General Settings” you have to specify a page where a plugin with “POLL” exists, because the results of the polls will be displayed there. (Normally you should use the value “LIST” in connection with “POLL”).

Allow comments on polls with extension comments

To allow users to make comments on a poll record you can use the extension poll from the repository. Just install the extension 'comments' and insert a page record 'Commenting system' to the same page containing the poll plugin. Configure 'comments' according to the manual of the extension. In addition you have to configure jk_poll. You can choose if comments should be shown every time or only if the user already voted on the result page.

If comments should be shown also if the user hasn't already voted for the poll you use the option 'Use comments (Extension comments is required)' in the flexform or 'plugin.tx_jkpoll_pi1.comments = 1' when using TypoScript. In addition your configuration for the extension 'comments' would look like that:

plugin.tx_comments_pi1.prefixToTableMap.tx_jkpoll_pi1 = tx_jkpoll_poll
plugin.tx_comments_pi1.showUidMap.tx_jkpoll_pi1 = uid

To only show comments on the result page (if the user already voted) enable the option 'Use comments (Extension comments is required), but only on RESULT view' in the flexform or use 'plugin.tx_jkpoll_pi1.comments_on_result = 1' with TypoScript. The configuration for the extensions 'comments' looks like this:

plugin.tx_comments_pi1.prefixToTableMap.tx_jkpoll_pi1 = tx_jkpoll_poll
plugin.tx_comments_pi1.showUidMap.tx_jkpoll_pi1 = uid_comments

You might get into trouble when you use comments and caching. As a workaround try to disable the cache for the site which contains the comments plugin.

Configuration

Upgrading to version 0.6+

When you upgrade from a version older than 0.6 you have to convert your old poll records in order to to use them as before. You can do that update via the Extension Manager. Use the Extension Manager and select jk_poll. In the dropdown in the upper right select the item “UPDATE!”. The database will get updated and now your old poll records can be used again. If no update is necessary the item “UPDATE!” is not part of the dropdown.

img-9 Upgrading to version 0.9+ ^^^^^^^^^^^^^^^^^^^^^^^^^

When you upgrade from a version older than 0.9 and are using flexform for configuration of the poll plugin, all of these settings are lost. Since the structure of the flexform changed you have to configure it again. Configuration via TypoScript is not affected.

Using TSconfig to add poll to every page

You can also add the poll to every page of your website by using TypoScript. For this purpose most of the options in the frontend plugin are also available via TypoScript. A list of all options available is shown below:

plugin.tx_jkpoll_pi1.pid

Option

plugin.tx_jkpoll_pi1.pid

Description

The uid of the page containing the poll-records (equivalent to starting-point).

plugin.tx_jkpoll_pi1.template

Option

plugin.tx_jkpoll_pi1.template

Description

The path to the template which should be used (for example “fileadmin/test.htm”).

plugin.tx_jkpoll_pi1.css_file

Option

plugin.tx_jkpoll_pi1.css_file

Description

The path to the css file which should be used instead of the default one (e.g. “fileadmin/test.css”).

plugin.tx_jkpoll_pi1.type

Option

plugin.tx_jkpoll_pi1.type

Description

Select between vertical (0 - horizontal, 1 - vertical, 2 - Google Chart).

plugin.tx_jkpoll_pi1.factor

Option

plugin.tx_jkpoll_pi1.factor

Description

Factor to stretch the image resultbar, Default value is 1.

plugin.tx_jkpoll_pi1.show_zero_percent

Option

plugin.tx_jkpoll_pi1.show_zero_percent

Description

If set, options with 0 percent are shown as 1px line in the result (0 - disabled, 1 – enabled).

plugin.tx_jkpoll_pi1.list

Option

plugin.tx_jkpoll_pi1.list

Description

Show the list of polls (0 - disabled, 1 – enabled).

plugin.tx_jkpoll_pi1.list_first

Option

plugin.tx_jkpoll_pi1.list_first

Description

Show the newest poll in list (0 - disabled, 1 – enabled).

plugin.tx_jkpoll_pi1.hide_current

Option

plugin.tx_jkpoll_pi1.hide_current

Description

Don't show the current poll.

plugin.tx_jkpoll_pi1.list_limit

Option

plugin.tx_jkpoll_pi1.list_limit

Description

Only show amount of x polls.

plugin.tx_jkpoll_pi1.check_ip

Option

plugin.tx_jkpoll_pi1.check_ip

Description

Use IP-check (0 - disabled, 1 – enabled).

plugin.tx_jkpoll_pi1.check_ip_time

Option

plugin.tx_jkpoll_pi1.check_ip_time

Description

Time (in hours) after which a vote is possible again (if used IP- check).

plugin.tx_jkpoll_pi1.check_user

Option

plugin.tx_jkpoll_pi1.check_user

Description

Check for fe_users (0 - disabled, 1 – enabled).

plugin.tx_jkpoll_pi1.captcha

Option

plugin.tx_jkpoll_pi1.captcha

Description

Include captcha (0 - disabled, 1 – enabled).

plugin.tx_jkpoll_pi1.color

Option

plugin.tx_jkpoll_pi1.color

Description

Default color for the poll bars.

plugin.tx_jkpoll_pi1.path_to_images

Option

plugin.tx_jkpoll_pi1.path_to_images

Description

Alternative path to image files for the image resultbar with trailing slash. Default value is EXT:jk_poll/images/.

plugin.tx_jkpoll_pi1.image_type

Option

plugin.tx_jkpoll_pi1.image_type

Description

Specify another file extension for the image files (e.g. plugin.tx_jkpoll_pi1.image_type = png ). Default is gif.

plugin.tx_jkpoll_pi1.PIDforward

Option

plugin.tx_jkpoll_pi1.PIDforward

Description

Page ID of page to which should be forwarded after successful vote.

plugin.tx_jkpoll_pi1.first_answer_selected

Option

plugin.tx_jkpoll_pi1.first_answer_selected

Description

First answer is selected when showing the form to vote (0 - disabled, 1 – enabled).

plugin.tx_jkpoll_pi1.vote_language_specific

Option

plugin.tx_jkpoll_pi1.vote_language_specific

Description

Votes are counted for every language (0 - disabled, 1 - enabled). Default value is 0.

plugin.tx_jkpoll_pi1.check_language_specific

Option

plugin.tx_jkpoll_pi1.check_language_specific

Description

Check for users who already voted is language specific (0 - disabled, 1 - enabled). When enabled, users could vote one time for every language available. Default value is 0.

plugin.tx_jkpoll_pi1.comments

Option

plugin.tx_jkpoll_pi1.comments

Description

Enable compatibility with extension "comments" (0 - disabled, 1 – enabled)

plugin.tx_jkpoll_pi1.comments_on_result

Option

plugin.tx_jkpoll_pi1.comments_on_result

Description

Enable comments from extension "comments" only on result page. (0 - disabled, 1 – enabled)

plugin.tx_jkpoll_pi1.submitbutton_params

Option

plugin.tx_jkpoll_pi1.submitbutton_params

Description

Parameters to add to default submit button. (e.g. style=”padding- top:10px;”)

plugin.tx_jkpoll_pi1.custom_submit

Option

plugin.tx_jkpoll_pi1.custom_submit

Description

Define your own submit button. (e.g. "<input type="image" src="submit.png" />")

plugin.tx_jkpoll_pi1.show_css_bars

Option

plugin.tx_jkpoll_pi1.show_css_bars

Description

Use CSS to render the poll bars. (0 - disabled, 1 – enabled)

plugin.tx_jkpoll_pi1.google_width

Option

plugin.tx_jkpoll_pi1.google_width

Description

Width of the image created by Google chart.

plugin.tx_jkpoll_pi1.google_height

Option

plugin.tx_jkpoll_pi1.google_height

Description

Height of the image created by Google chart.

plugin.tx_jkpoll_pi1.result_limit

Option

plugin.tx_jkpoll_pi1.result_limit

Description

Only show specified amount of answers in RESULT view and one additional named “Other” which combines all other votes.

plugin.tx_jkpoll_pi1.result_limit_hide_other

Option

plugin.tx_jkpoll_pi1.result_limit_hide_other

Description

Hide the additional answer “Other” when limiting amount of answers.

plugin.tx_jkpoll_pi1.show_results_in_list

Option

plugin.tx_jkpoll_pi1.show_results_in_list

Description

Show result of polls in LIST view. (0 - disabled, 1 – enabled)

plugin.tx_jkpoll_pi1.answer_image_width

Option

plugin.tx_jkpoll_pi1.answer_image_width

Description

Width of the image associated with an answer.

plugin.tx_jkpoll_pi1.answer_image_height

Option

plugin.tx_jkpoll_pi1.answer_image_height

Description

Height of the image associated with an answer.

plugin.tx_jkpoll_pi1.pagebrowser

Option

plugin.tx_jkpoll_pi1.pagebrowser

Description

Use pagebrowser in LIST vie (extension “pagebrowse” must be installed).

plugin.tx_jkpoll_pi1.pagebrowser_items

Option

plugin.tx_jkpoll_pi1.pagebrowser_items

Description

Amount of polls shown on one page of pagebrowser.

plugin.tx_jkpoll_pi1.checkbox

Option

plugin.tx_jkpoll_pi1.checkbox

Description

Allow users to vote for more than only one answer by using checkboxes instead of radio buttons.

Hiding fields in the backend for editors

Because of many new features added the form for creating new polls might be confusing for editors. All fields are defined as Allowed excludefields and can be hidden for simplicity. Just configure your editor group and add only the fields which should be seen for your editors:

img-10 Templates ^^^^^^^^^

Templates Included

There are several templates included with this extension. A short list of them with description is provided in the table below. If no template is specified the file jk_poll.tmpl is used by default. You can specify another template via flexform or Tsconfig (e.g. plugin.tx_jkpoll_pi1.template=fileadmin/templates/test.htm).

jk_poll.tmpl

Filename

jk_poll.tmpl

Description

The default template of jk_poll.

jk_poll_images.tmpl

Filename

jk_poll_images.tmpl

Description

A template which can be used when adding a picture to every possible answer.

jk_poll_results_list.tmpl

Filename

jk_poll_results_list.tmpl

Description

A template which can be used when showing the results of polls in LIST view.

jk_poll_images_list.tmpl

Filename

jk_poll_images_list.tmpl

Description

A template which can be used to show the image(s) of the polls in LIST view.

CSS Classes used

The new template uses CSS for displaying your polls. The default CSS file is typo3conf/jk_poll/res/jk_poll.css. You can define your own css file via flexform or TSconfig (e.g. plugin.tx_jkpoll_pi1.css_file = fileadmin/templates/poll.css). If you don't want to use a CSS file at all, configure this option with “none”. Here is a short overview of the different class definitions of the default template you might like to change:

tx_jkpoll_pi1_image

CSS class

tx_jkpoll_pi1_image

Description

Class definition for image of the questiontext.

tx_jkpoll_pi1_answers

CSS class

tx_jkpoll_pi1_answers

Description

Class definition for block of possible answers when the user hasn't already voted.

tx_jkpoll_pi1_answer

CSS class

tx_jkpoll_pi1_answer

Description

Class definition for every single answer in the block from above.

tx_jkpoll_pi1_captcha

CSS class

tx_jkpoll_pi1_captcha

Description

Class definition for the section containing the captcha.

tx_jkpoll_pi1_result_votes

CSS class

tx_jkpoll_pi1_result_votes

Description

Class definition for line showing how many user voted.

tx_jkpoll_pi1_result_vertical

CSS class

tx_jkpoll_pi1_result_vertical

Description

Class definition for block of result when using vertical as type.

tx_jkpoll_pi1_answer_vertical

CSS class

tx_jkpoll_pi1_answer_vertical

Description

Class definition for every single answer in the RESULT view when using vertical as type.

tx_jkpoll_pi1_result_horizontal

CSS class

tx_jkpoll_pi1_result_horizontal

Description

Class definition for block of result when using horizontal as type.

tx_jkpoll_pi1_answer_horizontal

CSS class

tx_jkpoll_pi1_answer_horizontal

Description

Class definition for every single answer in the RESULT view when using horizontal as type.

tx_jkpoll_pi1_result_google

CSS class

tx_jkpoll_pi1_result_google

Description

Class definition for block of result when using google as type.

tx_jkpoll_pi1_answer_google

CSS class

tx_jkpoll_pi1_answer_google

Description

Class definition for every single answer in the RESULT view when using google as type.

tx_jkpoll_pi1_poll_list

CSS class

tx_jkpoll_pi1_poll_list

Description

Class definition for for list of old polls.

tx_jkpoll_pi1_result_list

CSS class

tx_jkpoll_pi1_result_list

Description

Class definition for result of polls in LIST view when using TSconfig plugin.tx_jkpoll_pi1.show_results_in_list=1.

Creating your own template

Besides the configuration of the plugin it is also possible to use your own template-file. If you don't specify your own template, something like the following might be used (actually it is an older version of the template used today):

<!-- ###POLL_HEADER### -->
<div>
<h1>###TITLE###</h1>
</div>
<div style="float:left; padding-right:10px;">
###QUESTION_IMAGE###
</div>
<div>
###QUESTIONTEXT###
</div>
<!-- ###POLL_HEADER### -->
<!-- ###POLL_VOTE### -->
<div>
<p>
<br />
<!-- ###ANSWER_VOTE### -->
###ANSWERTEXT_FORM### ###ANSWERTEXT_VALUE###<br />
<!-- ###ANSWER_VOTE### -->
<br />
###LINKLIST###<br /><br />
###SUBMIT###
</p>
</div>
<!-- ###POLL_VOTE### -->
<!-- ###POLL_ANSWER_VERTICAL### -->
<div>
<p>
<br />
Votes:&nbsp;###VOTES###<br /></p>
</div>
<!-- ###ANSWER_RESULT### -->
<div style="float:left; padding-right:10px;">###IMG_PERCENTAGE_RESULT###<p><br
/>###PERCENTAGE_RESULT###<br />###ANSWERTEXT_RESULT###<br />###AMOUNT_VOTES### Stimme(n)</p></div>
<!-- ###ANSWER_RESULT### -->
<div style="clear:both; padding-bottom:20px;"></div>
<!-- ###POLL_ANSWER_VERTICAL### -->
<!-- ###POLL_ANSWER_HORIZONTAL### -->
<div>
<p>
<br />
Votes:&nbsp;###VOTES###<br /></p>
<!-- ###ANSWER_RESULT### -->
<p>###IMG_PERCENTAGE_RESULT###<br
/>###PERCENTAGE_RESULT###&nbsp;&nbsp;###ANSWERTEXT_RESULT###&nbsp;&nbsp;###AMOUNT_VOTES### Stimme(n)</p>
<!-- ###ANSWER_RESULT### -->
</div>
<!-- ###POLL_ANSWER_HORIZONTAL### -->
<!-- ###POLL_LIST### -->
13EXT: Poll - jk_poll Configuration
<!-- ###POLL_LINK### -->
<p>###LINK###</p>
<!-- ###POLL_LINK### -->
<!-- ###POLL_LIST### -->

The template consists of different parts described in the table below.

<!-- ###POLL_HEADER### -->

Filename

<!-- ###POLL_HEADER### -->

Description

used to specify the layout of the question, markers represent the different formfields of the question in the poll record (see Users

Manual)

included Subparts/Markers

###TITLE###

the title of the poll

###QUESTION_IMAGE###

the image

###QUESTIONTEXT###

the text with your question

<!-- ###POLL_VOTE### -->

Filename

<!-- ###POLL_VOTE### -->

Description

specifies the layout of the possible answers people can vote for

included Subparts/Markers

<!-- ###ANSWER_VOTE### -->

repeated part for the different answers

<!--###SR_FREECAP_INSERT### -->

subpart needed when sr_freecap is used (otherwise subpart is replaced with nothing)

<!-- ###CAPTCHA_INSERT### -->

subpart needed when captcha is used (otherwise subpart is replaced with nothing)

###LINKLIST###

link to a list of old polls

###SUBMIT###

submit button

<!-- ###POLL_ANSWER_VERTICAL###

Filename

<!-- ###POLL_ANSWER_VERTICAL###

-->

Description

specifies the layout of the vertical layout

included Subparts/Markers

###VOTES###

the total amounts of registered votes

###VOTES_COUNT###

the total amount of people voted (not equal to ###VOTES### if users are allowed to vote for more than one answer)

<!-- ###ANSWER_RESULT### -->

repeated part for the different

answers represented by a poll bar

###IMG_PERCENTAGE_RESULT###

the percentage of votes as an image

###ANSWERTEXT_RESULT###

the text of the answer

###PERCENTAGE_RESULT###

the percentage of people voted for the answer

###EXPLANATION###

text shown as an explanation of the result after user voted

###LINKLIST###

link to a list of old polls

<!--

Filename

<!--

###POLL_ANSWER_HORIZONTAL###

-->

Description

specifies the layout of the horizontal layout

included Subparts/Markers

###VOTES###

the total amounts of registered votes

<!-- ###ANSWER_RESULT### -->

repeated part for the different answers represented by a poll bar

###IMG_PERCENTAGE_RESULT###

the percentage of votes as an image

###ANSWERTEXT_RESULT###

the text of the answer

###PERCENTAGE_RESULT###

the percentage of people voted for the answer

###EXPLANATION###

text shown as an explanation of the result after user voted

###LINKLIST###

link to a list of old polls

<!-- ###POLL_ANSWER_GOOGLE###

Filename

<!-- ###POLL_ANSWER_GOOGLE###

-->

Description

specifies the layout of the Google chart layout

included Subparts/Markers

###VOTES###

the total amounts of registered votes

###GOOGLE_CHART###

the percentage for every answer presented in a Google chart

<!-- ###ANSWER_RESULT### -->

repeated part for the different answers shown in the Google chart

###ANSWERTEXT_RESULT###

the text of the answer

###PERCENTAGE_RESULT###

the percentage of people voted for the answer

###EXPLANATION###

text shown as an explanation of the result after user voted

###LINKLIST###

link to a list of old polls

<!-- ###POLL_LIST### -->

Filename

<!-- ###POLL_LIST### -->

Description

specifies the layout of the list of all polls

included Subparts/Markers

<!-- ###POLL_LINK### -->

repeated part for the different links to poll

###LINK###

the link to a poll

<!-- ###POLL_RESULT### -->

subpart for showing the result of the poll already in list view

###RESULT###

the result of the poll

If you adopt the template to your needs you can only insert the the layout of the poll you'd like to use (vertical or horizontal). Of course you also do not need to use all of the markers (for example ###QUESTION_IMAGE###). But be aware that the subparts are needed.

Add additional colors for the poll bars

To add additional colors you can create a gif-file with a color you like which should have the dimension 1x1 pixels. Put the image to the folder images in the location you installed the extension (for local installation this should be typo3conf/ext/jk_poll/images). To specify your new color to an answer of your poll use the part before the “.gif” (for an image named “purple.gif” this would be purple) like described in the Users manual.

Multilanguage polls

To make jk_poll work with multiple languages on your site, follow the steps described below (same as in tt_news).

Open the sysfolder (or page) where your polls are located and create an “Alternative Page Language” for eachof your translations.

Use the list module and activate the “Localization view”.

img-11 Now you should see something like this:

img-12 Just click on the flag icon to create a new translation for your poll:

img-13 Some fields which are not necessary in the translation (like the image) are excluded. So you don't see them in the form.

After you made the translations for all poll records the list module could look like this:

img-14 If you use multiple languages for your polls you can choose if the votes are counted for every single poll (different amount of votes in every language) or if the votes are counted for the parent poll (the poll created in the default language). To do so you have to use the config described in the section “Using TSconfig to add poll to every page”. The votes are counted for the parent poll by default.

RealURL

If you use RealURL and you want to count votes for every language separately you might have to configure jk_poll for not setting cookies for the whole domain. You can do this only via TypoScript (see section “Using TSconfig to add poll to every page”):

plugin.tx_jkpoll_pi1.cookie_domainpath = 0

To-Do list

Work on integration of AJAX

ChangeLog

0.9.5

Version

0.9.5

Changes

Now shows correct answers in LIST view when using multiple languages (thanks to Daniel Sigrist).

Added feature to limit the amount of answers shown (e.g. only the top 3 answers most voted for).

Updated manual.

0.9.4

Version

0.9.4

Changes

Fixes a bug in CSS result view.

0.9.3

Version

0.9.3

Changes

Fixed bug when configuring cookies with TypoScript (thanks to Hicham Souiba for pointing out). Changed extension from USER back to USER_INT (prevents caching).

0.9.2

Version

0.9.2

Changes

Some minor bugfixes. Added french translation (thanks to Hugo Laporte).

0.9.1

Version

0.9.1

Changes

Added marker ###VOTES_COUNT###. Due to the fact that users may also vote for more than one answer, the amount of votes is not necessarily the amount of people voted. ###VOTES_COUNT### counts the people voted.

Change the type of the images for the poll bars to e.g. png via TypoScript with plugin.tx_jkpoll_pi1.image_type = png (gif is default). Thanks to Robert Heel for submitting a patch for this.

Restructured the form for creating a new poll record. First time users now should not be confused by too many form fields available.

0.9.0

Version

0.9.0

Changes

Option to let users select more than one answer when voting (uses checkboxes instead of radio buttons).

Marker ###QUESTION_IMAGE### also added to LIST view (height and width for the image can be set).

Added pagebrowser to LIST view (extension "pagebrowse" is required).

Added option for link from POLL view to RESULT view and back. So users can watch the result and then go back to vote for an answer (implementing this with AJAX perhaps will be done in the future).

0.8.2

Version

0.8.2

Changes

Change in form-tag to be XHTML 1.0 Strict compatible (thanks to Gernot Leitgab for the hint).

Included danish translation (thanks to Morten Nisker).

Changed manual to hopefully be rendered on typo3.org correctly.

0.8.0

Version

0.8.0

Changes

Added new template(s).

Possibility to add images and description to different answers (see additional template jk_poll_images.tmpl as example).

Show results of poll in LIST view (good template for this might still be needed).

Hide current poll in LIST view.

Added option to use CSS to display the result bars (thanks to Michaël DE BONA).

Added field explanation which is shown after the users vote and can be useful when creating a poll as kind of a quiz.

Added get parameters to make jk_poll work with extension comments (see http://www.krausmueller.de/en/detail/article/kommentare-zu- umfragen.html)

Updated manual.

0.7.0

Version

0.7.0

Changes

Changes submitted from Ralf Hettinger:

  • general code cleanup
  • handle enableFields (start- und endtime, hidden, deleted) using cObj->enablefields)
  • change use of time() to SIM_EXEC_TIME (makes simulating of times in frontend possible)
  • change sorting in backend to crdate (as displayed in the frontend)
  • labels for "no votes" and "one vote"
  • new options for TypoScript (explained in ext_typoscript_setup.txt and manual)

Added first experimental support of Google Chart API to display votes.

0.6.0

Version

0.6.0

Changes

Added support for multilanguage sites.

Added support for sr_freecap.

Other small improvements.

0.5.2

Version

0.5.2

Changes

Added feature to forward to a page after successful vote.

Added french translation (thanks to Grégory Duchesnes).

Small fix for the captcha-html output (thanks to Daniele Maffoli).

0.5.1

Version

0.5.1

Changes

Fixed a small issue in the LIST view.

0.5.0

Version

0.5.0

Changes

Security fixes for status 'reviewed'.

0.4.2

Version

0.4.2

Changes

Some minor changes.

0.4.1

Version

0.4.1

Changes

Added configuration for default color of the poll bars.

Added italian language (thanks to Claudio Strizzolo).

0.4.0

Version

0.4.0

Changes

Added some options to the image defined in the poll (like options for content element image).

Added new type result, which shows the result of the last poll record.

Added configuration for captcha via TSconfig.

0.3.6

Version

0.3.6

Changes

Changed the template to get valid XHTML output.

0.3.5

Version

0.3.5

Changes

Added configuration via TSconfig.

0.3.0

Version

0.3.0

Changes

Added a listing of the poll records to the Web > Page module.

Fixed a little bug in the html output (thanks to Peter Harlander).

Prevents FE users from voting again with "page reload" of the browser (if poll is only for FE users).

0.2.0

Version

0.2.0

Changes

Added possibility to only allow fe users to vote for an answer.

0.1.4

Version

0.1.4

Changes

Changed the template-file. Old one is still available (poll_old.tmpl).

Included support for captcha (extension Captcha is required).

Some small bugfixes.

0.1.0

Version

0.1.0

Changes

Added possibility to specify how long cookies should be set (also use of non-persistent cookies possible).

0.0.7

Version

0.0.7

Changes

Added possibility to vote also for old polls (configurable in Backend).

0.0.6

Version

0.0.6

Changes

Added possibility to check if visitor already voted by logging th IP.

Added possibility to list old polls and show results.

0.0.2 – 0.0.5

Version

0.0.2 – 0.0.5

Changes

Updated manual

0.0.1

Version

0.0.1

Changes

Added / Changed/ Caught error