├── .github └── FUNDING.yml ├── .gitignore ├── README.md ├── assets ├── .htaccess └── icon.png ├── classes └── Poll.php ├── composer.json ├── config ├── autoload.ini ├── autoload.php └── config.php ├── dca ├── tl_content.php ├── tl_module.php ├── tl_poll.php ├── tl_poll_option.php └── tl_poll_votes.php ├── docs ├── README.md └── images │ ├── content_element.png │ ├── module.png │ ├── poll_1.png │ ├── poll_reset.png │ ├── poll_votes.png │ └── preview.png ├── elements └── ContentPoll.php ├── languages ├── bg │ ├── default.php │ ├── modules.php │ ├── tl_content.php │ ├── tl_module.php │ ├── tl_poll.php │ ├── tl_poll_option.php │ └── tl_poll_votes.php ├── de │ ├── default.php │ ├── modules.php │ ├── tl_content.php │ ├── tl_module.php │ ├── tl_poll.php │ ├── tl_poll_option.php │ └── tl_poll_votes.php ├── en │ ├── default.php │ ├── modules.php │ ├── tl_content.php │ ├── tl_module.php │ ├── tl_poll.php │ ├── tl_poll_option.php │ └── tl_poll_votes.php ├── fa │ ├── default.php │ ├── modules.php │ ├── tl_content.php │ ├── tl_module.php │ ├── tl_poll.php │ ├── tl_poll_option.php │ └── tl_poll_votes.php ├── fr │ ├── default.php │ ├── modules.php │ ├── tl_content.php │ ├── tl_module.php │ ├── tl_poll.php │ ├── tl_poll_option.php │ └── tl_poll_votes.php ├── it │ ├── default.php │ ├── modules.php │ ├── tl_content.php │ ├── tl_module.php │ ├── tl_poll.php │ ├── tl_poll_option.php │ └── tl_poll_votes.php ├── lv │ ├── default.php │ ├── modules.php │ ├── tl_content.php │ ├── tl_module.php │ ├── tl_poll.php │ ├── tl_poll_option.php │ └── tl_poll_votes.php └── pl │ ├── default.php │ ├── modules.php │ ├── tl_content.php │ ├── tl_module.php │ ├── tl_poll.php │ ├── tl_poll_option.php │ └── tl_poll_votes.php ├── models ├── PollModel.php ├── PollOptionModel.php └── PollVotesModel.php ├── modules ├── ModulePoll.php └── ModulePollList.php └── templates ├── ce_poll.html5 ├── ce_poll.xhtml ├── mod_poll.html5 ├── mod_poll.xhtml ├── mod_polllist.html5 ├── mod_polllist.xhtml ├── poll_default.html5 └── poll_default.xhtml /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: codefog 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # PHPStorm 2 | .idea 3 | composer.lock 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Polls extension for Contao Open Source CMS 2 | 3 | ![](https://img.shields.io/packagist/v/codefog/contao-polls.svg) 4 | ![](https://img.shields.io/packagist/l/codefog/contao-polls.svg) 5 | ![](https://img.shields.io/packagist/dt/codefog/contao-polls.svg) 6 | 7 | Polls is an extension for the [Contao Open Source CMS](https://contao.org). 8 | 9 | Create and manage polls in Contao. It features single and multiple votes, poll protection, advanced behavior setup and more. 10 | It comes with an attractive backend interface - you can preview the percentage bar and browse all votes per each option. 11 | 12 | ![](docs/images/preview.png) 13 | 14 | ## Documentation 15 | 16 | [Read the documentation](docs/README.md) 17 | 18 | ## Copyright 19 | 20 | This project has been created and is maintained by [Codefog](https://codefog.pl). 21 | -------------------------------------------------------------------------------- /assets/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Order allow,deny 3 | Allow from all 4 | 5 | 6 | Require all granted 7 | -------------------------------------------------------------------------------- /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codefog/contao-polls/fedc14b702c24a5f5ff5227f8162cce35c5f22f0/assets/icon.png -------------------------------------------------------------------------------- /classes/Poll.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | namespace Polls; 15 | 16 | 17 | /** 18 | * Provide methods to handle polls. 19 | */ 20 | class Poll extends \Frontend 21 | { 22 | 23 | /** 24 | * Cookie name prefix 25 | * @var string 26 | */ 27 | protected $strCookie = 'CONTAO_POLL_'; 28 | 29 | /** 30 | * Current poll object 31 | * @var object 32 | */ 33 | protected $objPoll; 34 | 35 | 36 | /** 37 | * Initialize the object 38 | * @param integer 39 | */ 40 | public function __construct($intPoll) 41 | { 42 | parent::__construct(); 43 | 44 | $objPoll = \Database::getInstance()->prepare($this->getPollQuery('tl_poll')) 45 | ->limit(1) 46 | ->execute($intPoll); 47 | 48 | if ($objPoll->numRows) 49 | { 50 | $this->objPoll = $objPoll; 51 | } 52 | } 53 | 54 | 55 | /** 56 | * Return a poll property 57 | * @param string 58 | * @return mixed 59 | */ 60 | public function __get($strKey) 61 | { 62 | return isset($this->objPoll->$strKey) ? $this->objPoll->$strKey : null; 63 | } 64 | 65 | 66 | /** 67 | * Generate a poll and return it as HTML string 68 | * @return string 69 | */ 70 | public function generate() 71 | { 72 | if (!$this->objPoll->numRows || !$this->objPoll->options) 73 | { 74 | return ''; 75 | } 76 | 77 | $blnShowResults = false; 78 | $objTemplate = new \FrontendTemplate('poll_default'); 79 | $objTemplate->setData($this->objPoll->row()); 80 | 81 | $objTemplate->cssClass = ''; 82 | $objTemplate->message = ''; 83 | $objTemplate->showResults = $blnShowResults; 84 | $objTemplate->showForm = false; 85 | 86 | // Display a "login to vote" message 87 | if ($this->objPoll->protected && !FE_USER_LOGGED_IN) 88 | { 89 | $objTemplate->cssClass .= ' protected'; 90 | $objTemplate->mclass = 'info login'; 91 | $objTemplate->message = $GLOBALS['TL_LANG']['MSC']['loginToVote']; 92 | } 93 | 94 | $time = time(); 95 | $blnActive = ($this->objPoll->closed || (($this->objPoll->activeStart != '' && $this->objPoll->activeStart > $time) || ($this->objPoll->activeStop != '' && $this->objPoll->activeStop < $time))) ? false : true; 96 | $strFormId = 'poll_' . $this->objPoll->id; 97 | $objTemplate->title = $this->objPoll->title; 98 | $objTemplate->active = $blnActive; 99 | $objTemplate->cssClass .= $this->objPoll->featured ? ' featured' : ''; 100 | 101 | // Display a message if the poll is inactive 102 | if (!$blnActive) 103 | { 104 | $objTemplate->cssClass .= ' closed'; 105 | $objTemplate->mclass = 'info closed'; 106 | $objTemplate->message = $GLOBALS['TL_LANG']['MSC']['pollClosed']; 107 | } 108 | 109 | $blnHasVoted = $this->hasVoted(); 110 | 111 | // Display a confirmation message 112 | if ($_SESSION['POLL'][$this->objPoll->id] != '') 113 | { 114 | $blnJustVoted = true; 115 | $objTemplate->mclass = 'confirm'; 116 | $objTemplate->message = $_SESSION['POLL'][$this->objPoll->id]; 117 | unset($_SESSION['POLL'][$this->objPoll->id]); 118 | } 119 | 120 | $objTemplate->hasVoted = $blnHasVoted; 121 | 122 | // Check if we should display the results 123 | if (($blnActive && !$blnHasVoted && (($this->objPoll->active_behaviorNotVoted == 'opt1' && \Input::get('results') == $this->objPoll->id) || ($this->objPoll->active_behaviorNotVoted == 'opt3' && (!\Input::get('vote') || \Input::get('vote') != $this->objPoll->id)))) || ($blnActive && $blnHasVoted && (($this->objPoll->active_behaviorVoted == 'opt2' && \Input::get('results') == $this->objPoll->id) || ($this->objPoll->active_behaviorVoted == 'opt1' && ($blnJustVoted || !\Input::get('vote') || \Input::get('vote') != $this->objPoll->id)))) || (!$blnActive && !$blnHasVoted && (($this->objPoll->inactive_behaviorNotVoted == 'opt1' && \Input::get('results') == $this->objPoll->id) || ($this->objPoll->inactive_behaviorNotVoted == 'opt3' && (!\Input::get('vote') || \Input::get('vote') != $this->objPoll->id)))) || (!$blnActive && $blnHasVoted && (($this->objPoll->inactive_behaviorVoted == 'opt2' && \Input::get('results') == $this->objPoll->id) || ($this->objPoll->inactive_behaviorVoted == 'opt1' && (!\Input::get('vote') || \Input::get('vote') != $this->objPoll->id))))) 124 | { 125 | $blnShowResults = true; 126 | } 127 | 128 | $objOptions = \Database::getInstance()->prepare($this->getPollQuery('tl_poll_option')) 129 | ->execute($this->objPoll->id); 130 | 131 | // Display results under certain circumstances 132 | if ($blnShowResults) 133 | { 134 | $arrResults = array(); 135 | $intVotes = array_sum($objOptions->fetchEach('votes')); 136 | $objOptions->reset(); 137 | 138 | // Generate results 139 | while ($objOptions->next()) 140 | { 141 | $arrResults[] = array 142 | ( 143 | 'title' => $objOptions->title, 144 | 'votes' => $objOptions->votes, 145 | 'prcnt' => ($intVotes > 0) ? (round(($objOptions->votes / $intVotes), 2) * 100) : 0 146 | ); 147 | } 148 | 149 | $objTemplate->showResults = $blnShowResults; 150 | $objTemplate->total = $intVotes; 151 | $objTemplate->results = $arrResults; 152 | $objTemplate->formLink = ''; 153 | 154 | // Display the form link 155 | if ($blnActive && !$blnHasVoted) 156 | { 157 | $objTemplate->formLink = sprintf('%s', $this->generatePollUrl('vote'), specialchars($GLOBALS['TL_LANG']['MSC']['showForm']), $GLOBALS['TL_LANG']['MSC']['showForm']); 158 | } 159 | 160 | return $objTemplate->parse(); 161 | } 162 | 163 | // Generate options 164 | while ($objOptions->next()) 165 | { 166 | $arrOptions[$objOptions->id] = $objOptions->title; 167 | } 168 | 169 | // Options form field 170 | $arrField = array 171 | ( 172 | 'name' => 'options', 173 | 'options' => $arrOptions, 174 | 'inputType' => ($this->objPoll->type == 'single') ? 'radio' : 'checkbox', 175 | 'eval' => array('mandatory'=>true, 'disabled'=>$blnClosed) 176 | ); 177 | 178 | $doNotSubmit = false; 179 | $objWidget = new $GLOBALS['TL_FFL'][$arrField['inputType']]($this->prepareForWidget($arrField, $arrField['name'])); 180 | 181 | // Override the ID parameter to avoid ID duplicates for radio buttons and labels 182 | $objWidget->id = 'poll_' . $this->objPoll->id; 183 | 184 | // Validate the widget 185 | if (\Input::post('FORM_SUBMIT') == $strFormId && !\Input::post('results')) 186 | { 187 | $objWidget->validate(); 188 | 189 | if ($objWidget->hasErrors()) 190 | { 191 | $doNotSubmit = true; 192 | } 193 | } 194 | 195 | $objTemplate->showForm = true; 196 | $objTemplate->options = $objWidget; 197 | $objTemplate->submit = (!$blnActive || $blnHasVoted || ($this->objPoll->protected && !FE_USER_LOGGED_IN)) ? '' : $GLOBALS['TL_LANG']['MSC']['vote']; 198 | $objTemplate->action = ampersand(\Environment::get('request')); 199 | $objTemplate->formId = $strFormId; 200 | $objTemplate->hasError = $doNotSubmit; 201 | $objTemplate->resultsLink = ''; 202 | 203 | // Display the results link 204 | if (($blnActive && !$blnHasVoted && $this->objPoll->active_behaviorNotVoted == 'opt1') || ($blnActive && $blnHasVoted && $this->objPoll->active_behaviorVoted == 'opt2') || (!$blnActive && !$blnHasVoted && $this->objPoll->inactive_behaviorNotVoted == 'opt1') || (!$blnActive && $blnHasVoted && $this->objPoll->inactive_behaviorVoted == 'opt2')) 205 | { 206 | $objTemplate->resultsLink = sprintf('%s', $this->generatePollUrl('results'), specialchars($GLOBALS['TL_LANG']['MSC']['showResults']), $GLOBALS['TL_LANG']['MSC']['showResults']); 207 | } 208 | 209 | // Add the vote 210 | if (\Input::post('FORM_SUBMIT') == $strFormId && !$doNotSubmit) 211 | { 212 | if (!$blnActive || $blnHasVoted || ($this->objPoll->protected && !FE_USER_LOGGED_IN)) 213 | { 214 | $this->reload(); 215 | } 216 | 217 | $arrValues = is_array($objWidget->value) ? $objWidget->value : array($objWidget->value); 218 | 219 | // Set the cookie 220 | $this->setCookie($this->strCookie . $this->objPoll->id, $time, ($time + (365 * 86400))); 221 | 222 | // Store the votes 223 | foreach ($arrValues as $value) 224 | { 225 | $arrSet = array 226 | ( 227 | 'pid' => $value, 228 | 'tstamp' => $time, 229 | 'ip' => \Environment::get('ip'), 230 | 'member' => FE_USER_LOGGED_IN ? \FrontendUser::getInstance()->id : 0 231 | ); 232 | 233 | \Database::getInstance()->prepare("INSERT INTO tl_poll_votes %s")->set($arrSet)->execute(); 234 | } 235 | 236 | // Redirect or reload the page 237 | $_SESSION['POLL'][$this->objPoll->id] = $GLOBALS['TL_LANG']['MSC']['voteSubmitted']; 238 | $this->jumpToOrReload($this->jumpTo); 239 | } 240 | 241 | return $objTemplate->parse(); 242 | } 243 | 244 | 245 | /** 246 | * Determine whether the current user has already voted 247 | * @param integer 248 | * @return boolean 249 | */ 250 | public function hasVoted() 251 | { 252 | $intExpires = $this->objPoll->voteInterval ? (time() - $this->objPoll->voteInterval) : 0; 253 | 254 | // Check the cookie 255 | if (\Input::cookie($this->strCookie . $this->objPoll->id) > $intExpires) 256 | { 257 | return true; 258 | } 259 | 260 | if ($this->objPoll->protected && FE_USER_LOGGED_IN) 261 | { 262 | $objVote = \Database::getInstance()->prepare("SELECT * FROM tl_poll_votes WHERE member=? AND tstamp>? AND pid IN (SELECT id FROM tl_poll_option WHERE pid=?" . (!BE_USER_LOGGED_IN ? " AND published=1" : "") . ") ORDER BY tstamp DESC") 263 | ->limit(1) 264 | ->execute(\FrontendUser::getInstance()->id, $intExpires, $this->objPoll->id); 265 | } 266 | else 267 | { 268 | $objVote = \Database::getInstance()->prepare("SELECT * FROM tl_poll_votes WHERE ip=? AND tstamp>? AND pid IN (SELECT id FROM tl_poll_option WHERE pid=?" . (!BE_USER_LOGGED_IN ? " AND published=1" : "") . ") ORDER BY tstamp DESC") 269 | ->limit(1) 270 | ->execute(\Environment::get('ip'), $intExpires, $this->objPoll->id); 271 | } 272 | 273 | // User has already voted 274 | if ($objVote->numRows) 275 | { 276 | return true; 277 | } 278 | 279 | return false; 280 | } 281 | 282 | 283 | /** 284 | * Generate the poll URL and return it as string 285 | * @param string 286 | * @return string 287 | */ 288 | protected function generatePollUrl($strKey) 289 | { 290 | list($strPage, $strQuery) = explode('?', \Environment::get('request'), 2); 291 | $arrQuery = array(); 292 | 293 | // Parse the current query 294 | if ($strQuery != '') { 295 | $arrQuery = explode('&', $strQuery); 296 | 297 | // Remove the "vote" and "results" parameters 298 | foreach ($arrQuery as $k => $v) { 299 | list($key, $value) = explode('=', $v, 2); 300 | 301 | if ($key == 'vote' || $key == 'results') { 302 | unset($arrQuery[$k]); 303 | } 304 | } 305 | } 306 | 307 | // Add the key 308 | $arrQuery[] = $strKey . '=' . $this->objPoll->id; 309 | 310 | return ampersand($strPage . '?' . implode('&', $arrQuery)); 311 | } 312 | 313 | 314 | /** 315 | * Generate a select statement that includes translated fields 316 | * @param string 317 | * @param string 318 | * @return string 319 | */ 320 | protected function getPollQuery($strTable) 321 | { 322 | $blnMultilingual = self::checkMultilingual(); 323 | 324 | // Multilingual settings 325 | if ($blnMultilingual) 326 | { 327 | $arrFields = array(); 328 | $this->loadDataContainer($strTable); 329 | 330 | // Get translatable fields 331 | foreach ($GLOBALS['TL_DCA'][$strTable]['fields'] as $field => $arrData) 332 | { 333 | if ($arrData['eval']['translatableFor'] != '') 334 | { 335 | $arrFields[] = "IFNULL(t2." . $field . ", t1." . $field . ") AS " . $field; 336 | } 337 | } 338 | } 339 | 340 | // Build the query 341 | switch ($strTable) 342 | { 343 | case 'tl_poll': 344 | $strQuery = "SELECT *, (SELECT COUNT(*) FROM tl_poll_option WHERE pid=tl_poll.id) AS options FROM tl_poll WHERE id=?" . (!BE_USER_LOGGED_IN ? " AND published=1" : ""); 345 | 346 | if ($blnMultilingual) 347 | { 348 | $strQuery = "SELECT t1.*, " . implode(', ', $arrFields) . ", (SELECT COUNT(*) FROM tl_poll_option WHERE pid=t1.id) AS options FROM tl_poll t1 LEFT OUTER JOIN tl_poll t2 ON t1.id=t2.lid AND t2.language='" . $GLOBALS['TL_LANGUAGE'] . "' WHERE t1.lid=0 AND t1.id=?" . (!BE_USER_LOGGED_IN ? " AND t1.published=1" : ""); 349 | } 350 | break; 351 | 352 | case 'tl_poll_option': 353 | $strQuery = "SELECT *, (SELECT COUNT(*) FROM tl_poll_votes WHERE pid=tl_poll_option.id) AS votes FROM tl_poll_option WHERE pid=?" . (!BE_USER_LOGGED_IN ? " AND published=1" : "") . " ORDER BY sorting"; 354 | 355 | if ($blnMultilingual) 356 | { 357 | $strQuery = "SELECT t1.*, " . implode(', ', $arrFields) . ", (SELECT COUNT(*) FROM tl_poll_votes WHERE pid=t1.id) AS votes FROM tl_poll_option t1 LEFT OUTER JOIN tl_poll_option t2 ON t1.id=t2.lid AND t2.language='" . $GLOBALS['TL_LANGUAGE'] . "' WHERE t1.lid=0 AND t1.pid=?" . (!BE_USER_LOGGED_IN ? " AND t1.published=1" : "") . " ORDER BY t1.sorting"; 358 | } 359 | break; 360 | } 361 | 362 | return $strQuery; 363 | } 364 | 365 | 366 | /** 367 | * Check if there is DC_Multilingual installed 368 | * @return boolean 369 | */ 370 | public static function checkMultilingual() 371 | { 372 | return (file_exists(TL_ROOT . '/system/drivers/DC_Multilingual.php') && count(self::getAvailableLanguages()) > 1) ? true : false; 373 | } 374 | 375 | 376 | /** 377 | * Return a list of available languages 378 | * @return array 379 | */ 380 | public static function getAvailableLanguages() 381 | { 382 | $objDatabase = Database::getInstance(); 383 | return $objDatabase->execute("SELECT DISTINCT language FROM tl_page WHERE type='root'")->fetchEach('language'); 384 | } 385 | 386 | 387 | /** 388 | * Get a fallback language 389 | * @return string 390 | */ 391 | public static function getFallbackLanguage() 392 | { 393 | $objDatabase = Database::getInstance(); 394 | return $objDatabase->execute("SELECT language FROM tl_page WHERE type='root' AND fallback=1")->language; 395 | } 396 | } 397 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codefog/contao-polls", 3 | "description": "polls extension for Contao Open Source CMS", 4 | "keywords": ["contao", "poll", "polls", "survey"], 5 | "type": "contao-module", 6 | "license": "LGPL-3.0+", 7 | "authors": [ 8 | { 9 | "name": "Codefog", 10 | "homepage": "http://codefog.pl" 11 | } 12 | ], 13 | "require": { 14 | "php": ">=5.3.2", 15 | "contao/core-bundle":"~3.5 || ~4.1", 16 | "contao-community-alliance/composer-plugin":"^2.4.1 || ~3.0" 17 | }, 18 | "suggest" : { 19 | "terminal42/dc_multilingual": "Adds the multilingual features" 20 | }, 21 | "conflict": { 22 | "contao-legacy/polls": "*" 23 | }, 24 | "replace": { 25 | "contao-legacy/polls": "self.version" 26 | }, 27 | "extra": { 28 | "contao": { 29 | "sources": { 30 | "": "system/modules/polls" 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /config/autoload.ini: -------------------------------------------------------------------------------- 1 | ;; 2 | ; List modules which are required to be loaded beforehand 3 | ;; 4 | requires[] = "core" 5 | 6 | ;; 7 | ; Configure what you want the autoload creator to register 8 | ;; 9 | register_namespaces = false 10 | register_classes = false 11 | register_templates = false 12 | -------------------------------------------------------------------------------- /config/autoload.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Register a custom namespace 17 | */ 18 | ClassLoader::addNamespace('Polls'); 19 | 20 | 21 | /** 22 | * Register the classes 23 | */ 24 | ClassLoader::addClasses(array 25 | ( 26 | // Classes 27 | 'Polls\Poll' => 'system/modules/polls/classes/Poll.php', 28 | 29 | // Content elements 30 | 'Polls\ContentPoll' => 'system/modules/polls/elements/ContentPoll.php', 31 | 32 | // Models 33 | 'Polls\PollModel' => 'system/modules/polls/models/PollModel.php', 34 | 'Polls\PollOptionModel' => 'system/modules/polls/models/PollOptionModel.php', 35 | 'Polls\PollVotesModel' => 'system/modules/polls/models/PollVotesModel.php', 36 | 37 | // Modules 38 | 'Polls\ModulePoll' => 'system/modules/polls/modules/ModulePoll.php', 39 | 'Polls\ModulePollList' => 'system/modules/polls/modules/ModulePollList.php' 40 | )); 41 | 42 | 43 | /** 44 | * Register the templates 45 | */ 46 | TemplateLoader::addFiles(array 47 | ( 48 | 'ce_poll' => 'system/modules/polls/templates', 49 | 'mod_poll' => 'system/modules/polls/templates', 50 | 'mod_polllist' => 'system/modules/polls/templates', 51 | 'poll_default' => 'system/modules/polls/templates' 52 | )); 53 | -------------------------------------------------------------------------------- /config/config.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Extension version 17 | */ 18 | @define('POLLS_VERSION', '1.4'); 19 | @define('POLLS_BUILD', '0'); 20 | 21 | 22 | /** 23 | * Back end modules 24 | */ 25 | array_insert($GLOBALS['BE_MOD']['content'], 4, array 26 | ( 27 | 'polls' => array 28 | ( 29 | 'tables' => array('tl_poll', 'tl_poll_option', 'tl_poll_votes'), 30 | 'icon' => 'system/modules/polls/assets/icon.png', 31 | 'reset' => array('tl_poll_option', 'resetPoll') 32 | ) 33 | )); 34 | 35 | 36 | /** 37 | * Front end modules 38 | */ 39 | array_insert($GLOBALS['FE_MOD'], 4, array 40 | ( 41 | 'polls' => array 42 | ( 43 | 'poll' => 'ModulePoll', 44 | 'polllist' => 'ModulePollList' 45 | ) 46 | )); 47 | 48 | 49 | /** 50 | * Content elements 51 | */ 52 | $GLOBALS['TL_CTE']['includes']['poll'] = 'ContentPoll'; 53 | 54 | 55 | /** 56 | * Models 57 | */ 58 | $GLOBALS['TL_MODELS']['tl_poll'] = 'PollModel'; 59 | $GLOBALS['TL_MODELS']['tl_poll_option'] = 'PollOptionModel'; 60 | $GLOBALS['TL_MODELS']['tl_poll_votes'] = 'PollVotesModel'; 61 | -------------------------------------------------------------------------------- /dca/tl_content.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Add a palette to tl_content 17 | */ 18 | $GLOBALS['TL_DCA']['tl_content']['palettes']['poll'] = '{type_legend},type,headline;{include_legend},poll,poll_current;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space'; 19 | 20 | 21 | /** 22 | * Add a field to tl_content 23 | */ 24 | $GLOBALS['TL_DCA']['tl_content']['fields']['poll'] = array 25 | ( 26 | 'label' => &$GLOBALS['TL_LANG']['tl_content']['poll'], 27 | 'exclude' => true, 28 | 'inputType' => 'select', 29 | 'options_callback' => array('tl_content_poll', 'getPolls'), 30 | 'eval' => array('includeBlankOption'=>true, 'chosen'=>true, 'tl_class'=>'w50'), 31 | 'sql' => "int(10) unsigned NOT NULL default '0'" 32 | ); 33 | 34 | $GLOBALS['TL_DCA']['tl_content']['fields']['poll_current'] = array 35 | ( 36 | 'label' => &$GLOBALS['TL_LANG']['tl_content']['poll_current'], 37 | 'exclude' => true, 38 | 'inputType' => 'checkbox', 39 | 'eval' => array('tl_class'=>'w50 m12'), 40 | 'sql' => "char(1) NOT NULL default ''" 41 | ); 42 | 43 | 44 | /** 45 | * Provide miscellaneous methods that are used by the data configuration array. 46 | */ 47 | class tl_content_poll extends Backend 48 | { 49 | 50 | /** 51 | * Get all polls and return them as array 52 | * @return array 53 | */ 54 | public function getPolls() 55 | { 56 | $arrPolls = array(); 57 | $objPolls = $this->Database->execute("SELECT id, title FROM tl_poll" . (\Poll::checkMultilingual() ? " WHERE lid=0" : "") . " ORDER BY title"); 58 | 59 | while ($objPolls->next()) 60 | { 61 | $arrPolls[$objPolls->id] = $objPolls->title; 62 | } 63 | 64 | return $arrPolls; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /dca/tl_module.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Load tl_content language files and data container 17 | */ 18 | System::loadLanguageFile('tl_content'); 19 | $this->loadDataContainer('tl_content'); 20 | 21 | 22 | /** 23 | * Add palettes to tl_module 24 | */ 25 | $GLOBALS['TL_DCA']['tl_module']['palettes']['poll'] = '{title_legend},name,headline,type;{config_legend},poll,poll_current;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space'; 26 | $GLOBALS['TL_DCA']['tl_module']['palettes']['polllist'] = '{title_legend},name,headline,type;{config_legend},poll_active,poll_visible,poll_featured,numberOfItems,perPage;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space'; 27 | 28 | 29 | /** 30 | * Add fields to tl_module 31 | */ 32 | $GLOBALS['TL_DCA']['tl_module']['fields']['poll'] = array 33 | ( 34 | 'label' => &$GLOBALS['TL_LANG']['tl_content']['poll'], 35 | 'exclude' => true, 36 | 'inputType' => 'select', 37 | 'options_callback' => array('tl_content_poll', 'getPolls'), 38 | 'eval' => array('includeBlankOption'=>true, 'chosen'=>true, 'tl_class'=>'w50'), 39 | 'sql' => "int(10) unsigned NOT NULL default '0'" 40 | ); 41 | 42 | $GLOBALS['TL_DCA']['tl_module']['fields']['poll_current'] = array 43 | ( 44 | 'label' => &$GLOBALS['TL_LANG']['tl_content']['poll_current'], 45 | 'exclude' => true, 46 | 'inputType' => 'checkbox', 47 | 'eval' => array('tl_class'=>'w50 m12'), 48 | 'sql' => "char(1) NOT NULL default ''" 49 | ); 50 | 51 | $GLOBALS['TL_DCA']['tl_module']['fields']['poll_active'] = array 52 | ( 53 | 'label' => &$GLOBALS['TL_LANG']['tl_module']['poll_active'], 54 | 'default' => 'all', 55 | 'exclude' => true, 56 | 'inputType' => 'select', 57 | 'options' => array('all', 'yes', 'no'), 58 | 'reference' => &$GLOBALS['TL_LANG']['tl_module']['poll_active'], 59 | 'eval' => array('tl_class'=>'w50'), 60 | 'sql' => "varchar(4) NOT NULL default ''" 61 | ); 62 | 63 | $GLOBALS['TL_DCA']['tl_module']['fields']['poll_visible'] = array 64 | ( 65 | 'label' => &$GLOBALS['TL_LANG']['tl_module']['poll_visible'], 66 | 'default' => 'all', 67 | 'exclude' => true, 68 | 'inputType' => 'select', 69 | 'options' => array('all', 'yes', 'no'), 70 | 'reference' => &$GLOBALS['TL_LANG']['tl_module']['poll_visible'], 71 | 'eval' => array('tl_class'=>'w50'), 72 | 'sql' => "varchar(4) NOT NULL default ''" 73 | ); 74 | 75 | $GLOBALS['TL_DCA']['tl_module']['fields']['poll_featured'] = array 76 | ( 77 | 'label' => &$GLOBALS['TL_LANG']['tl_module']['poll_featured'], 78 | 'default' => 'all', 79 | 'exclude' => true, 80 | 'inputType' => 'select', 81 | 'options' => array('all', 'yes', 'no'), 82 | 'reference' => &$GLOBALS['TL_LANG']['tl_module']['poll_featured'], 83 | 'eval' => array('tl_class'=>'w50'), 84 | 'sql' => "varchar(4) NOT NULL default ''" 85 | ); 86 | -------------------------------------------------------------------------------- /dca/tl_poll.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Load tl_module language files 17 | */ 18 | System::loadLanguageFile('tl_module'); 19 | 20 | 21 | /** 22 | * Table tl_poll 23 | */ 24 | $GLOBALS['TL_DCA']['tl_poll'] = array 25 | ( 26 | 27 | // Config 28 | 'config' => array 29 | ( 30 | 'dataContainer' => 'Table', 31 | 'ctable' => array('tl_poll_option'), 32 | 'switchToEdit' => true, 33 | 'enableVersioning' => true, 34 | 'sql' => array 35 | ( 36 | 'keys' => array 37 | ( 38 | 'id' => 'primary' 39 | ) 40 | ) 41 | ), 42 | 43 | // List 44 | 'list' => array 45 | ( 46 | 'sorting' => array 47 | ( 48 | 'mode' => 1, 49 | 'fields' => array('title'), 50 | 'flag' => 1, 51 | 'panelLayout' => 'filter;search,limit', 52 | ), 53 | 'label' => array 54 | ( 55 | 'fields' => array('title'), 56 | 'format' => '%s', 57 | 'label_callback' => array('tl_poll', 'addStatus') 58 | ), 59 | 'global_operations' => array 60 | ( 61 | 'all' => array 62 | ( 63 | 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], 64 | 'href' => 'act=select', 65 | 'class' => 'header_edit_all', 66 | 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"' 67 | ) 68 | ), 69 | 'operations' => array 70 | ( 71 | 'edit' => array 72 | ( 73 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['edit'], 74 | 'href' => 'table=tl_poll_option', 75 | 'icon' => 'edit.gif', 76 | 'attributes' => 'class="contextmenu"' 77 | ), 78 | 'editheader' => array 79 | ( 80 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['editheader'], 81 | 'href' => 'act=edit', 82 | 'icon' => 'header.gif', 83 | 'attributes' => 'class="edit-header"' 84 | ), 85 | 'copy' => array 86 | ( 87 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['copy'], 88 | 'href' => 'act=copy', 89 | 'icon' => 'copy.gif' 90 | ), 91 | 'delete' => array 92 | ( 93 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['delete'], 94 | 'href' => 'act=delete', 95 | 'icon' => 'delete.gif', 96 | 'attributes' => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"' 97 | ), 98 | 'toggle' => array 99 | ( 100 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['toggle'], 101 | 'icon' => 'visible.gif', 102 | 'attributes' => 'onclick="Backend.getScrollOffset(); return AjaxRequest.toggleVisibility(this, %s);"', 103 | 'button_callback' => array('tl_poll', 'toggleIcon') 104 | ), 105 | 'feature' => array 106 | ( 107 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['feature'], 108 | 'icon' => 'featured.gif', 109 | 'attributes' => 'onclick="Backend.getScrollOffset(); return AjaxRequest.toggleFeatured(this, %s);"', 110 | 'button_callback' => array('tl_poll', 'iconFeatured') 111 | ), 112 | 'show' => array 113 | ( 114 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['show'], 115 | 'href' => 'act=show', 116 | 'icon' => 'show.gif' 117 | ) 118 | ) 119 | ), 120 | 121 | // Palettes 122 | 'palettes' => array 123 | ( 124 | 'default' => '{title_legend},title,type,voteInterval,protected,featured,active_behaviorNotVoted,active_behaviorVoted,inactive_behaviorNotVoted,inactive_behaviorVoted;{redirect_legend:hide},jumpTo;{publish_legend},published,closed,activeStart,activeStop,showStart,showStop' 125 | ), 126 | 127 | // Fields 128 | 'fields' => array 129 | ( 130 | 'id' => array 131 | ( 132 | 'sql' => "int(10) unsigned NOT NULL auto_increment" 133 | ), 134 | 'tstamp' => array 135 | ( 136 | 'sql' => "int(10) unsigned NOT NULL default '0'" 137 | ), 138 | 'lid' => array 139 | ( 140 | 'sql' => "int(10) unsigned NOT NULL default '0'" 141 | ), 142 | 'language' => array 143 | ( 144 | 'sql' => "varchar(2) NOT NULL default ''" 145 | ), 146 | 'title' => array 147 | ( 148 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['title'], 149 | 'exclude' => true, 150 | 'search' => true, 151 | 'inputType' => 'text', 152 | 'eval' => array('mandatory'=>true, 'maxlength'=>255), 153 | 'sql' => "varchar(255) NOT NULL default ''" 154 | ), 155 | 'type' => array 156 | ( 157 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['type'], 158 | 'default' => 'single', 159 | 'exclude' => true, 160 | 'inputType' => 'select', 161 | 'options' => array('single', 'multiple'), 162 | 'reference' => &$GLOBALS['TL_LANG']['tl_poll']['type'], 163 | 'eval' => array('tl_class'=>'w50'), 164 | 'sql' => "varchar(8) NOT NULL default ''" 165 | ), 166 | 'voteInterval' => array 167 | ( 168 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['voteInterval'], 169 | 'default' => 86400, 170 | 'exclude' => true, 171 | 'inputType' => 'text', 172 | 'eval' => array('rgxp'=>'digit', 'tl_class'=>'w50'), 173 | 'sql' => "int(10) unsigned NOT NULL default '0'" 174 | ), 175 | 'protected' => array 176 | ( 177 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['protected'], 178 | 'exclude' => true, 179 | 'filter' => true, 180 | 'inputType' => 'checkbox', 181 | 'eval' => array('tl_class'=>'w50'), 182 | 'sql' => "char(1) NOT NULL default ''" 183 | ), 184 | 'featured' => array 185 | ( 186 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['featured'], 187 | 'exclude' => true, 188 | 'filter' => true, 189 | 'inputType' => 'checkbox', 190 | 'eval' => array('tl_class'=>'w50'), 191 | 'sql' => "char(1) NOT NULL default ''" 192 | ), 193 | 'active_behaviorNotVoted' => array 194 | ( 195 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['active_behaviorNotVoted'], 196 | 'default' => 'opt1', 197 | 'exclude' => true, 198 | 'inputType' => 'select', 199 | 'options' => array('opt1', 'opt2', 'opt3'), 200 | 'reference' => &$GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted'], 201 | 'eval' => array('tl_class'=>'w50'), 202 | 'sql' => "varchar(4) NOT NULL default ''" 203 | ), 204 | 'active_behaviorVoted' => array 205 | ( 206 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['active_behaviorVoted'], 207 | 'default' => 'opt1', 208 | 'exclude' => true, 209 | 'inputType' => 'select', 210 | 'options' => array('opt1', 'opt2', 'opt3'), 211 | 'reference' => &$GLOBALS['TL_LANG']['tl_poll']['behaviorVoted'], 212 | 'eval' => array('tl_class'=>'w50'), 213 | 'sql' => "varchar(4) NOT NULL default ''" 214 | ), 215 | 'inactive_behaviorNotVoted' => array 216 | ( 217 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorNotVoted'], 218 | 'default' => 'opt1', 219 | 'exclude' => true, 220 | 'inputType' => 'select', 221 | 'options' => array('opt1', 'opt2', 'opt3'), 222 | 'reference' => &$GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted'], 223 | 'eval' => array('tl_class'=>'w50'), 224 | 'sql' => "varchar(4) NOT NULL default ''" 225 | ), 226 | 'inactive_behaviorVoted' => array 227 | ( 228 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorVoted'], 229 | 'default' => 'opt1', 230 | 'exclude' => true, 231 | 'inputType' => 'select', 232 | 'options' => array('opt1', 'opt2', 'opt3'), 233 | 'reference' => &$GLOBALS['TL_LANG']['tl_poll']['behaviorVoted'], 234 | 'eval' => array('tl_class'=>'w50'), 235 | 'sql' => "varchar(4) NOT NULL default ''" 236 | ), 237 | 'jumpTo' => array 238 | ( 239 | 'label' => &$GLOBALS['TL_LANG']['tl_module']['jumpTo'], 240 | 'exclude' => true, 241 | 'filter' => true, 242 | 'inputType' => 'pageTree', 243 | 'eval' => array('fieldType'=>'radio', 'tl_class'=>'clr'), 244 | 'sql' => "int(10) unsigned NOT NULL default '0'" 245 | ), 246 | 'published' => array 247 | ( 248 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['published'], 249 | 'exclude' => true, 250 | 'filter' => true, 251 | 'inputType' => 'checkbox', 252 | 'eval' => array('doNotCopy'=>true, 'tl_class'=>'w50'), 253 | 'sql' => "char(1) NOT NULL default ''" 254 | ), 255 | 'closed' => array 256 | ( 257 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['closed'], 258 | 'exclude' => true, 259 | 'filter' => true, 260 | 'inputType' => 'checkbox', 261 | 'eval' => array('doNotCopy'=>true, 'tl_class'=>'w50'), 262 | 'sql' => "char(1) NOT NULL default ''" 263 | ), 264 | 'activeStart' => array 265 | ( 266 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['activeStart'], 267 | 'exclude' => true, 268 | 'search' => true, 269 | 'flag' => 8, 270 | 'inputType' => 'text', 271 | 'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'), 272 | 'sql' => "varchar(10) NOT NULL default ''" 273 | ), 274 | 'activeStop' => array 275 | ( 276 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['activeStop'], 277 | 'exclude' => true, 278 | 'search' => true, 279 | 'flag' => 8, 280 | 'inputType' => 'text', 281 | 'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'), 282 | 'sql' => "varchar(10) NOT NULL default ''" 283 | ), 284 | 'showStart' => array 285 | ( 286 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['showStart'], 287 | 'exclude' => true, 288 | 'search' => true, 289 | 'flag' => 8, 290 | 'inputType' => 'text', 291 | 'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'), 292 | 'sql' => "varchar(10) NOT NULL default ''" 293 | ), 294 | 'showStop' => array 295 | ( 296 | 'label' => &$GLOBALS['TL_LANG']['tl_poll']['showStop'], 297 | 'exclude' => true, 298 | 'search' => true, 299 | 'flag' => 8, 300 | 'inputType' => 'text', 301 | 'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'), 302 | 'sql' => "varchar(10) NOT NULL default ''" 303 | ) 304 | ) 305 | ); 306 | 307 | 308 | /** 309 | * Provide support for DC_Multilingual 310 | */ 311 | if (\Poll::checkMultilingual()) 312 | { 313 | $GLOBALS['TL_DCA']['tl_poll']['config']['dataContainer'] = 'Multilingual'; 314 | $GLOBALS['TL_DCA']['tl_poll']['config']['languages'] = Poll::getAvailableLanguages(); 315 | $GLOBALS['TL_DCA']['tl_poll']['config']['pidColumn'] = 'lid'; 316 | $GLOBALS['TL_DCA']['tl_poll']['config']['fallbackLang'] = Poll::getFallbackLanguage(); 317 | 318 | // Make "title" field translatable 319 | $GLOBALS['TL_DCA']['tl_poll']['fields']['title']['eval']['translatableFor'] = '*'; 320 | } 321 | 322 | 323 | /** 324 | * Provide miscellaneous methods that are used by the data configuration array. 325 | */ 326 | class tl_poll extends Backend 327 | { 328 | 329 | /** 330 | * Add the poll status 331 | * @param array 332 | * @param string 333 | * @return string 334 | */ 335 | public function addStatus($arrRow, $strLabel) 336 | { 337 | if ($arrRow['closed']) 338 | { 339 | $strLabel .= ' [' . $GLOBALS['TL_LANG']['tl_poll']['closedPoll'] . ']'; 340 | } 341 | 342 | return $strLabel; 343 | } 344 | 345 | 346 | /** 347 | * Return the "feature/unfeature element" button 348 | * @param array 349 | * @param string 350 | * @param string 351 | * @param string 352 | * @param string 353 | * @param string 354 | * @return string 355 | */ 356 | public function iconFeatured($row, $href, $label, $title, $icon, $attributes) 357 | { 358 | if (strlen($this->Input->get('fid'))) 359 | { 360 | $this->toggleFeatured($this->Input->get('fid'), ($this->Input->get('state') == 1)); 361 | $this->redirect($this->getReferer()); 362 | } 363 | 364 | $href .= '&fid='.$row['id'].'&state='.($row['featured'] ? '' : 1); 365 | 366 | if (!$row['featured']) 367 | { 368 | $icon = 'featured_.gif'; 369 | } 370 | 371 | return ''.$this->generateImage($icon, $label).' '; 372 | } 373 | 374 | 375 | /** 376 | * Feature/unfeature a poll 377 | * @param integer 378 | * @param boolean 379 | * @return string 380 | */ 381 | public function toggleFeatured($intId, $blnVisible) 382 | { 383 | $this->createInitialVersion('tl_poll', $intId); 384 | 385 | // Trigger the save_callback 386 | if (is_array($GLOBALS['TL_DCA']['tl_poll']['fields']['featured']['save_callback'])) 387 | { 388 | foreach ($GLOBALS['TL_DCA']['tl_poll']['fields']['featured']['save_callback'] as $callback) 389 | { 390 | $this->import($callback[0]); 391 | $blnVisible = $this->$callback[0]->$callback[1]($blnVisible, $this); 392 | } 393 | } 394 | 395 | // Update the database 396 | $this->Database->prepare("UPDATE tl_poll SET tstamp=". time() .", featured='" . ($blnVisible ? 1 : '') . "' WHERE id=?") 397 | ->execute($intId); 398 | 399 | $this->createNewVersion('tl_poll', $intId); 400 | } 401 | 402 | 403 | /** 404 | * Return the "toggle visibility" button 405 | * @param array 406 | * @param string 407 | * @param string 408 | * @param string 409 | * @param string 410 | * @param string 411 | * @return string 412 | */ 413 | public function toggleIcon($row, $href, $label, $title, $icon, $attributes) 414 | { 415 | if (strlen($this->Input->get('tid'))) 416 | { 417 | $this->toggleVisibility($this->Input->get('tid'), ($this->Input->get('state') == 1)); 418 | $this->redirect($this->getReferer()); 419 | } 420 | 421 | $href .= '&tid='.$row['id'].'&state='.($row['published'] ? '' : 1); 422 | 423 | if (!$row['published']) 424 | { 425 | $icon = 'invisible.gif'; 426 | } 427 | 428 | return ''.$this->generateImage($icon, $label).' '; 429 | } 430 | 431 | 432 | /** 433 | * Publish/unpublish a poll 434 | * @param integer 435 | * @param boolean 436 | */ 437 | public function toggleVisibility($intId, $blnVisible) 438 | { 439 | $this->createInitialVersion('tl_poll', $intId); 440 | 441 | // Trigger the save_callback 442 | if (is_array($GLOBALS['TL_DCA']['tl_poll']['fields']['published']['save_callback'])) 443 | { 444 | foreach ($GLOBALS['TL_DCA']['tl_poll']['fields']['published']['save_callback'] as $callback) 445 | { 446 | $this->import($callback[0]); 447 | $blnVisible = $this->$callback[0]->$callback[1]($blnVisible, $this); 448 | } 449 | } 450 | 451 | // Update the database 452 | $this->Database->prepare("UPDATE tl_poll SET tstamp=". time() .", published='" . ($blnVisible ? 1 : '') . "' WHERE id=?") 453 | ->execute($intId); 454 | 455 | $this->createNewVersion('tl_poll', $intId); 456 | } 457 | } 458 | -------------------------------------------------------------------------------- /dca/tl_poll_option.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Table tl_poll_option 17 | */ 18 | $GLOBALS['TL_DCA']['tl_poll_option'] = array 19 | ( 20 | 21 | // Config 22 | 'config' => array 23 | ( 24 | 'dataContainer' => 'Table', 25 | 'ptable' => 'tl_poll', 26 | 'ctable' => array('tl_poll_votes'), 27 | 'enableVersioning' => true, 28 | 'sql' => array 29 | ( 30 | 'keys' => array 31 | ( 32 | 'id' => 'primary', 33 | 'pid' => 'index' 34 | ) 35 | ) 36 | ), 37 | 38 | // List 39 | 'list' => array 40 | ( 41 | 'sorting' => array 42 | ( 43 | 'mode' => 4, 44 | 'fields' => array('sorting'), 45 | 'headerFields' => array('title', 'tstamp', 'published'), 46 | 'child_record_callback' => array('tl_poll_option', 'listPollOptions') 47 | ), 48 | 'global_operations' => array 49 | ( 50 | 'reset' => array 51 | ( 52 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_option']['reset'], 53 | 'href' => 'key=reset', 54 | 'icon' => 'delete.gif', 55 | 'attributes' => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['tl_poll_option']['reset'][2] . '\')) return false; Backend.getScrollOffset();"' 56 | ), 57 | 'all' => array 58 | ( 59 | 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], 60 | 'href' => 'act=select', 61 | 'class' => 'header_edit_all', 62 | 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"' 63 | ) 64 | ), 65 | 'operations' => array 66 | ( 67 | 'edit' => array 68 | ( 69 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_option']['edit'], 70 | 'href' => 'act=edit', 71 | 'icon' => 'edit.gif' 72 | ), 73 | 'copy' => array 74 | ( 75 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_option']['copy'], 76 | 'href' => 'act=copy', 77 | 'icon' => 'copy.gif' 78 | ), 79 | 'delete' => array 80 | ( 81 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_option']['delete'], 82 | 'href' => 'act=delete', 83 | 'icon' => 'delete.gif', 84 | 'attributes' => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"' 85 | ), 86 | 'toggle' => array 87 | ( 88 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_option']['toggle'], 89 | 'icon' => 'visible.gif', 90 | 'attributes' => 'onclick="Backend.getScrollOffset(); return AjaxRequest.toggleVisibility(this, %s);"', 91 | 'button_callback' => array('tl_poll_option', 'toggleIcon') 92 | ), 93 | 'show' => array 94 | ( 95 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_option']['show'], 96 | 'href' => 'act=show', 97 | 'icon' => 'show.gif' 98 | ), 99 | 'votes' => array 100 | ( 101 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_option']['votes'], 102 | 'href' => 'table=tl_poll_votes', 103 | 'icon' => 'system/modules/polls/assets/icon.png' 104 | ) 105 | ) 106 | ), 107 | 108 | // Palettes 109 | 'palettes' => array 110 | ( 111 | 'default' => '{title_legend},title,published' 112 | ), 113 | 114 | // Fields 115 | 'fields' => array 116 | ( 117 | 'id' => array 118 | ( 119 | 'sql' => "int(10) unsigned NOT NULL auto_increment" 120 | ), 121 | 'pid' => array 122 | ( 123 | 'foreignKey' => 'tl_poll.title', 124 | 'sql' => "int(10) unsigned NOT NULL default '0'" 125 | ), 126 | 'tstamp' => array 127 | ( 128 | 'sql' => "int(10) unsigned NOT NULL default '0'" 129 | ), 130 | 'sorting' => array 131 | ( 132 | 'sql' => "int(10) unsigned NOT NULL default '0'" 133 | ), 134 | 'lid' => array 135 | ( 136 | 'sql' => "int(10) unsigned NOT NULL default '0'" 137 | ), 138 | 'language' => array 139 | ( 140 | 'sql' => "varchar(2) NOT NULL default ''" 141 | ), 142 | 'title' => array 143 | ( 144 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_option']['title'], 145 | 'exclude' => true, 146 | 'inputType' => 'text', 147 | 'eval' => array('mandatory'=>true, 'maxlength'=>255, 'tl_class'=>'w50'), 148 | 'sql' => "varchar(255) NOT NULL default ''" 149 | ), 150 | 'published' => array 151 | ( 152 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_option']['published'], 153 | 'exclude' => true, 154 | 'inputType' => 'checkbox', 155 | 'eval' => array('doNotCopy'=>true, 'tl_class'=>'w50 m12'), 156 | 'sql' => "char(1) NOT NULL default ''" 157 | ) 158 | ) 159 | ); 160 | 161 | 162 | /** 163 | * Provide support for DC_Multilingual 164 | */ 165 | if (\Poll::checkMultilingual()) 166 | { 167 | $GLOBALS['TL_DCA']['tl_poll_option']['config']['dataContainer'] = 'Multilingual'; 168 | $GLOBALS['TL_DCA']['tl_poll_option']['config']['languages'] = Poll::getAvailableLanguages(); 169 | $GLOBALS['TL_DCA']['tl_poll_option']['config']['pidColumn'] = 'lid'; 170 | $GLOBALS['TL_DCA']['tl_poll_option']['config']['fallbackLang'] = Poll::getFallbackLanguage(); 171 | 172 | // Make "title" field translatable 173 | $GLOBALS['TL_DCA']['tl_poll_option']['fields']['title']['eval']['translatableFor'] = '*'; 174 | } 175 | 176 | 177 | /** 178 | * Provide miscellaneous methods that are used by the data configuration array. 179 | */ 180 | class tl_poll_option extends Backend 181 | { 182 | 183 | /** 184 | * Reset the poll and purge all votes 185 | */ 186 | public function resetPoll() 187 | { 188 | if (\Input::get('key') != 'reset') 189 | { 190 | $this->redirect($this->getReferer()); 191 | } 192 | 193 | $this->Database->prepare("DELETE FROM tl_poll_votes WHERE pid IN (SELECT id FROM tl_poll_option WHERE pid=?)")->execute(\Input::get('id')); 194 | $this->redirect(str_replace('&key=reset', '', \Environment::get('request'))); 195 | } 196 | 197 | 198 | /** 199 | * List poll options 200 | * @param array 201 | * @return string 202 | */ 203 | public function listPollOptions($arrRow) 204 | { 205 | static $intTotal; 206 | 207 | // Get the total number of votes 208 | if ($intTotal === null) 209 | { 210 | $intTotal = $this->Database->prepare("SELECT COUNT(*) AS total FROM tl_poll_votes WHERE pid IN (SELECT id FROM tl_poll_option WHERE pid=?)") 211 | ->execute($arrRow['pid']) 212 | ->total; 213 | } 214 | 215 | $intVotes = $this->Database->prepare("SELECT COUNT(*) AS total FROM tl_poll_votes WHERE pid=?") 216 | ->execute($arrRow['id']) 217 | ->total; 218 | 219 | $width = $intTotal ? (round(($intVotes / $intTotal), 2) * 200) : 0; 220 | $prcnt = $intTotal ? (round(($intVotes / $intTotal), 2) * 100) : 0; 221 | 222 | if (version_compare(VERSION, '4.4', '>=')) { 223 | $height = 16; 224 | } else { 225 | $height = 14; 226 | } 227 | 228 | return '
' . $prcnt . ' %
' . $arrRow['title'] . ' [' . sprintf((($intVotes == 1) ? $GLOBALS['TL_LANG']['tl_poll_option']['voteSingle'] : $GLOBALS['TL_LANG']['tl_poll_option']['votePlural']), $intVotes) . ']
'; 229 | } 230 | 231 | 232 | /** 233 | * Return the "toggle visibility" button 234 | * @param array 235 | * @param string 236 | * @param string 237 | * @param string 238 | * @param string 239 | * @param string 240 | * @return string 241 | */ 242 | public function toggleIcon($row, $href, $label, $title, $icon, $attributes) 243 | { 244 | if (strlen($this->Input->get('tid'))) 245 | { 246 | $this->toggleVisibility($this->Input->get('tid'), ($this->Input->get('state') == 1)); 247 | $this->redirect($this->getReferer()); 248 | } 249 | 250 | $href .= '&tid='.$row['id'].'&state='.($row['published'] ? '' : 1); 251 | 252 | if (!$row['published']) 253 | { 254 | $icon = 'invisible.gif'; 255 | } 256 | 257 | return ''.$this->generateImage($icon, $label).' '; 258 | } 259 | 260 | 261 | /** 262 | * Publish/unpublish a poll option 263 | * @param integer 264 | * @param boolean 265 | */ 266 | public function toggleVisibility($intId, $blnVisible) 267 | { 268 | $this->createInitialVersion('tl_poll_option', $intId); 269 | 270 | // Trigger the save_callback 271 | if (is_array($GLOBALS['TL_DCA']['tl_poll_option']['fields']['published']['save_callback'])) 272 | { 273 | foreach ($GLOBALS['TL_DCA']['tl_poll_option']['fields']['published']['save_callback'] as $callback) 274 | { 275 | $this->import($callback[0]); 276 | $blnVisible = $this->$callback[0]->$callback[1]($blnVisible, $this); 277 | } 278 | } 279 | 280 | // Update the database 281 | $this->Database->prepare("UPDATE tl_poll_option SET tstamp=". time() .", published='" . ($blnVisible ? 1 : '') . "' WHERE id=?") 282 | ->execute($intId); 283 | 284 | $this->createNewVersion('tl_poll_option', $intId); 285 | } 286 | } 287 | -------------------------------------------------------------------------------- /dca/tl_poll_votes.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Table tl_poll_votes 17 | */ 18 | $GLOBALS['TL_DCA']['tl_poll_votes'] = array 19 | ( 20 | 21 | // Config 22 | 'config' => array 23 | ( 24 | 'dataContainer' => 'Table', 25 | 'ptable' => 'tl_poll_option', 26 | 'closed' => true, 27 | 'doNotCopyRecords' => true, 28 | 'notEditable' => true, 29 | 'onload_callback' => array 30 | ( 31 | array('tl_poll_votes', 'filterItemsByParent') 32 | ), 33 | 'sql' => array 34 | ( 35 | 'keys' => array 36 | ( 37 | 'id' => 'primary', 38 | 'pid' => 'index' 39 | ) 40 | ) 41 | ), 42 | 43 | // List 44 | 'list' => array 45 | ( 46 | 'sorting' => array 47 | ( 48 | 'mode' => 1, 49 | 'fields' => array('tstamp'), 50 | 'flag' => 12, 51 | 'panelLayout' => 'filter;search,limit', 52 | ), 53 | 'label' => array 54 | ( 55 | 'fields' => array('tstamp', 'ip', 'member'), 56 | 'showColumns' => true, 57 | 'label_callback' => array('tl_poll_votes', 'addMemberUsername') 58 | ), 59 | 'global_operations' => array 60 | ( 61 | 'all' => array 62 | ( 63 | 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], 64 | 'href' => 'act=select', 65 | 'class' => 'header_edit_all', 66 | 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"' 67 | ) 68 | ), 69 | 'operations' => array 70 | ( 71 | 'delete' => array 72 | ( 73 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_votes']['delete'], 74 | 'href' => 'act=delete', 75 | 'icon' => 'delete.gif', 76 | 'attributes' => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"' 77 | ), 78 | 'show' => array 79 | ( 80 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_votes']['show'], 81 | 'href' => 'act=show', 82 | 'icon' => 'show.gif' 83 | ) 84 | ) 85 | ), 86 | 87 | // Fields 88 | 'fields' => array 89 | ( 90 | 'id' => array 91 | ( 92 | 'sql' => "int(10) unsigned NOT NULL auto_increment" 93 | ), 94 | 'pid' => array 95 | ( 96 | 'foreignKey' => 'tl_poll_option.title', 97 | 'sql' => "int(10) unsigned NOT NULL default '0'" 98 | ), 99 | 'tstamp' => array 100 | ( 101 | 'sql' => "int(10) unsigned NOT NULL default '0'" 102 | ), 103 | 'tstamp' => array 104 | ( 105 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_votes']['tstamp'], 106 | 'exclude' => true, 107 | 'filter' => true, 108 | 'flag' => 8, 109 | 'sql' => "int(10) unsigned NOT NULL default '0'" 110 | ), 111 | 'ip' => array 112 | ( 113 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_votes']['ip'], 114 | 'exclude' => true, 115 | 'filter' => true, 116 | 'search' => true, 117 | 'sql' => "varchar(16) NOT NULL default ''" 118 | ), 119 | 'member' => array 120 | ( 121 | 'label' => &$GLOBALS['TL_LANG']['tl_poll_votes']['member'], 122 | 'exclude' => true, 123 | 'filter' => true, 124 | 'search' => true, 125 | 'foreignKey' => 'tl_member.username', 126 | 'reference' => array(0=>$GLOBALS['TL_LANG']['tl_poll_votes']['anonymous']), 127 | 'sql' => "int(10) unsigned NOT NULL default '0'" 128 | ) 129 | ) 130 | ); 131 | 132 | 133 | /** 134 | * Provide miscellaneous methods that are used by the data configuration array. 135 | */ 136 | class tl_poll_votes extends Backend 137 | { 138 | 139 | /** 140 | * Limit the displayed items so filter panel can handle things correctly 141 | */ 142 | public function filterItemsByParent() 143 | { 144 | $GLOBALS['TL_DCA']['tl_poll_votes']['list']['sorting']['root'] = $this->Database->prepare("SELECT id FROM tl_poll_votes WHERE pid=?")->execute($this->Input->get('id'))->fetchEach('id'); 145 | } 146 | 147 | 148 | /** 149 | * Add a member username 150 | * @param array 151 | * @param string 152 | * @param DataContainer 153 | * @param array 154 | * @return string 155 | */ 156 | public function addMemberUsername($row, $label, DataContainer $dc, $args) 157 | { 158 | if ($row['member']) 159 | { 160 | $objMember = $this->Database->prepare("SELECT * FROM tl_member WHERE id=?") 161 | ->execute($row['member']); 162 | 163 | if ($objMember->numRows) 164 | { 165 | $args[2] = '' . $objMember->username . ' (ID ' . $row['member'] . ')'; 166 | } 167 | } 168 | 169 | return $args; 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Polls – Documentation 2 | 3 | ## Setup a poll 4 | 5 | To setup a new poll go to the `Polls` module and create a new record. The poll configuration form has many options, 6 | but they are prefilled with the ready-to-use values. 7 | 8 | Starting from the top, you can first choose the type of the poll. It can be a `single vote (radio)` or `multiple vote 9 | (checkbox)` poll. Next value that should be set is the `vote interval` - this is the time in seconds after which the user 10 | can vote again. The poll can be also protected as well as featured. 11 | 12 | Next important thing is the behavior configuration. Here you have to set how the poll behaves after user has or has not 13 | voted. The most optimal behavior has been set as the default, but you can adjust it to your needs anytime. 14 | 15 | To automate the publishing polls task, you can enter values in the special fields at the bottom: `show form and show until`. 16 | What's more, you can decide when the poll will be active (i.e. accepting votes) and when it should display the results. 17 | 18 | ![](images/poll_1.png) 19 | 20 | Once you are done with the poll configuration, you have to create the poll options. Each option has the percentage bar 21 | displaying the current amount of the votes. You can also view and manage the votes using the `Votes` button in every row. 22 | 23 | ![](images/poll_votes.png) 24 | 25 | ## Put on the website 26 | 27 | When the poll is ready, you can put it on the website in two ways: content element or front end module. 28 | Configuration of both is the same - you can either choose the poll manually or let the script find the current one 29 | (based on poll settings). 30 | 31 | ![](images/content_element.png) 32 | 33 | There's also a front end module called `Poll list`. It can be used to generate the polls archive, list of the current polls, 34 | list of the featured polls, etc. Items can be limited and paginated as well. 35 | 36 | ![](images/content_module.png) 37 | 38 | ## Reset the poll 39 | 40 | After all tests you can easily reset all poll votes using the `Reset poll` button at the top of the page: 41 | 42 | ![](images/poll_reset.png) 43 | -------------------------------------------------------------------------------- /docs/images/content_element.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codefog/contao-polls/fedc14b702c24a5f5ff5227f8162cce35c5f22f0/docs/images/content_element.png -------------------------------------------------------------------------------- /docs/images/module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codefog/contao-polls/fedc14b702c24a5f5ff5227f8162cce35c5f22f0/docs/images/module.png -------------------------------------------------------------------------------- /docs/images/poll_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codefog/contao-polls/fedc14b702c24a5f5ff5227f8162cce35c5f22f0/docs/images/poll_1.png -------------------------------------------------------------------------------- /docs/images/poll_reset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codefog/contao-polls/fedc14b702c24a5f5ff5227f8162cce35c5f22f0/docs/images/poll_reset.png -------------------------------------------------------------------------------- /docs/images/poll_votes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codefog/contao-polls/fedc14b702c24a5f5ff5227f8162cce35c5f22f0/docs/images/poll_votes.png -------------------------------------------------------------------------------- /docs/images/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codefog/contao-polls/fedc14b702c24a5f5ff5227f8162cce35c5f22f0/docs/images/preview.png -------------------------------------------------------------------------------- /elements/ContentPoll.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | namespace Polls; 15 | 16 | 17 | /** 18 | * Content element "poll". 19 | */ 20 | class ContentPoll extends \Module 21 | { 22 | 23 | /** 24 | * Template 25 | * @var string 26 | */ 27 | protected $strTemplate = 'ce_poll'; 28 | 29 | 30 | /** 31 | * Display a wildcard in the back end 32 | * @return string 33 | */ 34 | public function generate() 35 | { 36 | if (TL_MODE == 'BE') 37 | { 38 | $objTemplate = new \BackendTemplate('be_wildcard'); 39 | 40 | $objTemplate->wildcard = '### POLL ###'; 41 | $objTemplate->title = $this->headline; 42 | $objTemplate->id = $this->id; 43 | $objTemplate->link = $this->name; 44 | $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; 45 | 46 | return $objTemplate->parse(); 47 | } 48 | 49 | // Return if there is no poll 50 | if (!$this->poll && !$this->poll_current) 51 | { 52 | return ''; 53 | } 54 | 55 | return parent::generate(); 56 | } 57 | 58 | 59 | /** 60 | * Generate the module 61 | */ 62 | protected function compile() 63 | { 64 | $intPoll = $this->poll; 65 | 66 | // Try to find the current poll 67 | if ($this->poll_current) 68 | { 69 | $time = time(); 70 | $objCurrentPoll = $this->Database->prepare("SELECT id FROM tl_poll WHERE (showStart='' OR showStart?)" . (!BE_USER_LOGGED_IN ? " AND published=1" : "") . " ORDER BY showStart DESC, activeStart DESC") 71 | ->limit(1) 72 | ->execute($time, $time); 73 | 74 | if ($objCurrentPoll->numRows) 75 | { 76 | $intPoll = $objCurrentPoll->id; 77 | } 78 | } 79 | 80 | // Return if there is no poll 81 | if (!$intPoll) 82 | { 83 | $this->Template->poll = ''; 84 | return; 85 | } 86 | 87 | $objPoll = new \Poll($intPoll); 88 | $this->Template->poll = $objPoll->generate(); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /languages/bg/default.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Пламен Синигерски 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Content elements 18 | */ 19 | $GLOBALS['TL_LANG']['CTE']['poll'] = array('Анкета', 'Показва анкета'); 20 | 21 | 22 | /** 23 | * Miscellaneous 24 | */ 25 | $GLOBALS['TL_LANG']['MSC']['votes'] = 'глас(а)'; 26 | $GLOBALS['TL_LANG']['MSC']['loginToVote'] = 'Моля, влезте с профила си, за да гласувате'; 27 | $GLOBALS['TL_LANG']['MSC']['vote'] = 'Гласувай'; 28 | $GLOBALS['TL_LANG']['MSC']['showResults'] = 'Покажи резултати'; 29 | $GLOBALS['TL_LANG']['MSC']['showForm'] = 'Към гласуване'; 30 | $GLOBALS['TL_LANG']['MSC']['voteSubmitted'] = 'Вашият глас бе записан, благодарим ви!'; 31 | $GLOBALS['TL_LANG']['MSC']['pollClosed'] = 'Анкетата е изтекла'; 32 | -------------------------------------------------------------------------------- /languages/bg/modules.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Пламен Синигерски 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Back end modules 18 | */ 19 | $GLOBALS['TL_LANG']['MOD']['polls'] = array('Анкети', 'Управление на анкетите'); 20 | 21 | 22 | /** 23 | * Front end modules 24 | */ 25 | $GLOBALS['TL_LANG']['FMD']['polls'] = 'Анкети'; 26 | $GLOBALS['TL_LANG']['FMD']['poll'] = array('Анкета', 'Показва анкета на страницата.'); 27 | $GLOBALS['TL_LANG']['FMD']['polllist'] = array('Списък с анкети', 'Показва списък с активните анкети на страницата.'); 28 | -------------------------------------------------------------------------------- /languages/bg/tl_content.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Пламен Синигерски 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_content']['poll'] = array('Анкета', 'Моля, изберете анкетата, която искате да се показва'); 20 | $GLOBALS['TL_LANG']['tl_content']['poll_current'] = array('Използвай активната анкета', 'Използвай публикувана в момента анкета на базата на "показва от" и "показвай до" критериите. Избраната ръчно анкета ще бъде използвана ако няма други активни анкети (под формата на fallback).'); 21 | -------------------------------------------------------------------------------- /languages/bg/tl_module.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Пламен Синигерски 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_module']['poll_active'] = array('Активни анкети', 'Тук можете да изберете как да се обработват активните анкети.'); 20 | $GLOBALS['TL_LANG']['tl_module']['poll_visible'] = array('Публикувани анкети', 'Тук можете да изберете как да се обработват видимите (публикувани) анкети.'); 21 | $GLOBALS['TL_LANG']['tl_module']['poll_featured'] = array('Анкета с акцент', 'Тук можете да изберете как се обработват акнетите с акцент (featured).'); 22 | 23 | 24 | /** 25 | * Reference 26 | */ 27 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['all'] = 'Всички'; 28 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['yes'] = 'Само активни'; 29 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['no'] = 'Само не-активни'; 30 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['all'] = 'Всички'; 31 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['yes'] = 'Само активни'; 32 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['no'] = 'Само не-активни'; 33 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['all'] = 'Всички'; 34 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['yes'] = 'Само активни'; 35 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['no'] = 'Само не-активни'; 36 | -------------------------------------------------------------------------------- /languages/bg/tl_poll.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Пламен Синигерски 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_poll']['title'] = array('Заглавие', 'Моля, въведете заглавие на анкетата.'); 20 | $GLOBALS['TL_LANG']['tl_poll']['type'] = array('Вид', 'Моля, изберете вида на анкетата.'); 21 | $GLOBALS['TL_LANG']['tl_poll']['voteInterval'] = array('Интервал на гласуване', 'Тук можете да зададете времеви интервал, след който потребител би могъл да гласува отново. Задайте стойност 0 ако искате гласуването да бъде еднократно.'); 22 | $GLOBALS['TL_LANG']['tl_poll']['protected'] = array('Защитена анкета', 'Единствено вписани (logged in) потребители могат да гласуват в анкетата.'); 23 | $GLOBALS['TL_LANG']['tl_poll']['featured'] = array('Анкета с акцент', 'Маркирай анкетата като анкета с акцент'); 24 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorNotVoted'] = array('Потребителят не е гласувал (активна анкета)', 'Моля, изберете поведение, когато потребителят не е гласувал, а анкетата е активна.'); 25 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorVoted'] = array('Потребителят е гласувал (активна анкета)', 'Моля, изберете поведение, когато потребителят е гласувал и анкетата е активна.'); 26 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorNotVoted'] = array('Потребителят не е гласувал (не-активна анкета)', 'Моля, изберете поведение, когато потребителят не е гласувал и анкетата е не-активна.'); 27 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorVoted'] = array('Потребителят е гласувал (не-активна анкета)', 'Моля, изберете поведение, когато потребителят е гласувал, а анкетата е не-активна.'); 28 | $GLOBALS['TL_LANG']['tl_poll']['published'] = array('Публикувай анкетата', 'Прави анкетата публична.'); 29 | $GLOBALS['TL_LANG']['tl_poll']['closed'] = array('Затвори анкетата', 'Затвори анкетата и спри гласуването.'); 30 | $GLOBALS['TL_LANG']['tl_poll']['activeStart'] = array('Активна от', 'Забрани гласуването преди тази дата'); 31 | $GLOBALS['TL_LANG']['tl_poll']['activeStop'] = array('Активна до', 'Забрани гласуването след тази дата (включително)'); 32 | $GLOBALS['TL_LANG']['tl_poll']['showStart'] = array('Показвай от', 'Не показвай анкетата преди тази дата.'); 33 | $GLOBALS['TL_LANG']['tl_poll']['showStop'] = array('Показвай до', 'Не показвай анкетата след тази дата (включително).'); 34 | $GLOBALS['TL_LANG']['tl_poll']['tstamp'] = array('Дата на редакция', 'Дата и час на последната редакция'); 35 | 36 | 37 | 38 | /** 39 | * Legends 40 | */ 41 | $GLOBALS['TL_LANG']['tl_poll']['title_legend'] = 'Заглавие и поведение'; 42 | $GLOBALS['TL_LANG']['tl_poll']['redirect_legend'] = 'Настройки за пренасочване'; 43 | $GLOBALS['TL_LANG']['tl_poll']['publish_legend'] = 'Настройки за публикуване'; 44 | 45 | 46 | /** 47 | * Reference 48 | */ 49 | $GLOBALS['TL_LANG']['tl_poll']['type']['single'] = 'Единичен отговор (radio бутон)'; 50 | $GLOBALS['TL_LANG']['tl_poll']['type']['multiple'] = 'Няколко отговора (кутийки с отметки)'; 51 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt1'] = 'Полазвай връзката за "Виж резултатите"'; 52 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt2'] = 'Не показвай резултатите изобщо'; 53 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt3'] = 'Директно показвай резултатите'; 54 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt1'] = 'Директно показвай резултатите'; 55 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt2'] = 'Полазвай връзката за "Виж резултатите"'; 56 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt3'] = 'Не показвай резултатите изобщо'; 57 | 58 | 59 | /** 60 | * Miscellaneous 61 | */ 62 | $GLOBALS['TL_LANG']['tl_poll']['closedPoll'] = 'Затворена анкета'; 63 | 64 | 65 | /** 66 | * Buttons 67 | */ 68 | $GLOBALS['TL_LANG']['tl_poll']['new'] = array('Нова анкета', 'Създай нова анкета'); 69 | $GLOBALS['TL_LANG']['tl_poll']['show'] = array('Детайли', 'Покажи повече информация за анкета с ID %s'); 70 | $GLOBALS['TL_LANG']['tl_poll']['edit'] = array('Редакция', 'Редактирай анкета с ID %s'); 71 | $GLOBALS['TL_LANG']['tl_poll']['editheader'] = array('Настройки', 'Промяна на настройките на анкета с ID %s'); 72 | $GLOBALS['TL_LANG']['tl_poll']['copy'] = array('Дупликат', 'Дупликирай анкета с ID %s'); 73 | $GLOBALS['TL_LANG']['tl_poll']['delete'] = array('Изтрий', 'Изтрий анкета с ID %s'); 74 | $GLOBALS['TL_LANG']['tl_poll']['toggle'] = array('Публикувай/скрий', 'Публикувай/скрий анкета с ID %s'); 75 | $GLOBALS['TL_LANG']['tl_poll']['feature'] = array('Със/без акцнет', 'Задай/махни акцента на анкета с ID %s'); 76 | -------------------------------------------------------------------------------- /languages/bg/tl_poll_option.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Пламен Синигерски 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_poll_option']['title'] = array('Заглавие', 'Моля, въведете заглавие на опцията.'); 20 | $GLOBALS['TL_LANG']['tl_poll_option']['published'] = array('Публикуване', 'Направи опцията публична.'); 21 | 22 | 23 | /** 24 | * Legends 25 | */ 26 | $GLOBALS['TL_LANG']['tl_poll_option']['title_legend'] = 'Заглавие и резултати'; 27 | 28 | 29 | /** 30 | * Miscellaneous 31 | */ 32 | $GLOBALS['TL_LANG']['tl_poll_option']['voteSingle'] = '%s глас'; 33 | $GLOBALS['TL_LANG']['tl_poll_option']['votePlural'] = '%s гласа'; 34 | 35 | 36 | /** 37 | * Buttons 38 | */ 39 | $GLOBALS['TL_LANG']['tl_poll_option']['new'] = array('Нова опция', 'Създай нова опция'); 40 | $GLOBALS['TL_LANG']['tl_poll_option']['edit'] = array('Редактирай опцията', 'Редактирай опция с ID %s'); 41 | $GLOBALS['TL_LANG']['tl_poll_option']['editheader'] = array('Настройки', 'Редактирай настройките на анкета с ID %s'); 42 | $GLOBALS['TL_LANG']['tl_poll_option']['copy'] = array('Дупликирай опцията', 'Дупликирай опция с ID %s'); 43 | $GLOBALS['TL_LANG']['tl_poll_option']['delete'] = array('Изтрий опцията', 'Изтрий опция с ID %s'); 44 | $GLOBALS['TL_LANG']['tl_poll_option']['show'] = array('Дейтали за опцията', 'Покажи повече информация за опция с ID %s'); 45 | $GLOBALS['TL_LANG']['tl_poll_option']['toggle'] = array('Публикувай/скрий опцията', 'Публикувай/скрий опция с ID %s'); 46 | $GLOBALS['TL_LANG']['tl_poll_option']['votes'] = array('Виж гласовете', 'Виж гласовете за опция с ID %s'); 47 | $GLOBALS['TL_LANG']['tl_poll_option']['pastenew'] = array('Добави нова опция най-отгоре', 'Добави нова опция след опция с ID %s'); 48 | $GLOBALS['TL_LANG']['tl_poll_option']['reset'] = array('Reset poll', 'Нулирай анкетата и премахни всички гласове', 'Сигурни ли сте, че искате да занулите анкетата и да премахнете всички гласове? Действието е безвъзвратно!'); 49 | -------------------------------------------------------------------------------- /languages/bg/tl_poll_votes.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Пламен Синигерски 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_poll_votes']['tstamp'] = array('Дата на гласуване'); 20 | $GLOBALS['TL_LANG']['tl_poll_votes']['ip'] = array('IP адрес'); 21 | $GLOBALS['TL_LANG']['tl_poll_votes']['member'] = array('Потребител'); 22 | 23 | 24 | /** 25 | * Reference 26 | */ 27 | $GLOBALS['TL_LANG']['tl_poll_votes']['anonymous'] = '(анонимен)'; 28 | 29 | 30 | /** 31 | * Buttons 32 | */ 33 | $GLOBALS['TL_LANG']['tl_poll_votes']['delete'] = array('Изтриване на гласа', 'Изтрий глас с ID %s'); 34 | $GLOBALS['TL_LANG']['tl_poll_votes']['show'] = array('Детайли за гласа', 'Покажи повече информация за глас с ID %s'); 35 | -------------------------------------------------------------------------------- /languages/de/default.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Sebastian Seidel 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Content elements 18 | */ 19 | $GLOBALS['TL_LANG']['CTE']['poll'] = array('Umfrage', 'Zeigt eine Umfrage an.'); 20 | 21 | 22 | /** 23 | * Miscellaneous 24 | */ 25 | $GLOBALS['TL_LANG']['MSC']['votes'] = 'Stimme(n)'; 26 | $GLOBALS['TL_LANG']['MSC']['loginToVote'] = 'Bitte loggen Sie sich ein, um abzustimmen.'; 27 | $GLOBALS['TL_LANG']['MSC']['vote'] = 'abstimmen'; 28 | $GLOBALS['TL_LANG']['MSC']['showResults'] = 'Ergebnisse anzeigen'; 29 | $GLOBALS['TL_LANG']['MSC']['showForm'] = 'Zur Umfrage'; 30 | $GLOBALS['TL_LANG']['MSC']['voteSubmitted'] = 'Danke für Ihre Stimme!'; 31 | $GLOBALS['TL_LANG']['MSC']['pollClosed'] = 'Umfrage ist geschlossen.'; 32 | -------------------------------------------------------------------------------- /languages/de/modules.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Sebastian Seidel 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Back end modules 18 | */ 19 | $GLOBALS['TL_LANG']['MOD']['polls'] = array('Umfragen', 'Umfragen und deren Optionen verwalten.'); 20 | 21 | 22 | /** 23 | * Front end modules 24 | */ 25 | $GLOBALS['TL_LANG']['FMD']['polls'] = 'Umfragen'; 26 | $GLOBALS['TL_LANG']['FMD']['poll'] = array('Umfrage', 'Zeigt eine Umfrage im Frontend an.'); 27 | $GLOBALS['TL_LANG']['FMD']['polllist'] = array('Umfrageliste', 'Zeigt eine Liste der Umfragen im Frontend an.'); 28 | -------------------------------------------------------------------------------- /languages/de/tl_content.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Sebastian Seidel 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_content']['poll'] = array('Umfrage', 'Bitte wählen Sie die anzuzeigende Umfrage aus.'); 20 | $GLOBALS['TL_LANG']['tl_content']['poll_current'] = array('Derzeitige Umfrage anzeigen', 'Nutzt die derzeitige Umfrage basierend auf den Werten der Felder "anzeigen von" und "anzeigen bis". Die gewählte Umfrage wird als Ausweichmöglichkeit (fallback) genutzt.'); 21 | -------------------------------------------------------------------------------- /languages/de/tl_module.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Sebastian Seidel 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_module']['poll_active'] = array('Aktive Artikel', 'Hier können Sie wählen, wie aktive Umfragen behandelt werden sollen.'); 20 | $GLOBALS['TL_LANG']['tl_module']['poll_visible'] = array('Sichtbare Artikel', 'Hier können Sie wählen, wie sichtbare Umfragen behandelt werden sollen.'); 21 | $GLOBALS['TL_LANG']['tl_module']['poll_featured'] = array('Hervorgehobene Artikel', 'Hier können Sie wählen, wie hervorgehobene Umfragen behandelt werde sollen.'); 22 | 23 | 24 | /** 25 | * Reference 26 | */ 27 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['all'] = 'Alle Artikel'; 28 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['yes'] = 'Nur aktive Artikel'; 29 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['no'] = 'Nur inaktive Artikel'; 30 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['all'] = 'Alle Artikel'; 31 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['yes'] = 'Nur sichtbare Artikel'; 32 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['no'] = 'Nur unsichtbare Artikel'; 33 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['all'] = 'Alle Artikel'; 34 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['yes'] = 'Nur hervorgehobene Artikel'; 35 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['no'] = 'Nur nicht-hervorgehobene Artikel'; 36 | -------------------------------------------------------------------------------- /languages/de/tl_poll.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Sebastian Seidel 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_poll']['title'] = array('Titel', 'Bitte geben Sie den Titel der Umfrage ein.'); 20 | $GLOBALS['TL_LANG']['tl_poll']['voteInterval'] = array('Interval zur Abstimmung', 'Hier können Sie in Sekunden angeben, wann der Benutzer erneut abstimmen kann. Setzen Sie eine 0, wenn nur einmalig abgestimmt werden darf.'); 21 | $GLOBALS['TL_LANG']['tl_poll']['protected'] = array('Umfrage schützen', 'Nur eingeloggte Benutzer dürfen abstimmen.'); 22 | $GLOBALS['TL_LANG']['tl_poll']['featured'] = array('Umfrage hervorheben', 'Die Umfrage im Frontend hervorheben.'); 23 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorNotVoted'] = array('Benutzer hat nicht abgestimmt (aktive Umfrage)', 'Bitte geben Sie an, was angezeigt werden soll, wenn der Benutzer nicht abgestimmt hat und die Umfrage aktiv ist.'); 24 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorVoted'] = array('Benutzer hat abgestimmt (aktive Umfrage)', 'Bitte geben Sie an, was angezeigt werden soll, wenn der Benutzer abgestimmt hat und die Umfrage aktiv ist.'); 25 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorNotVoted'] = array('Benutzer hat nicht abgestimmt (inaktive Umfrage)', 'Bitte geben Sie an, was angezeigt werden soll, wenn der Benutzer nicht abgestimmt hat und die Umfrage inaktiv ist.'); 26 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorVoted'] = array('Benutzer hat abgestimmt (inaktive Umfrage)', 'Bitte geben Sie an, was angezeigt werden soll, wenn der Benutzer abgestimmt hat und die Umfrage inaktiv ist.'); 27 | $GLOBALS['TL_LANG']['tl_poll']['published'] = array('Umfrage veröffentlichen', 'Veröffentlichen Sie die Umfrage im Frontend.'); 28 | $GLOBALS['TL_LANG']['tl_poll']['closed'] = array('Umfrage schließen', 'Schließen Sie die Umfrage (Abstimmen nicht mehr möglich).'); 29 | $GLOBALS['TL_LANG']['tl_poll']['activeStart'] = array('Aktiv von', 'Aktiviert die Umfrage an diesem Datum.'); 30 | $GLOBALS['TL_LANG']['tl_poll']['activeStop'] = array('Aktiv bis', 'Deaktiviert die Umfrage an diesem Datum.'); 31 | $GLOBALS['TL_LANG']['tl_poll']['showStart'] = array('Anzeigen von', 'Zeigt die Umfrage ab gesetztem Datum im Frontend an.'); 32 | $GLOBALS['TL_LANG']['tl_poll']['showStop'] = array('Anzeigen bis', 'Zeigt die Umfrage bis zum gesetzten Datum im Frontend an.'); 33 | $GLOBALS['TL_LANG']['tl_poll']['tstamp'] = array('Datum der Bearbeitung', 'Zeit und Datum der letzten Bearbeitung.'); 34 | 35 | 36 | 37 | /** 38 | * Legends 39 | */ 40 | $GLOBALS['TL_LANG']['tl_poll']['title_legend'] = 'Titel und Verhalten'; 41 | $GLOBALS['TL_LANG']['tl_poll']['redirect_legend'] = 'Weiterleitung'; 42 | $GLOBALS['TL_LANG']['tl_poll']['publish_legend'] = 'Veröffentlichung'; 43 | 44 | 45 | /** 46 | * Reference 47 | */ 48 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt1'] = 'Zeigt einen Link zum Ergebnis an.'; 49 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt2'] = 'Ergebnisse nicht anzeigen.'; 50 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt3'] = 'Ergebnisse sofort anzeigen.'; 51 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt1'] = 'Ergebnisse sofort anzeigen.'; 52 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt2'] = 'Zeigt einen Link zum Ergebnis an.'; 53 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt3'] = 'Ergebnisse nicht anzeigen.'; 54 | 55 | 56 | /** 57 | * Miscellaneous 58 | */ 59 | $GLOBALS['TL_LANG']['tl_poll']['closedPoll'] = 'Geschlossen'; 60 | 61 | 62 | /** 63 | * Buttons 64 | */ 65 | $GLOBALS['TL_LANG']['tl_poll']['new'] = array('Neue Umfrage', 'Eine neue Umfrage erstellen.'); 66 | $GLOBALS['TL_LANG']['tl_poll']['show'] = array('Umfrage details', 'Details der Umfrage mit ID %s anzeigen.'); 67 | $GLOBALS['TL_LANG']['tl_poll']['edit'] = array('Umfrage bearbeiten', 'Umfrage mit ID %s bearbeiten.'); 68 | $GLOBALS['TL_LANG']['tl_poll']['editheader'] = array('Umfrage-Einstellungen bearbeiten', 'Einstellungen der Umfrage bearbeiten.'); 69 | $GLOBALS['TL_LANG']['tl_poll']['copy'] = array('Umfrage duplizieren', 'Umfrage mit ID %s duplizieren.'); 70 | $GLOBALS['TL_LANG']['tl_poll']['delete'] = array('Umfrage löschen', 'Umfrage mit ID %s löschen.'); 71 | $GLOBALS['TL_LANG']['tl_poll']['toggle'] = array('Umfrage veröffentlichen/verstecken', 'Umfrage mit ID %s veröffentlichen bzw. verstecken.'); 72 | $GLOBALS['TL_LANG']['tl_poll']['feature'] = array('Umfrage hervorheben', 'Umfrage ID %s hervorheben bzw. Hervorhebung aufheben.'); 73 | -------------------------------------------------------------------------------- /languages/de/tl_poll_option.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Sebastian Seidel 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_poll_option']['title'] = array('Titel', 'Bitte geben Sie den Titel der Option ein.'); 20 | $GLOBALS['TL_LANG']['tl_poll_option']['published'] = array('Option veröffentlichen', 'Option im Frontend veröffentlichen.'); 21 | 22 | 23 | /** 24 | * Legends 25 | */ 26 | $GLOBALS['TL_LANG']['tl_poll_option']['title_legend'] = 'Titel und Stimmen'; 27 | 28 | 29 | /** 30 | * Miscellaneous 31 | */ 32 | $GLOBALS['TL_LANG']['tl_poll_option']['voteSingle'] = '%s Stimme'; 33 | $GLOBALS['TL_LANG']['tl_poll_option']['votePlural'] = '%s Stimmen'; 34 | 35 | 36 | /** 37 | * Buttons 38 | */ 39 | $GLOBALS['TL_LANG']['tl_poll_option']['new'] = array('Neue Option', 'Eine neue Option anlegen.'); 40 | $GLOBALS['TL_LANG']['tl_poll_option']['edit'] = array('Option bearbeiten', 'Option mit ID %s bearbeiten.'); 41 | $GLOBALS['TL_LANG']['tl_poll_option']['editheader'] = array('Umfrage-Einstellungen bearbeiten', 'Einstellungen der Umfrage mit ID %s bearbeiten.'); 42 | $GLOBALS['TL_LANG']['tl_poll_option']['copy'] = array('Option duplizieren', 'Option mit ID %s duplizieren.'); 43 | $GLOBALS['TL_LANG']['tl_poll_option']['delete'] = array('Option löschen', 'Option mit ID %s löschen.'); 44 | $GLOBALS['TL_LANG']['tl_poll_option']['show'] = array('Details der Option', 'Details von Option mit ID %s anzeigen.'); 45 | $GLOBALS['TL_LANG']['tl_poll_option']['toggle'] = array('Option veröffentlichen/verstecken', 'Option mit ID %s veröffentlichen bzw. verstecken.'); 46 | $GLOBALS['TL_LANG']['tl_poll_option']['votes'] = array('Stimmen anzeigen', 'Stimmen der Option mit ID %s anzeigen.'); 47 | $GLOBALS['TL_LANG']['tl_poll_option']['pastenew'] = array('Neue Option anlegen', 'Eine neue Option nach dieser Option mit ID %s anlegen.'); 48 | -------------------------------------------------------------------------------- /languages/de/tl_poll_votes.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Sebastian Seidel 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_poll_votes']['tstamp'] = array('Datum der Stimme'); 20 | $GLOBALS['TL_LANG']['tl_poll_votes']['ip'] = array('IP-Addresse'); 21 | $GLOBALS['TL_LANG']['tl_poll_votes']['member'] = array('Mitglied'); 22 | 23 | 24 | /** 25 | * Reference 26 | */ 27 | $GLOBALS['TL_LANG']['tl_poll_votes']['anonymous'] = '(anonymous)'; 28 | 29 | 30 | /** 31 | * Buttons 32 | */ 33 | $GLOBALS['TL_LANG']['tl_poll_votes']['delete'] = array('Stimme löschen', 'Stimme mit ID %s löschen.'); 34 | $GLOBALS['TL_LANG']['tl_poll_votes']['show'] = array('Details der Stimme', 'Details der Stimme mit ID %s anzeigen.'); 35 | -------------------------------------------------------------------------------- /languages/en/default.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Content elements 17 | */ 18 | $GLOBALS['TL_LANG']['CTE']['poll'] = array('Poll', 'Displays a poll.'); 19 | 20 | 21 | /** 22 | * Miscellaneous 23 | */ 24 | $GLOBALS['TL_LANG']['MSC']['votes'] = 'vote(s)'; 25 | $GLOBALS['TL_LANG']['MSC']['loginToVote'] = 'Please log in to vote.'; 26 | $GLOBALS['TL_LANG']['MSC']['vote'] = 'Vote'; 27 | $GLOBALS['TL_LANG']['MSC']['showResults'] = 'Show results'; 28 | $GLOBALS['TL_LANG']['MSC']['showForm'] = 'Go to voting'; 29 | $GLOBALS['TL_LANG']['MSC']['voteSubmitted'] = 'Thanks for voting!'; 30 | $GLOBALS['TL_LANG']['MSC']['pollClosed'] = 'This poll is closed.'; 31 | -------------------------------------------------------------------------------- /languages/en/modules.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Back end modules 17 | */ 18 | $GLOBALS['TL_LANG']['MOD']['polls'] = array('Polls', 'Manage the polls and their options.'); 19 | 20 | 21 | /** 22 | * Front end modules 23 | */ 24 | $GLOBALS['TL_LANG']['FMD']['polls'] = 'Polls'; 25 | $GLOBALS['TL_LANG']['FMD']['poll'] = array('Poll', 'Displays a poll on the page.'); 26 | $GLOBALS['TL_LANG']['FMD']['polllist'] = array('Poll list', 'Displays a poll list on the page.'); 27 | -------------------------------------------------------------------------------- /languages/en/tl_content.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Fields 17 | */ 18 | $GLOBALS['TL_LANG']['tl_content']['poll'] = array('Poll', 'Please select the poll to be displayed.'); 19 | $GLOBALS['TL_LANG']['tl_content']['poll_current'] = array('Use the current poll', 'Use the current published poll based on "show from" and "show until" field values. The selected poll will be used as fallback.'); 20 | -------------------------------------------------------------------------------- /languages/en/tl_module.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Fields 17 | */ 18 | $GLOBALS['TL_LANG']['tl_module']['poll_active'] = array('Active items', 'Here you can choose how active polls are handled.'); 19 | $GLOBALS['TL_LANG']['tl_module']['poll_visible'] = array('Visible items', 'Here you can choose how visible polls are handled.'); 20 | $GLOBALS['TL_LANG']['tl_module']['poll_featured'] = array('Featured items', 'Here you can choose how featured polls are handled.'); 21 | 22 | 23 | /** 24 | * Reference 25 | */ 26 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['all'] = 'All items'; 27 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['yes'] = 'Only active items'; 28 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['no'] = 'Only inactive items'; 29 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['all'] = 'All items'; 30 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['yes'] = 'Only visible items'; 31 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['no'] = 'Only invisible items'; 32 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['all'] = 'All items'; 33 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['yes'] = 'Only featured items'; 34 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['no'] = 'Only not featured items'; 35 | -------------------------------------------------------------------------------- /languages/en/tl_poll.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Fields 17 | */ 18 | $GLOBALS['TL_LANG']['tl_poll']['title'] = array('Title', 'Please enter the poll title.'); 19 | $GLOBALS['TL_LANG']['tl_poll']['type'] = array('Type', 'Here you can choose the poll type.'); 20 | $GLOBALS['TL_LANG']['tl_poll']['voteInterval'] = array('Vote interval', 'Here you can set the time value in seconds before a user can vote again. Set to 0 if vote can be made only once.'); 21 | $GLOBALS['TL_LANG']['tl_poll']['protected'] = array('Protected poll', 'Only the logged in users will be able to vote.'); 22 | $GLOBALS['TL_LANG']['tl_poll']['featured'] = array('Feature poll', 'Mark the poll as featured.'); 23 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorNotVoted'] = array('User has not voted (poll active)', 'Please specify the behavior if the user has not voted and the poll is active.'); 24 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorVoted'] = array('User has voted (poll active)', 'Please specify the behavior if the user has voted and the poll is active.'); 25 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorNotVoted'] = array('User has not voted (poll inactive)', 'Please specify the behavior if the user has not voted and the poll is inactive.'); 26 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorVoted'] = array('User has voted (poll inactive)', 'Please specify the behavior if the user has voted and the poll is inactive.'); 27 | $GLOBALS['TL_LANG']['tl_poll']['published'] = array('Publish poll', 'Make the poll publicly visible on the website.'); 28 | $GLOBALS['TL_LANG']['tl_poll']['closed'] = array('Close poll', 'Close the poll and disable voting.'); 29 | $GLOBALS['TL_LANG']['tl_poll']['activeStart'] = array('Active from', 'Disable voting the poll before this day.'); 30 | $GLOBALS['TL_LANG']['tl_poll']['activeStop'] = array('Active until', 'Disable voting the poll on and after this day.'); 31 | $GLOBALS['TL_LANG']['tl_poll']['showStart'] = array('Show from', 'Do not display the poll on the website before this day.'); 32 | $GLOBALS['TL_LANG']['tl_poll']['showStop'] = array('Show until', 'Do not display the poll on the website on and after this day.'); 33 | $GLOBALS['TL_LANG']['tl_poll']['tstamp'] = array('Revision date', 'Date and time of the latest revision'); 34 | 35 | 36 | 37 | /** 38 | * Legends 39 | */ 40 | $GLOBALS['TL_LANG']['tl_poll']['title_legend'] = 'Title and behavior'; 41 | $GLOBALS['TL_LANG']['tl_poll']['redirect_legend'] = 'Redirect settings'; 42 | $GLOBALS['TL_LANG']['tl_poll']['publish_legend'] = 'Publish settings'; 43 | 44 | 45 | /** 46 | * Reference 47 | */ 48 | $GLOBALS['TL_LANG']['tl_poll']['type']['single'] = 'Single vote (radio)'; 49 | $GLOBALS['TL_LANG']['tl_poll']['type']['multiple'] = 'Multiple vote (checkbox)'; 50 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt1'] = 'Display a "show results" link'; 51 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt2'] = 'Do not show results at all'; 52 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt3'] = 'Show results immedietaly'; 53 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt1'] = 'Show results immedietaly'; 54 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt2'] = 'Display a "show results" link'; 55 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt3'] = 'Do not show results at all'; 56 | 57 | 58 | /** 59 | * Miscellaneous 60 | */ 61 | $GLOBALS['TL_LANG']['tl_poll']['closedPoll'] = 'Closed'; 62 | 63 | 64 | /** 65 | * Buttons 66 | */ 67 | $GLOBALS['TL_LANG']['tl_poll']['new'] = array('New poll', 'Create a new poll'); 68 | $GLOBALS['TL_LANG']['tl_poll']['show'] = array('Poll details', 'Show the details of poll ID %s'); 69 | $GLOBALS['TL_LANG']['tl_poll']['edit'] = array('Edit poll', 'Edit poll ID %s'); 70 | $GLOBALS['TL_LANG']['tl_poll']['editheader'] = array('Edit poll settings', 'Edit the settings of poll'); 71 | $GLOBALS['TL_LANG']['tl_poll']['copy'] = array('Duplicate poll', 'Duplicate poll ID %s'); 72 | $GLOBALS['TL_LANG']['tl_poll']['delete'] = array('Delete poll', 'Delete poll ID %s'); 73 | $GLOBALS['TL_LANG']['tl_poll']['toggle'] = array('Publish/unpublish poll', 'Publish/unpublish poll ID %s'); 74 | $GLOBALS['TL_LANG']['tl_poll']['feature'] = array('Feature/unfeature poll', 'Feature/unfeature poll ID %s'); 75 | -------------------------------------------------------------------------------- /languages/en/tl_poll_option.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Fields 17 | */ 18 | $GLOBALS['TL_LANG']['tl_poll_option']['title'] = array('Title', 'Please enter the option title.'); 19 | $GLOBALS['TL_LANG']['tl_poll_option']['published'] = array('Publish option', 'Make the option publicly visible on the website.'); 20 | 21 | 22 | /** 23 | * Legends 24 | */ 25 | $GLOBALS['TL_LANG']['tl_poll_option']['title_legend'] = 'Title and votes'; 26 | 27 | 28 | /** 29 | * Miscellaneous 30 | */ 31 | $GLOBALS['TL_LANG']['tl_poll_option']['voteSingle'] = '%s vote'; 32 | $GLOBALS['TL_LANG']['tl_poll_option']['votePlural'] = '%s votes'; 33 | 34 | 35 | /** 36 | * Buttons 37 | */ 38 | $GLOBALS['TL_LANG']['tl_poll_option']['new'] = array('New option', 'Create a new option'); 39 | $GLOBALS['TL_LANG']['tl_poll_option']['edit'] = array('Edit option', 'Edit option ID %s'); 40 | $GLOBALS['TL_LANG']['tl_poll_option']['editheader'] = array('Edit poll settings', 'Edit the settings of poll ID %s'); 41 | $GLOBALS['TL_LANG']['tl_poll_option']['copy'] = array('Duplicate option', 'Duplicate option ID %s'); 42 | $GLOBALS['TL_LANG']['tl_poll_option']['delete'] = array('Delete option', 'Delete option ID %s'); 43 | $GLOBALS['TL_LANG']['tl_poll_option']['show'] = array('Option details', 'Show the details of option ID %s'); 44 | $GLOBALS['TL_LANG']['tl_poll_option']['toggle'] = array('Publish/unpublish option', 'Publish/unpublish option ID %s'); 45 | $GLOBALS['TL_LANG']['tl_poll_option']['votes'] = array('View votes', 'View votes for option ID %s'); 46 | $GLOBALS['TL_LANG']['tl_poll_option']['pastenew'] = array('Add new at the top', 'Add new after option ID %s'); 47 | $GLOBALS['TL_LANG']['tl_poll_option']['reset'] = array('Reset poll', 'Reset poll and purge all votes', 'Are you sure you want to reset the poll and purge all votes? This cannot be undone!'); 48 | -------------------------------------------------------------------------------- /languages/en/tl_poll_votes.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Fields 17 | */ 18 | $GLOBALS['TL_LANG']['tl_poll_votes']['tstamp'] = array('Date voted'); 19 | $GLOBALS['TL_LANG']['tl_poll_votes']['ip'] = array('IP Address'); 20 | $GLOBALS['TL_LANG']['tl_poll_votes']['member'] = array('Member'); 21 | 22 | 23 | /** 24 | * Reference 25 | */ 26 | $GLOBALS['TL_LANG']['tl_poll_votes']['anonymous'] = '(anonymous)'; 27 | 28 | 29 | /** 30 | * Buttons 31 | */ 32 | $GLOBALS['TL_LANG']['tl_poll_votes']['delete'] = array('Delete vote', 'Delete vote ID %s'); 33 | $GLOBALS['TL_LANG']['tl_poll_votes']['show'] = array('Vote details', 'Show the details of vote ID %s'); 34 | -------------------------------------------------------------------------------- /languages/fa/default.php: -------------------------------------------------------------------------------- 1 | (ناشناس)'; 16 | $GLOBALS['TL_LANG']['tl_poll_votes']['delete']['0'] = 'حذف رای'; 17 | $GLOBALS['TL_LANG']['tl_poll_votes']['delete']['1'] = 'حذف رای شناسه‌ی %s'; 18 | $GLOBALS['TL_LANG']['tl_poll_votes']['ip']['0'] = 'نشانی آی‌پی'; 19 | $GLOBALS['TL_LANG']['tl_poll_votes']['member']['0'] = 'عضو'; 20 | $GLOBALS['TL_LANG']['tl_poll_votes']['show']['0'] = 'جزئیات رای'; 21 | $GLOBALS['TL_LANG']['tl_poll_votes']['show']['1'] = 'جزئیات رای شناسه‌ی %s'; 22 | $GLOBALS['TL_LANG']['tl_poll_votes']['tstamp']['0'] = 'تاریخ رای'; 23 | 24 | -------------------------------------------------------------------------------- /languages/fr/default.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Lionel Maccaud 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Content elements 18 | */ 19 | $GLOBALS['TL_LANG']['CTE']['poll'] = array('Sondage', 'Affiche un sondage.'); 20 | 21 | 22 | /** 23 | * Miscellaneous 24 | */ 25 | $GLOBALS['TL_LANG']['MSC']['votes'] = 'vote(s)'; 26 | $GLOBALS['TL_LANG']['MSC']['loginToVote'] = 'Veuillez, s\'il vous plaît, vous identifier pour voter.'; 27 | $GLOBALS['TL_LANG']['MSC']['vote'] = 'Voter'; 28 | $GLOBALS['TL_LANG']['MSC']['showResults'] = 'Afficher les résultats'; 29 | $GLOBALS['TL_LANG']['MSC']['showForm'] = 'Aller au vote'; 30 | $GLOBALS['TL_LANG']['MSC']['voteSubmitted'] = 'Merci d\'avoir voté !'; 31 | $GLOBALS['TL_LANG']['MSC']['pollClosed'] = 'Ce sondage est clos.'; 32 | -------------------------------------------------------------------------------- /languages/fr/modules.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Lionel Maccaud 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Back end modules 18 | */ 19 | $GLOBALS['TL_LANG']['MOD']['polls'] = array('Sondages', 'Gérer les sondages et leurs options.'); 20 | 21 | 22 | /** 23 | * Front end modules 24 | */ 25 | $GLOBALS['TL_LANG']['FMD']['polls'] = 'Sondages'; 26 | $GLOBALS['TL_LANG']['FMD']['poll'] = array('Sondage', 'Affiche un sondage sur la page.'); 27 | $GLOBALS['TL_LANG']['FMD']['polllist'] = array('Liste de sondages', 'Affiche une liste de sondages sur la page.'); 28 | -------------------------------------------------------------------------------- /languages/fr/tl_content.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Lionel Maccaud 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_content']['poll'] = array('Sondage', 'Veuillez, s\'il vous plaît, sélectionner le sondage à afficher.'); 20 | $GLOBALS['TL_LANG']['tl_content']['poll_current'] = array('Utiliser le sondage actuel', 'Utiliser le sondage, actuel et publié, basé sur les valeurs des champs "Afficher à partir du" et "Afficher jusqu\'au". Le sondage sélectionné sera utilisé comme solution alternative.'); 21 | -------------------------------------------------------------------------------- /languages/fr/tl_module.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Lionel Maccaud 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_module']['poll_active'] = array('Éléments actifs', 'Ici vous pouvez choisir la façon dont les sondages actifs sont gérés.'); 20 | $GLOBALS['TL_LANG']['tl_module']['poll_visible'] = array('Éléments visibles', 'Ici vous pouvez choisir la façon dont les sondages visibles sont gérés.'); 21 | $GLOBALS['TL_LANG']['tl_module']['poll_featured'] = array('Éléments en vedette', 'Ici vous pouvez choisir la façon dont les sondages en vedette sont gérés.'); 22 | 23 | 24 | /** 25 | * Reference 26 | */ 27 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['all'] = 'Tous les éléments'; 28 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['yes'] = 'Seuls les éléments actifs'; 29 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['no'] = 'Seuls les éléments inactifs'; 30 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['all'] = 'Tous les éléments'; 31 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['yes'] = 'Seuls les éléments visibles'; 32 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['no'] = 'Seuls les éléments invisibles'; 33 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['all'] = 'Tous les éléments'; 34 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['yes'] = 'Seuls les éléments en vedette'; 35 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['no'] = 'Seuls les éléments standards'; 36 | -------------------------------------------------------------------------------- /languages/fr/tl_poll.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Lionel Maccaud 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_poll']['title'] = array('Titre', 'Veuillez, s\'il vous plaît, insérer le titre du sondage.'); 20 | $GLOBALS['TL_LANG']['tl_poll']['type'] = array('Type', 'Ici vous pouvez choisir le type de sondage.'); 21 | $GLOBALS['TL_LANG']['tl_poll']['voteInterval'] = array('Intervalle entre chaque vote', 'Ici vous pouvez définir la valeur du temps en seconde avant qu\'un utilisateur puisse voter à nouveau. Mettre à 0 si le vote ne peut être effectué qu\'une seule fois.'); 22 | $GLOBALS['TL_LANG']['tl_poll']['protected'] = array('Sondage protégé', 'Seuls les utilisateurs identifiés pourront voter.'); 23 | $GLOBALS['TL_LANG']['tl_poll']['featured'] = array('Sondage vedette', 'Définir le sondage en tant que vedette.'); 24 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorNotVoted'] = array('L\'utilisateur n\'a pas voté (sondage actif)', 'Veuillez, s\'il vous plaît, spécifier le comportement à appliquer si l\'utilisateur n\'a pas voté et que le sondage est actif.'); 25 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorVoted'] = array('L\'utilisateur a voté (sondage actif)', 'Veuillez, s\'il vous plaît, spécifier le comportement à appliquer si l\'utilisateur a voté et que le sondage est actif.'); 26 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorNotVoted'] = array('L\'utilisateur n\'a pas voté (sondage inactif)', 'Veuillez, s\'il vous plaît, spécifier le comportement à appliquer si l\'utilisateur n\'a pas voté et que le sondage est inactif.'); 27 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorVoted'] = array('L\'utilisateur a voté (sondage inactif)', 'Veuillez, s\'il vous plaît, spécifier le comportement à appliquer si l\'utilisateur a voté et que le sondage est inactif.'); 28 | $GLOBALS['TL_LANG']['tl_poll']['published'] = array('Publier le sondage', 'Rendre le sondage publiquement visible sur le site internet.'); 29 | $GLOBALS['TL_LANG']['tl_poll']['closed'] = array('Clore le sondage', 'Clore le sondage et désactiver le vote.'); 30 | $GLOBALS['TL_LANG']['tl_poll']['activeStart'] = array('Actif à partir du', 'Désactiver le vote du sondage avant ce jour.'); 31 | $GLOBALS['TL_LANG']['tl_poll']['activeStop'] = array('Actif jusqu\'au', 'Désactiver le vote du sondage à compter de ce jour.'); 32 | $GLOBALS['TL_LANG']['tl_poll']['showStart'] = array('Afficher à partir du', 'Ne pas activer le vote du sondage sur le site avant ce jour.'); 33 | $GLOBALS['TL_LANG']['tl_poll']['showStop'] = array('Afficher jusqu\'au', 'Désactiver le vote du sondage sur le site à compter de ce jour.'); 34 | $GLOBALS['TL_LANG']['tl_poll']['tstamp'] = array('Date de révision', 'Date et heure de la dernière révision'); 35 | 36 | 37 | 38 | /** 39 | * Legends 40 | */ 41 | $GLOBALS['TL_LANG']['tl_poll']['title_legend'] = 'Titre et comportement'; 42 | $GLOBALS['TL_LANG']['tl_poll']['redirect_legend'] = 'Paramètres de redirection'; 43 | $GLOBALS['TL_LANG']['tl_poll']['publish_legend'] = 'Paramètres de publication'; 44 | 45 | 46 | /** 47 | * Reference 48 | */ 49 | $GLOBALS['TL_LANG']['tl_poll']['type']['single'] = 'Vote simple (radio)'; 50 | $GLOBALS['TL_LANG']['tl_poll']['type']['multiple'] = 'Vote multiple (case à cocher)'; 51 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt1'] = 'Afficher un lien "Afficher les résultats"'; 52 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt2'] = 'Ne pas afficher les résultats'; 53 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt3'] = 'Afficher les résultats immédiatement'; 54 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt1'] = 'Afficher les résultats immédiatement'; 55 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt2'] = 'Afficher un lien "Afficher les résultats"'; 56 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt3'] = 'Ne pas afficher les résultats'; 57 | 58 | 59 | /** 60 | * Miscellaneous 61 | */ 62 | $GLOBALS['TL_LANG']['tl_poll']['closedPoll'] = 'Clos'; 63 | 64 | 65 | /** 66 | * Buttons 67 | */ 68 | $GLOBALS['TL_LANG']['tl_poll']['new'] = array('Nouveau sondage', 'Créer un nouveau sondage'); 69 | $GLOBALS['TL_LANG']['tl_poll']['show'] = array('Afficher les détails du sondage', 'Afficher les détails du sondage avec l\'ID %s'); 70 | $GLOBALS['TL_LANG']['tl_poll']['edit'] = array('Éditer le sondage', 'Éditer le sondage avec l\'ID %s'); 71 | $GLOBALS['TL_LANG']['tl_poll']['editheader'] = array('Éditer les paramètres du sondage', 'Éditer les paramètres du sondage avec l\'ID %s'); 72 | $GLOBALS['TL_LANG']['tl_poll']['copy'] = array('Dupliquer le sondage', 'Dupliquer le sondage avec l\'ID %s'); 73 | $GLOBALS['TL_LANG']['tl_poll']['delete'] = array('Supprimer le sondage', 'Supprimer le sondage avec l\'ID %s'); 74 | $GLOBALS['TL_LANG']['tl_poll']['toggle'] = array('Publier/Dépublier le sondage', 'Publier/Dépublier le sondage avec l\'ID %s'); 75 | $GLOBALS['TL_LANG']['tl_poll']['feature'] = array('Définir le sondage en tant que vedette ou standard', 'Définir le sondage en tant que vedette ou standard avec l\'ID %s'); 76 | -------------------------------------------------------------------------------- /languages/fr/tl_poll_option.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Lionel Maccaud 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_poll_option']['title'] = array('Titre', 'Veuillez, s\'il vous plaît, insérer le titre de l\'option.'); 20 | $GLOBALS['TL_LANG']['tl_poll_option']['published'] = array('Publier l\'option', 'Rendre l\'option publiquement visible sur le site internet.'); 21 | 22 | 23 | /** 24 | * Legends 25 | */ 26 | $GLOBALS['TL_LANG']['tl_poll_option']['title_legend'] = 'Titre et votes'; 27 | 28 | 29 | /** 30 | * Miscellaneous 31 | */ 32 | $GLOBALS['TL_LANG']['tl_poll_option']['voteSingle'] = '%s vote'; 33 | $GLOBALS['TL_LANG']['tl_poll_option']['votePlural'] = '%s votes'; 34 | 35 | 36 | /** 37 | * Buttons 38 | */ 39 | $GLOBALS['TL_LANG']['tl_poll_option']['new'] = array('Nouvelle option', 'Créer une nouvelle option'); 40 | $GLOBALS['TL_LANG']['tl_poll_option']['edit'] = array('Éditer l\'option', 'Éditer l\'option avec l\'ID %s'); 41 | $GLOBALS['TL_LANG']['tl_poll_option']['editheader'] = array('Éditer les paramètres du sondage', 'Éditer les paramètres du sondage avec l\'ID %s'); 42 | $GLOBALS['TL_LANG']['tl_poll_option']['copy'] = array('Dupliquer l\'option', 'Dupliquer l\'option avec l\'ID %s'); 43 | $GLOBALS['TL_LANG']['tl_poll_option']['delete'] = array('Supprimer l\'option', 'Supprimer l\'option avec l\'ID %s'); 44 | $GLOBALS['TL_LANG']['tl_poll_option']['show'] = array('Afficher les détails de l\'option', 'Afficher les détails de l\'option avec l\'ID %s'); 45 | $GLOBALS['TL_LANG']['tl_poll_option']['toggle'] = array('Publier/Dépublier l\'option', 'Publier/Dépublier l\'option avec l\'ID %s'); 46 | $GLOBALS['TL_LANG']['tl_poll_option']['votes'] = array('Afficher les votes', 'Afficher les votes pour l\'option avec l\'ID %s'); 47 | $GLOBALS['TL_LANG']['tl_poll_option']['pastenew'] = array('Ajouter un nouveau au début', 'Ajouter un nouveau après l\'option avec l\'ID %s'); 48 | $GLOBALS['TL_LANG']['tl_poll_option']['reset'] = array('Remise à zéro du sondage', 'Remettre à zéro le sondage et purger tous les votes', 'Êtes-vous sûr de vouloir remettre à zéro le sondage et purger tous les votes ? Cela ne pourra pas être annulé !'); 49 | -------------------------------------------------------------------------------- /languages/fr/tl_poll_votes.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Lionel Maccaud 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_poll_votes']['tstamp'] = array('Date du vote'); 20 | $GLOBALS['TL_LANG']['tl_poll_votes']['ip'] = array('Adresse IP'); 21 | $GLOBALS['TL_LANG']['tl_poll_votes']['member'] = array('Membre'); 22 | 23 | 24 | /** 25 | * Reference 26 | */ 27 | $GLOBALS['TL_LANG']['tl_poll_votes']['anonymous'] = '(anonyme)'; 28 | 29 | 30 | /** 31 | * Buttons 32 | */ 33 | $GLOBALS['TL_LANG']['tl_poll_votes']['delete'] = array('Supprimer le vote', 'Supprimer le vote avec l\'ID %s'); 34 | $GLOBALS['TL_LANG']['tl_poll_votes']['show'] = array('Afficher les détails du vote', 'Afficher les détails du vote avec l\'ID %s'); 35 | -------------------------------------------------------------------------------- /languages/it/default.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author ContaoCms.it 12 | * @author Paolo Brunelli 13 | * @license LGPL 14 | */ 15 | 16 | 17 | /** 18 | * Content elements 19 | */ 20 | $GLOBALS['TL_LANG']['CTE']['poll'] = array('Sondaggi', 'Mostra i sondaggi.'); 21 | 22 | 23 | /** 24 | * Miscellaneous 25 | */ 26 | $GLOBALS['TL_LANG']['MSC']['votes'] = 'Voti'; 27 | $GLOBALS['TL_LANG']['MSC']['loginToVote'] = 'Per votare occorre essere loggato.'; 28 | $GLOBALS['TL_LANG']['MSC']['vote'] = 'Vota'; 29 | $GLOBALS['TL_LANG']['MSC']['showResults'] = 'Mostra i risultati'; 30 | $GLOBALS['TL_LANG']['MSC']['showForm'] = 'Vota il sondaggio'; 31 | $GLOBALS['TL_LANG']['MSC']['voteSubmitted'] = 'Grazie per aver votato!'; 32 | $GLOBALS['TL_LANG']['MSC']['pollClosed'] = 'Questo sondaggio è terminato.'; 33 | -------------------------------------------------------------------------------- /languages/it/modules.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author ContaoCms.it 12 | * @author Paolo Brunelli 13 | * @license LGPL 14 | */ 15 | 16 | 17 | /** 18 | * Back end modules 19 | */ 20 | $GLOBALS['TL_LANG']['MOD']['polls'] = array('Sondaggi', 'Gestisci i sondaggi e le opzioni.'); 21 | 22 | 23 | /** 24 | * Front end modules 25 | */ 26 | $GLOBALS['TL_LANG']['FMD']['polls'] = 'Sondaggi'; 27 | $GLOBALS['TL_LANG']['FMD']['poll'] = array('Sondaggio', 'Mostra un sondaggio in una pagina.'); 28 | $GLOBALS['TL_LANG']['FMD']['polllist'] = array('Lista sondaggi', 'Mostra la lista dei sondaggi.'); 29 | -------------------------------------------------------------------------------- /languages/it/tl_content.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author ContaoCms.it 12 | * @author Paolo Brunelli 13 | * @license LGPL 14 | */ 15 | 16 | 17 | /** 18 | * Fields 19 | */ 20 | $GLOBALS['TL_LANG']['tl_content']['poll'] = array('Sondaggio', 'Selezionare il sondaggio da mostrare.'); 21 | $GLOBALS['TL_LANG']['tl_content']['poll_current'] = array('Utilizza il sondaggio corrente', 'Utilizza il sondaggio corrente con le impostazioni di pubblicazione. Nel caso fosse fuori pubblicazione utilizza questo sondaggio.'); 22 | -------------------------------------------------------------------------------- /languages/it/tl_module.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author ContaoCms.it 12 | * @author Paolo Brunelli 13 | * @license LGPL 14 | */ 15 | 16 | 17 | /** 18 | * Fields 19 | */ 20 | $GLOBALS['TL_LANG']['tl_module']['poll_active'] = array('Elementi attivi', 'Qui si può selezionare quali sondaggi sono attivi.'); 21 | $GLOBALS['TL_LANG']['tl_module']['poll_visible'] = array('Elementi visibili', 'Qui è possibile selezionare i sondaggi visibili.'); 22 | $GLOBALS['TL_LANG']['tl_module']['poll_featured'] = array('Elementi in evidenza', 'Qui è possibile selezionare i sondaggi in evidenza.'); 23 | 24 | 25 | /** 26 | * Reference 27 | */ 28 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['all'] = 'Tutti gli elementi'; 29 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['yes'] = 'Solo gli elementi attivi'; 30 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['no'] = 'Solo gli elementi non attivi'; 31 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['all'] = 'Tutti gli elementi'; 32 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['yes'] = 'Solo gli elementi visibili'; 33 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['no'] = 'Solo gli elementi non visibili'; 34 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['all'] = 'Tutti gli elementi'; 35 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['yes'] = 'Solo gli elementi in evidenza'; 36 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['no'] = 'Solo gli elementi non in evidenza'; 37 | -------------------------------------------------------------------------------- /languages/it/tl_poll.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author ContaoCms.it 12 | * @author Paolo Brunelli 13 | * @license LGPL 14 | */ 15 | 16 | 17 | /** 18 | * Fields 19 | */ 20 | $GLOBALS['TL_LANG']['tl_poll']['title'] = array('Titolo', 'Inserire il titolo del sondaggio.'); 21 | $GLOBALS['TL_LANG']['tl_poll']['type'] = array('Tipo', 'Selezionare il tipo di sondaggio.'); 22 | $GLOBALS['TL_LANG']['tl_poll']['voteInterval'] = array('Intervallo voto', 'Qui è possibile impostare il valore di tempo in secondi prima che un utente possa votare di nuovo. Impostare a 0 se si vuole che il voto sia fatto solo una volta.'); 23 | $GLOBALS['TL_LANG']['tl_poll']['protected'] = array('Sondaggio protetto', 'Solo gli utenti che hanno effettuato il login possono votare.'); 24 | $GLOBALS['TL_LANG']['tl_poll']['featured'] = array('Sondaggio in evidenza', 'Indica il sondaggio come in evidenza.'); 25 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorNotVoted'] = array('L\'utente non ha votato (sondaggio attivo)', 'Si prega di specificare il comportamento se l\'utente non ha votato e il sondaggio è attivo.'); 26 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorVoted'] = array('L\'utente ha votato (sondaggio attivo)', ' 27 | Si prega di specificare il comportamento se l\'utente ha votato e il sondaggio è attivo.'); 28 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorNotVoted'] = array('L\'utente non ha votato (sondaggio inattivo)', 'Si prega di specificare il comportamento se l\'utente non ha votato e il sondaggio è inattivo.'); 29 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorVoted'] = array('L\'utente ha votato (sondaggio inattivo)', ' 30 | Si prega di specificare il comportamento se l\'utente ha votato e il sondaggio è inattivo.'); 31 | $GLOBALS['TL_LANG']['tl_poll']['published'] = array('Pubblica Sondaggio', 'Pubblica il sondaggio e rendilo visibile sul sito.'); 32 | $GLOBALS['TL_LANG']['tl_poll']['closed'] = array('Chiudi sondaggio', 'Chiudi il sondaggio .'); 33 | $GLOBALS['TL_LANG']['tl_poll']['activeStart'] = array('Attivo dal', 'Non attivare il sondaggio prima di questo giorno.'); 34 | $GLOBALS['TL_LANG']['tl_poll']['activeStop'] = array('Attivo fino al ', 'Disabilita il sondaggio dopo questo giorno.'); 35 | $GLOBALS['TL_LANG']['tl_poll']['showStart'] = array('Mostra dal giorno', 'Non visualizzare il sondaggio sul sito web prima di questo giorno.'); 36 | $GLOBALS['TL_LANG']['tl_poll']['showStop'] = array('Mostra fino al giorno', 'Non visualizzare il sondaggio sul sito web su e dopo questa giornata.'); 37 | $GLOBALS['TL_LANG']['tl_poll']['tstamp'] = array('Data revisione', 'Data ed ora dell\'ultima revisione'); 38 | 39 | 40 | 41 | /** 42 | * Legends 43 | */ 44 | $GLOBALS['TL_LANG']['tl_poll']['title_legend'] = 'Titolo e caratteristiche'; 45 | $GLOBALS['TL_LANG']['tl_poll']['redirect_legend'] = 'Impostazioni redirect'; 46 | $GLOBALS['TL_LANG']['tl_poll']['publish_legend'] = 'Impostazioni pubblicazione'; 47 | 48 | 49 | /** 50 | * Reference 51 | */ 52 | $GLOBALS['TL_LANG']['tl_poll']['type']['single'] = 'Singolo voto (radio)'; 53 | $GLOBALS['TL_LANG']['tl_poll']['type']['multiple'] = 'Voto multiplo (checkbox)'; 54 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt1'] = 'Mostra il link "Visualizza risultati"'; 55 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt2'] = 'Non mostrare i risultati a tutti'; 56 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt3'] = 'Mostra subito i risultati'; 57 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt1'] = 'Mostra subito i risultati'; 58 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt2'] = 'Mostra il link "Visualizza risultati"'; 59 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt3'] = 'Non mostrare i risultati a tutti'; 60 | 61 | 62 | /** 63 | * Miscellaneous 64 | */ 65 | $GLOBALS['TL_LANG']['tl_poll']['closedPoll'] = 'Closed'; 66 | 67 | 68 | /** 69 | * Buttons 70 | */ 71 | $GLOBALS['TL_LANG']['tl_poll']['new'] = array('Nuovo sondaggio', 'Crea un nuovo sondaggio'); 72 | $GLOBALS['TL_LANG']['tl_poll']['show'] = array('Dettagli sondaggio', 'Mostra i dettagli del sondaggio ID %s'); 73 | $GLOBALS['TL_LANG']['tl_poll']['edit'] = array('Modifica sondaggio', 'Modifica il sondaggio ID %s'); 74 | $GLOBALS['TL_LANG']['tl_poll']['editheader'] = array('Modifica impostazioni sondaggio', 'Modifica le impostazioni del sondaggio ID %s'); 75 | $GLOBALS['TL_LANG']['tl_poll']['copy'] = array('Duplica sondaggio', 'Duplia sondaggio ID %s'); 76 | $GLOBALS['TL_LANG']['tl_poll']['delete'] = array('Elimina sondaggio', 'Elimina sondaggio ID %s'); 77 | $GLOBALS['TL_LANG']['tl_poll']['toggle'] = array('Mostra/nascondi sondaggio', 'Mostra/nascondi sondaggio ID %s'); 78 | $GLOBALS['TL_LANG']['tl_poll']['feature'] = array('Metti in evidenza/togli evidenza', 'Metti in evidenza/togli evidenza ID %s'); 79 | -------------------------------------------------------------------------------- /languages/it/tl_poll_option.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author ContaoCms.it 12 | * @author Paolo Brunelli 13 | * @license LGPL 14 | */ 15 | 16 | 17 | /** 18 | * Fields 19 | */ 20 | $GLOBALS['TL_LANG']['tl_poll_option']['title'] = array('Titolo', 'Inserisci il titolo delle opzioni.'); 21 | $GLOBALS['TL_LANG']['tl_poll_option']['published'] = array('Pubblica opzione', 'Rendi l\'opzione pubblica e visibile sul sito.'); 22 | 23 | 24 | /** 25 | * Legends 26 | */ 27 | $GLOBALS['TL_LANG']['tl_poll_option']['title_legend'] = 'Titolo e voti'; 28 | 29 | 30 | /** 31 | * Miscellaneous 32 | */ 33 | $GLOBALS['TL_LANG']['tl_poll_option']['voteSingle'] = '%s voto'; 34 | $GLOBALS['TL_LANG']['tl_poll_option']['votePlural'] = '%s voti'; 35 | 36 | 37 | /** 38 | * Buttons 39 | */ 40 | $GLOBALS['TL_LANG']['tl_poll_option']['new'] = array('Nuova opzione', 'Crea una nuova opzione'); 41 | $GLOBALS['TL_LANG']['tl_poll_option']['edit'] = array('Modifica opzione', 'Modifica opzione ID %s'); 42 | $GLOBALS['TL_LANG']['tl_poll_option']['editheader'] = array('Modifica impostazioni sondaggio', 'Modifica impostazioni sondaggio ID %s'); 43 | $GLOBALS['TL_LANG']['tl_poll_option']['copy'] = array('Duplica opzione', 'Duplica opzione ID %s'); 44 | $GLOBALS['TL_LANG']['tl_poll_option']['delete'] = array('Elimina opzione', 'Elimina opzione ID %s'); 45 | $GLOBALS['TL_LANG']['tl_poll_option']['show'] = array('Dettagli opzione', 'Mostra i dettagli opzione ID %s'); 46 | $GLOBALS['TL_LANG']['tl_poll_option']['toggle'] = array('Mostra/nascondi opzione', 'Mostra/nascondi opzione ID %s'); 47 | $GLOBALS['TL_LANG']['tl_poll_option']['votes'] = array('Visualizza voti', 'Visualizza voti opzione ID %s'); 48 | $GLOBALS['TL_LANG']['tl_poll_option']['pastenew'] = array('xxxx Aggiungi una nuova opzione in testa', 'Aggiugi una nuova opzione dopo l\'opzione ID %s'); 49 | $GLOBALS['TL_LANG']['tl_poll_option']['reset'] = array('Reset sondaggio', 'Azzera sondaggio e ripulisci i voti', 'Sei sicuro di voler azzerare il sondaggio e ripulire i voti? Questa azione non potrà essere annullata!'); 50 | -------------------------------------------------------------------------------- /languages/it/tl_poll_votes.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author ContaoCms.it 12 | * @author Paolo Brunelli 13 | * @license LGPL 14 | */ 15 | 16 | 17 | /** 18 | * Fields 19 | */ 20 | $GLOBALS['TL_LANG']['tl_poll_votes']['tstamp'] = array('Data voto'); 21 | $GLOBALS['TL_LANG']['tl_poll_votes']['ip'] = array('Indirizzo IP'); 22 | $GLOBALS['TL_LANG']['tl_poll_votes']['member'] = array('Membro'); 23 | 24 | 25 | /** 26 | * Reference 27 | */ 28 | $GLOBALS['TL_LANG']['tl_poll_votes']['anonymous'] = '(Anonimo)'; 29 | 30 | 31 | /** 32 | * Buttons 33 | */ 34 | $GLOBALS['TL_LANG']['tl_poll_votes']['delete'] = array('Elimina voto', 'Elimina voto ID %s'); 35 | $GLOBALS['TL_LANG']['tl_poll_votes']['show'] = array('Dettaglio voto', 'Mostra il dettaglio del voto ID %s'); 36 | -------------------------------------------------------------------------------- /languages/lv/default.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Ivo Simsons 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Content elements 18 | */ 19 | $GLOBALS['TL_LANG']['CTE']['poll'] = array('Aptaujas', 'Rāda aptaujas.'); 20 | 21 | 22 | /** 23 | * Miscellaneous 24 | */ 25 | $GLOBALS['TL_LANG']['MSC']['votes'] = 'balss(balsis)'; 26 | $GLOBALS['TL_LANG']['MSC']['loginToVote'] = 'Lūdzu, pieslēdzieties, lai balsotu.'; 27 | $GLOBALS['TL_LANG']['MSC']['vote'] = 'Balsot'; 28 | $GLOBALS['TL_LANG']['MSC']['showResults'] = 'Rādīt rezultātus'; 29 | $GLOBALS['TL_LANG']['MSC']['showForm'] = 'Iet uz balsošanu'; 30 | $GLOBALS['TL_LANG']['MSC']['voteSubmitted'] = 'Paldies par balsošanu!'; 31 | $GLOBALS['TL_LANG']['MSC']['pollClosed'] = 'Šī aptauja ir slēgta.'; 32 | -------------------------------------------------------------------------------- /languages/lv/modules.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Ivo Simsons 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Back end modules 18 | */ 19 | $GLOBALS['TL_LANG']['MOD']['polls'] = array('Aptaujas', 'Pārvaldiet aptaujas un to iespējas.'); 20 | 21 | 22 | /** 23 | * Front end modules 24 | */ 25 | $GLOBALS['TL_LANG']['FMD']['polls'] = 'Aptaujas'; 26 | $GLOBALS['TL_LANG']['FMD']['poll'] = array('Aptauja', 'Parāda aptauju lapā.'); 27 | $GLOBALS['TL_LANG']['FMD']['polllist'] = array('Aptauju saraksts', 'Parāda aptauju sarakstu lapā.'); 28 | -------------------------------------------------------------------------------- /languages/lv/tl_content.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Ivo Simsons 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_content']['poll'] = array('Aptauja', 'Lūdzu, izvēlieties aptauju, kas tiks parādīta.'); 20 | $GLOBALS['TL_LANG']['tl_content']['poll_current'] = array('Izmantojiet pašreizējo aptauju', 'Izmantojiet pašreizējo publicēto aptauju, pamatojoties uz lauku vērtībām "rādīt no" un "rādīt līdz". Atlasītā aptauja tiks izmantota kā atkāpe.'); 21 | -------------------------------------------------------------------------------- /languages/lv/tl_module.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Ivo Simsons 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_module']['poll_active'] = array('Aktīvie vienumi', 'Šeit jūs varat izvēlēties, kā rīkoties ar aktīvām aptaujām.'); 20 | $GLOBALS['TL_LANG']['tl_module']['poll_visible'] = array('Redzamie vienumi', 'Šeit jūs varat izvēlēties, kā rīkoties ar redzamajām aptaujām.'); 21 | $GLOBALS['TL_LANG']['tl_module']['poll_featured'] = array('Izceltie vienumi', 'Šeit jūs varat izvēlēties, kā rīkoties ar izceltajām aptaujām.'); 22 | 23 | 24 | /** 25 | * Reference 26 | */ 27 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['all'] = 'Visi vienumi'; 28 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['yes'] = 'Tikai aktīvie vienumi'; 29 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['no'] = 'Tikai neaktīvie vienumi'; 30 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['all'] = 'Visi vienumi'; 31 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['yes'] = 'Tikai redzamie vienumi'; 32 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['no'] = 'Tikai neredzamie vienumi'; 33 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['all'] = 'Visi vienumi'; 34 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['yes'] = 'Tikai izceltie vienumi'; 35 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['no'] = 'Tikai neizceltie vienumi'; 36 | -------------------------------------------------------------------------------- /languages/lv/tl_poll.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Ivo Simsons 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_poll']['title'] = array('Nosaukums', 'Lūdzu, ievadiet aptaujas nosaukumu.'); 20 | $GLOBALS['TL_LANG']['tl_poll']['type'] = array('Veids', 'Šeit jūs varat izvēlēties aptaujas veidu.'); 21 | $GLOBALS['TL_LANG']['tl_poll']['voteInterval'] = array('Balsojuma intervāls', 'Šeit jūs varat iestatīt laika vērtību sekundēs, pirms lietotājs var vēlreiz balsot. Iestatiet uz 0, ja balsojumu var izdarīt tikai vienu reizi.'); 22 | $GLOBALS['TL_LANG']['tl_poll']['protected'] = array('Aizsargāta aptauja', 'Balsot varēs tikai pieteikušies lietotāji.'); 23 | $GLOBALS['TL_LANG']['tl_poll']['featured'] = array('Izceltā aptauja', 'Atzīmējiet aptauju kā izceltu.'); 24 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorNotVoted'] = array('Lietotājs nav balsojis (aptauja ir aktīva)', 'Lūdzu, norādiet rīcību, ja lietotājs nav balsojis un aptauja ir aktīva.'); 25 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorVoted'] = array('Lietotājs ir balsojis (aptauja ir aktīva)', 'Lūdzu, norādiet rīcību, ja lietotājs ir balsojis un aptauja ir aktīva.'); 26 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorNotVoted'] = array('Lietotājs nav balsojis (aptauja nav aktīva)', 'Lūdzu, norādiet rīcību, ja lietotājs nav balsojis un aptauja nav aktīva.'); 27 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorVoted'] = array('Lietotājs ir balsojis (aptauja nav aktīva)', 'Lūdzu, norādiet rīcību, ja lietotājs ir balsojis un aptauja nav aktīva.'); 28 | $GLOBALS['TL_LANG']['tl_poll']['published'] = array('Publicēt aptauju', 'Padariet aptauju publiski redzamu tīmekļa vietnē.'); 29 | $GLOBALS['TL_LANG']['tl_poll']['closed'] = array('Aizvērt aptauju', 'Aizveriet aptauju un atspējojiet balsošanu.'); 30 | $GLOBALS['TL_LANG']['tl_poll']['activeStart'] = array('Aktīva no', 'DAtspējot balsošanu par aptauju pirms šīs dienas.'); 31 | $GLOBALS['TL_LANG']['tl_poll']['activeStop'] = array('Aktīva līdz', 'Atspējot balsošanu par aptauju šajā dienā un pēc tās.'); 32 | $GLOBALS['TL_LANG']['tl_poll']['showStart'] = array('Rādīt no', 'Nerādīt aptauju vietnē pirms šīs dienas.'); 33 | $GLOBALS['TL_LANG']['tl_poll']['showStop'] = array('Rādīt līdz', 'Nerādīt aptauju vietnē šajā dienā un pēc tās.'); 34 | $GLOBALS['TL_LANG']['tl_poll']['tstamp'] = array('Pārskatīšanas datums', 'Jaunākās pārskatīšanas datums un laiks'); 35 | 36 | 37 | 38 | /** 39 | * Legends 40 | */ 41 | $GLOBALS['TL_LANG']['tl_poll']['title_legend'] = 'Nosaukums un rīcība'; 42 | $GLOBALS['TL_LANG']['tl_poll']['redirect_legend'] = 'Pārsūtīšanas iestatījumi'; 43 | $GLOBALS['TL_LANG']['tl_poll']['publish_legend'] = 'Publicēšanas iestatījumi'; 44 | 45 | 46 | /** 47 | * Reference 48 | */ 49 | $GLOBALS['TL_LANG']['tl_poll']['type']['single'] = 'Viena balss (radio)'; 50 | $GLOBALS['TL_LANG']['tl_poll']['type']['multiple'] = 'Vairākas balsis (izvēles rūtiņa)'; 51 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt1'] = 'Parādīt saiti "Parādīt rezultātus"'; 52 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt2'] = 'Nerādīt rezultātus vispār'; 53 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt3'] = 'Rādīt rezultātus nekavējoties'; 54 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt1'] = 'Rādīt rezultātus nekavējoties'; 55 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt2'] = 'Parādīt saiti "Parādīt rezultātus"'; 56 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt3'] = 'Nerādīt rezultātus vispār'; 57 | 58 | 59 | /** 60 | * Miscellaneous 61 | */ 62 | $GLOBALS['TL_LANG']['tl_poll']['closedPoll'] = 'Slēgts'; 63 | 64 | 65 | /** 66 | * Buttons 67 | */ 68 | $GLOBALS['TL_LANG']['tl_poll']['new'] = array('Jauna aptauja', 'Izveidojiet jaunu aptauju'); 69 | $GLOBALS['TL_LANG']['tl_poll']['show'] = array('Aptaujas detaļas', 'Parādiet aptaujas ID %s detaļas'); 70 | $GLOBALS['TL_LANG']['tl_poll']['edit'] = array('Rediģēt aptauju', 'Rediģēt aptauju ID %s'); 71 | $GLOBALS['TL_LANG']['tl_poll']['editheader'] = array('Rediģēt aptaujas iestatījumus', 'Rediģēt aptaujas ID %s iestatījumus'); 72 | $GLOBALS['TL_LANG']['tl_poll']['copy'] = array('Dublicēt aptauju', 'Dublicēt aptauju ID %s'); 73 | $GLOBALS['TL_LANG']['tl_poll']['delete'] = array('Dzēst aptauju', 'Dzēst aptauju ID %s'); 74 | $GLOBALS['TL_LANG']['tl_poll']['toggle'] = array('Publicēt/slēpt aptauju', 'Publicēt/slēpt aptauju ID %s'); 75 | $GLOBALS['TL_LANG']['tl_poll']['feature'] = array('Izcelt/neizcelt aptauju', 'Izcelt/neizcelt aptauju ID %s'); 76 | -------------------------------------------------------------------------------- /languages/lv/tl_poll_option.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Ivo Simsons 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_poll_option']['title'] = array('Nosaukums', 'Lūdzu, ievadiet opcijas nosaukumu.'); 20 | $GLOBALS['TL_LANG']['tl_poll_option']['published'] = array('Publicēt opciju', 'Padariet opciju publiski redzamu vietnē.'); 21 | 22 | 23 | /** 24 | * Legends 25 | */ 26 | $GLOBALS['TL_LANG']['tl_poll_option']['title_legend'] = 'Nosaukums un balsis'; 27 | 28 | 29 | /** 30 | * Miscellaneous 31 | */ 32 | $GLOBALS['TL_LANG']['tl_poll_option']['voteSingle'] = '%s balss'; 33 | $GLOBALS['TL_LANG']['tl_poll_option']['votePlural'] = '%s balsis'; 34 | 35 | 36 | /** 37 | * Buttons 38 | */ 39 | $GLOBALS['TL_LANG']['tl_poll_option']['new'] = array('Jauna opcija', 'Izveidojiet jaunu opciju'); 40 | $GLOBALS['TL_LANG']['tl_poll_option']['edit'] = array('Rediģēt opciju', 'Rediģēt opciju ID %s'); 41 | $GLOBALS['TL_LANG']['tl_poll_option']['editheader'] = array('Rediģēt aptaujas iestatījumus', 'Rediģējiet aptaujas ID %s iestatījumus'); 42 | $GLOBALS['TL_LANG']['tl_poll_option']['copy'] = array('Dublēt opciju', 'Dublēt opciju ID %s'); 43 | $GLOBALS['TL_LANG']['tl_poll_option']['delete'] = array('Dzēst opciju', 'Dzēst opciju ID %s'); 44 | $GLOBALS['TL_LANG']['tl_poll_option']['show'] = array('Opcijas detaļas', 'Parādiet opcijas ID %s detaļas'); 45 | $GLOBALS['TL_LANG']['tl_poll_option']['toggle'] = array('Publicēt/slēpt opciju', 'Publicēt/slēpt ID %s'); 46 | $GLOBALS['TL_LANG']['tl_poll_option']['votes'] = array('Skatīt balsis', 'Skatīt ocijas ID %s balsis'); 47 | $GLOBALS['TL_LANG']['tl_poll_option']['pastenew'] = array('Pievienot jaunu augšā', 'Pievienot jaunu pēc opcijas ID %s'); 48 | $GLOBALS['TL_LANG']['tl_poll_option']['reset'] = array('Atiestatīt aptauja', 'Atiestatīt aptauju un dzēst visas balsis', 'Vai tiešām vēlaties atiestatīt aptauju un izdzēst visas balsis? To nevarēs atsaukt!'); 49 | -------------------------------------------------------------------------------- /languages/lv/tl_poll_votes.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @author Ivo Simsons 12 | * @license LGPL 13 | */ 14 | 15 | 16 | /** 17 | * Fields 18 | */ 19 | $GLOBALS['TL_LANG']['tl_poll_votes']['tstamp'] = array('Balsošanas datums'); 20 | $GLOBALS['TL_LANG']['tl_poll_votes']['ip'] = array('IP adrese'); 21 | $GLOBALS['TL_LANG']['tl_poll_votes']['member'] = array('Biedrs'); 22 | 23 | 24 | /** 25 | * Reference 26 | */ 27 | $GLOBALS['TL_LANG']['tl_poll_votes']['anonymous'] = '(anonīms)'; 28 | 29 | 30 | /** 31 | * Buttons 32 | */ 33 | $GLOBALS['TL_LANG']['tl_poll_votes']['delete'] = array('Dzēst balsi', 'Dzēst balsi ID %s'); 34 | $GLOBALS['TL_LANG']['tl_poll_votes']['show'] = array('Balsojuma informācija', 'Rāda balsojuma ID %s detaļas'); 35 | -------------------------------------------------------------------------------- /languages/pl/default.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Content elements 17 | */ 18 | $GLOBALS['TL_LANG']['CTE']['poll'] = array('Sonda', 'Dodaje sondę do strony..'); 19 | 20 | 21 | /** 22 | * Miscellaneous 23 | */ 24 | $GLOBALS['TL_LANG']['MSC']['votes'] = 'głos(y)'; 25 | $GLOBALS['TL_LANG']['MSC']['loginToVote'] = 'Zaloguj się, aby zagłosować.'; 26 | $GLOBALS['TL_LANG']['MSC']['vote'] = 'Głosuj'; 27 | $GLOBALS['TL_LANG']['MSC']['showResults'] = 'Pokaż wyniki'; 28 | $GLOBALS['TL_LANG']['MSC']['showForm'] = 'Pokaż sondę'; 29 | $GLOBALS['TL_LANG']['MSC']['voteSubmitted'] = 'Dziękujemy za głos!'; 30 | $GLOBALS['TL_LANG']['MSC']['pollClosed'] = 'Ta sonda jest zamknięta.'; 31 | -------------------------------------------------------------------------------- /languages/pl/modules.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Back end modules 17 | */ 18 | $GLOBALS['TL_LANG']['MOD']['polls'] = array('Sondy', 'Zarządzaj sondami i ich opcjami.'); 19 | 20 | 21 | /** 22 | * Front end modules 23 | */ 24 | $GLOBALS['TL_LANG']['FMD']['polls'] = 'Sondy'; 25 | $GLOBALS['TL_LANG']['FMD']['poll'] = array('Sonda', 'Dodaje sondę do strony.'); 26 | $GLOBALS['TL_LANG']['FMD']['polllist'] = array('Lista sond', 'Dodaje listę sond do strony.'); 27 | -------------------------------------------------------------------------------- /languages/pl/tl_content.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Fields 17 | */ 18 | $GLOBALS['TL_LANG']['tl_content']['poll'] = array('Sonda', 'Wybierz sondę, która ma zostać wyświetlona.'); 19 | $GLOBALS['TL_LANG']['tl_content']['poll_current'] = array('Użyj bieżącej sondy', 'Użyj bieżącej sondy bazując na danych z pola "pokaż od" i "pokaż do". Wybrana sonda zostanie użyta jako zapasowa.'); 20 | -------------------------------------------------------------------------------- /languages/pl/tl_module.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Fields 17 | */ 18 | $GLOBALS['TL_LANG']['tl_module']['poll_active'] = array('Aktywne sondy', 'Tutaj możesz wybrać czy wyświetlać aktywne sondy.'); 19 | $GLOBALS['TL_LANG']['tl_module']['poll_visible'] = array('Widoczne sondy', 'Tutaj możesz wybrać czy wyświetlać widoczne sondy.'); 20 | $GLOBALS['TL_LANG']['tl_module']['poll_featured'] = array('Wyróżnione sondy', 'Tutaj możesz wybrać czy wyświetlać wyróżnione sondy.'); 21 | 22 | 23 | /** 24 | * Reference 25 | */ 26 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['all'] = 'Wszystkie'; 27 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['yes'] = 'Tylko aktywne'; 28 | $GLOBALS['TL_LANG']['tl_module']['poll_active']['no'] = 'Tylko niekatywne'; 29 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['all'] = 'Wszystkie'; 30 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['yes'] = 'Tylko widoczne'; 31 | $GLOBALS['TL_LANG']['tl_module']['poll_visible']['no'] = 'Tylko niewidoczne'; 32 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['all'] = 'Wszystkie'; 33 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['yes'] = 'Tylko wyróżnione'; 34 | $GLOBALS['TL_LANG']['tl_module']['poll_featured']['no'] = 'Tylko niewyróżnione'; 35 | -------------------------------------------------------------------------------- /languages/pl/tl_poll.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Fields 17 | */ 18 | $GLOBALS['TL_LANG']['tl_poll']['title'] = array('Tytuł', 'Wprowadź tytuł sondy.'); 19 | $GLOBALS['TL_LANG']['tl_poll']['type'] = array('Typ', 'Tutaj możesz wybrać typ sondy.'); 20 | $GLOBALS['TL_LANG']['tl_poll']['voteInterval'] = array('Odstęp czasowy', 'Tutaj możesz wprowadzić liczbę sekund po której użytkownik będzie mógł znowu zagłosować. Wprowadź 0, jeśli głos może zostać oddany tylko raz.'); 21 | $GLOBALS['TL_LANG']['tl_poll']['protected'] = array('Sonda chroniona', 'Tylko zalogowani użytkownicy będą mogli zagłosować.'); 22 | $GLOBALS['TL_LANG']['tl_poll']['featured'] = array('Wyróżnij sondę', 'Oznacz sondę jako wyróżnioną.'); 23 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorNotVoted'] = array('Użytkownik nie zagłosował (sonda aktywna)', 'Określ zachowanie sondy, jeśli użytkownik nie zagłosował i sonda jest aktywna.'); 24 | $GLOBALS['TL_LANG']['tl_poll']['active_behaviorVoted'] = array('Użytkownik zagłosował (sonda aktywna)', 'Określ zachowanie sondy, jeśli użytkownik zagłosował i sonda jest aktywna.'); 25 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorNotVoted'] = array('Użytkownik nie zagłosował (sonda nieaktywna)', 'Określ zachowanie sondy, jeśli użytkownik nie zagłosował i sonda jest nieaktywna.'); 26 | $GLOBALS['TL_LANG']['tl_poll']['inactive_behaviorVoted'] = array('Użytkownik zagłosował (sonda nieaktywna)', 'Określ zachowanie sondy, jeśli użytkownik zagłosował i sonda jest nieaktywna.'); 27 | $GLOBALS['TL_LANG']['tl_poll']['published'] = array('Publikuj sondę', 'Publikuj sondę na stronach serwisu.'); 28 | $GLOBALS['TL_LANG']['tl_poll']['closed'] = array('Zamknij sondę', 'Zamknij sondę i zablokuj głosowanie.'); 29 | $GLOBALS['TL_LANG']['tl_poll']['activeStart'] = array('Aktywna od', 'Zablokuj głosowanie przed tym dniem.'); 30 | $GLOBALS['TL_LANG']['tl_poll']['activeStop'] = array('Aktywna do', 'Zablokuj głosowanie w tym i po tym dniu.'); 31 | $GLOBALS['TL_LANG']['tl_poll']['showStart'] = array('Pokaż od', 'Nie wyświetlaj sondy na stronie przed tym dniem.'); 32 | $GLOBALS['TL_LANG']['tl_poll']['showStop'] = array('Pokaż do', 'Nie wyświetlaj sondy na stronie w tym i po tym dniu.'); 33 | $GLOBALS['TL_LANG']['tl_poll']['tstamp'] = array('Ostatnia aktualizacja', 'Data i czas ostatniej aktualizacji'); 34 | 35 | 36 | 37 | /** 38 | * Legends 39 | */ 40 | $GLOBALS['TL_LANG']['tl_poll']['title_legend'] = 'Tytuł i zachowanie'; 41 | $GLOBALS['TL_LANG']['tl_poll']['redirect_legend'] = 'Ustawienia przekierowania'; 42 | $GLOBALS['TL_LANG']['tl_poll']['publish_legend'] = 'Ustawienia publikacji'; 43 | 44 | 45 | /** 46 | * Reference 47 | */ 48 | $GLOBALS['TL_LANG']['tl_poll']['type']['single'] = 'Pojedynczy głos (radio)'; 49 | $GLOBALS['TL_LANG']['tl_poll']['type']['multiple'] = 'Wielokrotny głos (checkbox)'; 50 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt1'] = 'Wyświetl link "pokaż wyniki"'; 51 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt2'] = 'Nie pokazuj wyników wcale'; 52 | $GLOBALS['TL_LANG']['tl_poll']['behaviorNotVoted']['opt3'] = 'Pokaż wyniki od razu'; 53 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt1'] = 'Pokaż wyniki od razu'; 54 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt2'] = 'Wyświetl link "pokaż wyniki"'; 55 | $GLOBALS['TL_LANG']['tl_poll']['behaviorVoted']['opt3'] = 'Nie pokazuj wyników wcale'; 56 | 57 | 58 | /** 59 | * Miscellaneous 60 | */ 61 | $GLOBALS['TL_LANG']['tl_poll']['closedPoll'] = 'Zamknięta'; 62 | 63 | 64 | /** 65 | * Buttons 66 | */ 67 | $GLOBALS['TL_LANG']['tl_poll']['new'] = array('Nowa sonda', 'Utwórz nową sondę'); 68 | $GLOBALS['TL_LANG']['tl_poll']['show'] = array('Szczegóły sondy', 'Pokaż szczegóły sondy ID %s'); 69 | $GLOBALS['TL_LANG']['tl_poll']['edit'] = array('Edytuj sondę', 'Edytuj sondę ID %s'); 70 | $GLOBALS['TL_LANG']['tl_poll']['editheader'] = array('Edytuj ustawienia sondy', 'Edytuj ustawienia sondy'); 71 | $GLOBALS['TL_LANG']['tl_poll']['copy'] = array('Duplikuj sondę', 'Duplikuj sondę ID %s'); 72 | $GLOBALS['TL_LANG']['tl_poll']['delete'] = array('Usuń sondę', 'Usuń sondę ID %s'); 73 | $GLOBALS['TL_LANG']['tl_poll']['toggle'] = array('Publikuj/ukryj sondę', 'Publikuj/ukryj sondę ID %s'); 74 | $GLOBALS['TL_LANG']['tl_poll']['feature'] = array('Wyróżnij/nie wyróżniaj sondę', 'Wyróżnij/nie wyróżniaj sondę ID %s'); 75 | -------------------------------------------------------------------------------- /languages/pl/tl_poll_option.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Fields 17 | */ 18 | $GLOBALS['TL_LANG']['tl_poll_option']['title'] = array('Nazwa', 'Wprowadź nazwę opcji.'); 19 | $GLOBALS['TL_LANG']['tl_poll_option']['published'] = array('Publikuj opcję', 'Publikuj opcję na stronach serwisu.'); 20 | 21 | 22 | /** 23 | * Legends 24 | */ 25 | $GLOBALS['TL_LANG']['tl_poll_option']['title_legend'] = 'Nazwa opcji'; 26 | 27 | 28 | /** 29 | * Miscellaneous 30 | */ 31 | $GLOBALS['TL_LANG']['tl_poll_option']['voteSingle'] = '%s głos'; 32 | $GLOBALS['TL_LANG']['tl_poll_option']['votePlural'] = '%s głosów'; 33 | 34 | 35 | /** 36 | * Buttons 37 | */ 38 | $GLOBALS['TL_LANG']['tl_poll_option']['new'] = array('Nowa opcja', 'Utwórz nową opcję'); 39 | $GLOBALS['TL_LANG']['tl_poll_option']['edit'] = array('Edytuj opcję', 'Edytuj opcję ID %s'); 40 | $GLOBALS['TL_LANG']['tl_poll_option']['editheader'] = array('Edytuj ustawienia sondy', 'Edytuj ustawienia sondy ID %s'); 41 | $GLOBALS['TL_LANG']['tl_poll_option']['copy'] = array('Duplikuj opcję', 'Duplikuj opcję ID %s'); 42 | $GLOBALS['TL_LANG']['tl_poll_option']['delete'] = array('Usuń opcję', 'Usuń opcję ID %s'); 43 | $GLOBALS['TL_LANG']['tl_poll_option']['show'] = array('Szczegóły opcji', 'Pokaż szczegóły opcji ID %s'); 44 | $GLOBALS['TL_LANG']['tl_poll_option']['toggle'] = array('Publikuj/ukryj opcję', 'Publikuj/ukryj opcję ID %s'); 45 | $GLOBALS['TL_LANG']['tl_poll_option']['votes'] = array('Pokaż głosy', 'Pokaż głosy dla opcji ID %s'); 46 | $GLOBALS['TL_LANG']['tl_poll_option']['pastenew'] = array('Dodaj nową na górze', 'Dodaj nową po opcji ID %s'); 47 | $GLOBALS['TL_LANG']['tl_poll_option']['reset'] = array('Resetuj sondę', 'Resetuj sondę i usuń wszystkie głosy', 'Czy na pewno chcesz zresetować sondę i usunąć wszystkie głosy? Ta operacja nie może być cofnięta!'); 48 | -------------------------------------------------------------------------------- /languages/pl/tl_poll_votes.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | 15 | /** 16 | * Fields 17 | */ 18 | $GLOBALS['TL_LANG']['tl_poll_votes']['tstamp'] = array('Data głosowania'); 19 | $GLOBALS['TL_LANG']['tl_poll_votes']['ip'] = array('Adres IP'); 20 | $GLOBALS['TL_LANG']['tl_poll_votes']['member'] = array('Użytkownik'); 21 | 22 | 23 | /** 24 | * Reference 25 | */ 26 | $GLOBALS['TL_LANG']['tl_poll_votes']['anonymous'] = '(anonimowy)'; 27 | 28 | 29 | /** 30 | * Buttons 31 | */ 32 | $GLOBALS['TL_LANG']['tl_poll_votes']['delete'] = array('Usuń głos', 'Usuń głos ID %s'); 33 | $GLOBALS['TL_LANG']['tl_poll_votes']['show'] = array('Szczegóły głosu', 'Pokaż szczegóły głosu ID %s'); 34 | -------------------------------------------------------------------------------- /models/PollModel.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | namespace Polls; 15 | 16 | /** 17 | * Class PollModel 18 | * 19 | * Reads and writes polls. 20 | */ 21 | class PollModel extends \Model 22 | { 23 | 24 | /** 25 | * Table name 26 | * @var string 27 | */ 28 | protected static $strTable = 'tl_poll'; 29 | } 30 | -------------------------------------------------------------------------------- /models/PollOptionModel.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | namespace Polls; 15 | 16 | /** 17 | * Class PollOptionModel 18 | * 19 | * Reads and writes poll options. 20 | */ 21 | class PollOptionModel extends \Model 22 | { 23 | 24 | /** 25 | * Table name 26 | * @var string 27 | */ 28 | protected static $strTable = 'tl_poll_option'; 29 | } 30 | -------------------------------------------------------------------------------- /models/PollVotesModel.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | namespace Polls; 15 | 16 | /** 17 | * Class PollVotesModel 18 | * 19 | * Reads and writes poll votes. 20 | */ 21 | class PollVotesModel extends \Model 22 | { 23 | 24 | /** 25 | * Table name 26 | * @var string 27 | */ 28 | protected static $strTable = 'tl_poll_votes'; 29 | } 30 | -------------------------------------------------------------------------------- /modules/ModulePoll.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | namespace Polls; 15 | 16 | 17 | /** 18 | * Front end module "poll". 19 | */ 20 | class ModulePoll extends \Module 21 | { 22 | 23 | /** 24 | * Template 25 | * @var string 26 | */ 27 | protected $strTemplate = 'mod_poll'; 28 | 29 | 30 | /** 31 | * Display a wildcard in the back end 32 | * @return string 33 | */ 34 | public function generate() 35 | { 36 | if (TL_MODE == 'BE') 37 | { 38 | $objTemplate = new \BackendTemplate('be_wildcard'); 39 | 40 | $objTemplate->wildcard = '### POLL ###'; 41 | $objTemplate->title = $this->headline; 42 | $objTemplate->id = $this->id; 43 | $objTemplate->link = $this->name; 44 | $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; 45 | 46 | return $objTemplate->parse(); 47 | } 48 | 49 | // Return if there is no poll 50 | if (!$this->poll && !$this->poll_current) 51 | { 52 | return ''; 53 | } 54 | 55 | return parent::generate(); 56 | } 57 | 58 | 59 | /** 60 | * Generate the module 61 | */ 62 | protected function compile() 63 | { 64 | $intPoll = $this->poll; 65 | 66 | // Try to find the active poll 67 | if ($this->poll_current) 68 | { 69 | $time = time(); 70 | $objCurrentPoll = $this->Database->prepare("SELECT id FROM tl_poll WHERE (showStart='' OR showStart?)" . (!BE_USER_LOGGED_IN ? " AND published=1" : "") . " ORDER BY showStart DESC, activeStart DESC") 71 | ->limit(1) 72 | ->execute($time, $time); 73 | 74 | if ($objCurrentPoll->numRows) 75 | { 76 | $intPoll = $objCurrentPoll->id; 77 | } 78 | } 79 | 80 | // Return if there is no poll 81 | if (!$intPoll) 82 | { 83 | $this->Template->poll = ''; 84 | return; 85 | } 86 | 87 | $objPoll = new \Poll($intPoll); 88 | $this->Template->poll = $objPoll->generate(); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /modules/ModulePollList.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Kamil Kuzminski 11 | * @license LGPL 12 | */ 13 | 14 | namespace Polls; 15 | 16 | 17 | /** 18 | * Front end module "poll list". 19 | */ 20 | class ModulePollList extends \Module 21 | { 22 | 23 | /** 24 | * Template 25 | * @var string 26 | */ 27 | protected $strTemplate = 'mod_polllist'; 28 | 29 | 30 | /** 31 | * Display a wildcard in the back end 32 | * @return string 33 | */ 34 | public function generate() 35 | { 36 | if (TL_MODE == 'BE') 37 | { 38 | $objTemplate = new \BackendTemplate('be_wildcard'); 39 | 40 | $objTemplate->wildcard = '### POLL LIST ###'; 41 | $objTemplate->title = $this->headline; 42 | $objTemplate->id = $this->id; 43 | $objTemplate->link = $this->name; 44 | $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; 45 | 46 | return $objTemplate->parse(); 47 | } 48 | 49 | return parent::generate(); 50 | } 51 | 52 | 53 | /** 54 | * Generate the module 55 | */ 56 | protected function compile() 57 | { 58 | $time = time(); 59 | $offset = 0; 60 | $limit = null; 61 | $arrPolls = array(); 62 | $arrWhere = array(); 63 | 64 | // Maximum number of items 65 | if ($this->numberOfItems > 0) 66 | { 67 | $limit = $this->numberOfItems; 68 | } 69 | 70 | // Build the criteria 71 | if ($this->poll_visible == 'yes') 72 | { 73 | $arrWhere[] = "(showStart='' OR showStart<$time) AND (showStop='' OR showStop>$time)"; 74 | } 75 | elseif ($this->poll_visible == 'no') 76 | { 77 | $arrWhere[] = "((showStart!='' AND showStart>=$time) OR (showStop!='' AND showStop<=$time))"; 78 | } 79 | if ($this->poll_active == 'yes') 80 | { 81 | $arrWhere[] = "closed='' AND (activeStart='' OR activeStart<$time) AND (activeStop='' OR activeStop>$time)"; 82 | } 83 | elseif ($this->poll_active == 'no') 84 | { 85 | $arrWhere[] = "(closed=1 OR ((activeStart!='' AND activeStart>=$time) OR (activeStop!='' AND activeStop<=$time)))"; 86 | } 87 | if ($this->poll_featured == 'yes') 88 | { 89 | $arrWhere[] = "featured=1"; 90 | } 91 | elseif ($this->poll_featured == 'no') 92 | { 93 | $arrWhere[] = "featured=''"; 94 | } 95 | if (!BE_USER_LOGGED_IN) 96 | { 97 | $arrWhere[] = "published=1"; 98 | } 99 | 100 | $total = $this->Database->execute("SELECT COUNT(*) AS total FROM tl_poll" . (!empty($arrWhere) ? " WHERE ".implode(" AND ", $arrWhere) : ""))->total; 101 | 102 | // Split the results 103 | if ($this->perPage > 0 && (!isset($limit) || $this->numberOfItems > $this->perPage)) 104 | { 105 | // Adjust the overall limit 106 | if (isset($limit)) 107 | { 108 | $total = min($limit, $total); 109 | } 110 | 111 | // Get the current page 112 | $id = 'page_n' . $this->id; 113 | $page = \Input::get($id) ?: 1; 114 | 115 | // Do not index or cache the page if the page number is outside the range 116 | if ($page < 1 || $page > max(ceil($total/$this->perPage), 1)) 117 | { 118 | global $objPage; 119 | $objPage->noSearch = 1; 120 | $objPage->cache = 0; 121 | 122 | // Send a 404 header 123 | header('HTTP/1.1 404 Not Found'); 124 | return; 125 | } 126 | 127 | // Set limit and offset 128 | $limit = $this->perPage; 129 | $offset = (max($page, 1) - 1) * $this->perPage; 130 | 131 | // Overall limit 132 | if ($offset + $limit > $total) 133 | { 134 | $limit = $total - $offset; 135 | } 136 | 137 | // Add the pagination menu 138 | $objPagination = new \Pagination($total, $this->perPage, 7, $id); 139 | $this->Template->pagination = $objPagination->generate("\n "); 140 | } 141 | 142 | $objPollsStmt = $this->Database->prepare("SELECT * FROM tl_poll" . (!empty($arrWhere) ? " WHERE ".implode(" AND ", $arrWhere) : "") . " ORDER BY closed ASC, showStart DESC, activeStart DESC"); 143 | 144 | // Limit the result 145 | if (isset($limit)) 146 | { 147 | $objPollsStmt->limit($limit, $offset); 148 | } 149 | 150 | $objPolls = $objPollsStmt->execute(); 151 | 152 | // Generate the polls 153 | while ($objPolls->next()) 154 | { 155 | $objPoll = new \Poll($objPolls->id); 156 | $arrPolls[] = $objPoll->generate(); 157 | } 158 | 159 | $this->Template->polls = $arrPolls; 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /templates/ce_poll.html5: -------------------------------------------------------------------------------- 1 | 2 |
cssID; ?>style): ?> style="style; ?>"> 3 | headline): ?> 4 | 5 | <hl; ?>>headline; ?>hl; ?>> 6 | 7 | 8 | poll; ?> 9 | 10 |
11 | -------------------------------------------------------------------------------- /templates/ce_poll.xhtml: -------------------------------------------------------------------------------- 1 | 2 |
cssID; ?>style): ?> style="style; ?>"> 3 | headline): ?> 4 | 5 | <hl; ?>>headline; ?>hl; ?>> 6 | 7 | 8 | poll; ?> 9 | 10 |
11 | -------------------------------------------------------------------------------- /templates/mod_poll.html5: -------------------------------------------------------------------------------- 1 | 2 |
cssID; ?>style): ?> style="style; ?>"> 3 | headline): ?> 4 | 5 | <hl; ?>>headline; ?>hl; ?>> 6 | 7 | 8 | poll; ?> 9 | 10 |
11 | -------------------------------------------------------------------------------- /templates/mod_poll.xhtml: -------------------------------------------------------------------------------- 1 | 2 |
cssID; ?>style): ?> style="style; ?>"> 3 | headline): ?> 4 | 5 | <hl; ?>>headline; ?>hl; ?>> 6 | 7 | 8 | poll; ?> 9 | 10 |
11 | -------------------------------------------------------------------------------- /templates/mod_polllist.html5: -------------------------------------------------------------------------------- 1 | 2 |
cssID; ?>style): ?> style="style; ?>"> 3 | headline): ?> 4 | 5 | <hl; ?>>headline; ?>hl; ?>> 6 | 7 | 8 | polls as $poll) echo $poll; ?> 9 | pagination; ?> 10 | 11 |
12 | -------------------------------------------------------------------------------- /templates/mod_polllist.xhtml: -------------------------------------------------------------------------------- 1 | 2 |
cssID; ?>style): ?> style="style; ?>"> 3 | headline): ?> 4 | 5 | <hl; ?>>headline; ?>hl; ?>> 6 | 7 | 8 | polls as $poll) echo $poll; ?> 9 | pagination; ?> 10 | 11 |
12 | -------------------------------------------------------------------------------- /templates/poll_default.html5: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |

