Login / Status
Go to:
typo3.com Home
TYPO3 Association Home
typo3.org Home
Certification
FLOW3
Bugtracker
Forge (Development Platform)
News
Buzz (TYPO3 Blogs)
Wiki
Mailing lists
TYPO3 Snippets
Search:
About
News
Community
Teams
Development
Extensions
Documentation
Download
Donate
Contact
Home
.
Documentation
.
Document Library
. Extension Manuals
Documentation
Document Library
Tutorials
Installation
Core Documentation
Extension Manuals
Wiki
API
Videos
Other resources
Mailing Lists
Sponsors
Poll
Copyright © by
Johannes Krausmueller
<
johannes@
no spam please
krausmueller.de
>
Published under the Open Content License available from
http://www.opencontent.org/opl.shtml
Table Of Contents
1.
EXT: Poll
1.1.
Introduction
What does it do?
Screenshots
1.2.
Users manual
Installation
Creating a poll record
Answers:yesno
don't know
Extension Manuals
Colors:
green
blue
yellow
Extension Manuals
Inserting the plugin for display
Allow comments on polls with extension comments
plugin.tx_comments_pi1.prefixToTableMap.tx_jkpoll_pi1 = tx_jkpoll_poll
plugin.tx_comments_pi1.showUidMap.tx_jkpoll_pi1 = uid
Extension Manuals
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:
Extension Manuals
plugin.tx_comments_pi1.prefixToTableMap.tx_jkpoll_pi1 = tx_jkpoll_poll
plugin.tx_comments_pi1.showUidMap.tx_jkpoll_pi1 = uid_comments
Extension Manuals
Extension Manuals
1.3.
Configuration
Upgrading to version 0.6+
Using TSconfig to add poll to every page
poll < plugin.tx_jkpoll_pi1
poll.pid = 5
poll.type = 1
poll.cookie = off
Extension Manuals
page.10.subparts.POLL < poll
Extension Manuals
Hiding fields in the backend for editors
Extension Manuals
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:
Extension Manuals
Extension Manuals
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).
Extension Manuals
CSS Classes used
Extension Manuals
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:
Extension Manuals
Extension Manuals
Creating your own template
<!-- ###POLL_HEADER### -->
<div>
<h1>###TITLE###</h1>
</div>
<div style="float:left; padding-right:10px;">
###QUESTION_IMAGE###
</div>
<div>
###QUESTIONTEXT###
</div>
<!-- ###POLL_HEADER### -->
Extension Manuals
Extension Manuals
<!-- ###POLL_VOTE### -->
<div>
<p>
<br />
<!-- ###ANSWER_VOTE### -->
###ANSWERTEXT_FORM### ###ANSWERTEXT_VALUE###<br />
<!-- ###ANSWER_VOTE### -->
<br />
###LINKLIST###<br /><br />
###SUBMIT###
</p>
</div>
<!-- ###POLL_VOTE### -->
Extension Manuals
Extension Manuals
<!-- ###POLL_ANSWER_VERTICAL### -->
<div>
<p>
<br />
Votes: ###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### -->
Extension Manuals
Extension Manuals
<!-- ###POLL_ANSWER_HORIZONTAL### -->
<div>
<p>
<br />
Votes: ###VOTES###<br /></p>
<!-- ###ANSWER_RESULT### -->
<p>###IMG_PERCENTAGE_RESULT###<br />###PERCENTAGE_RESULT### ###ANSWERTEXT_RESULT### ###AMOUNT_VOTES### Stimme(n)</p>
<!-- ###ANSWER_RESULT### -->
</div>
<!-- ###POLL_ANSWER_HORIZONTAL### -->
Extension Manuals
Extension Manuals
<!-- ###POLL_LIST### -->
<!-- ###POLL_LINK### -->
<p>###LINK###</p>
<!-- ###POLL_LINK### -->
<!-- ###POLL_LIST### -->
Extension Manuals
Extension Manuals
Extension Manuals
Add additional colors for the poll bars
Multilanguage polls
RealURL
Extension Manuals
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
1.4.
To-Do list
1.5.
Changelog
This document is related to version 0.8.0 of the extension jk_poll.