title; ?>

6 | message): ?> 7 |

message; ?>

8 | 9 | showResults): ?> 10 | 11 |
12 |
    13 | results as $i => $result): ?> 14 |
  • % -
  • 15 | 16 |
17 | formLink; ?> 18 |
19 | 20 | showForm): ?> 21 | 22 |
23 |
24 |
25 | 26 | 27 |
28 | options->generateWithError(); ?> 29 |
30 |
31 | submit): ?> 32 | 33 | 34 | resultsLink; ?> 35 |
36 |
37 |
38 | 39 |
40 | 41 | 42 |
43 | 44 | -------------------------------------------------------------------------------- /templates/poll_default.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |

title; ?>

6 | message): ?> 7 |

message; ?>

8 | 9 | showResults): ?> 10 | 11 |
12 |
    13 | results as $i => $result): ?> 14 |
  • % -
  • 15 | 16 |
17 | formLink; ?> 18 |
19 | 20 | showForm): ?> 21 | 22 |
23 |
24 |
25 | 26 | 27 |
28 | options->generateWithError(); ?> 29 |
30 |
31 | submit): ?> 32 | 33 | 34 | resultsLink; ?> 35 |
36 |
37 |
38 | 39 |
40 | 41 | 42 |
43 | 44 | --------------------------------------------------------------------------------