├── styles ├── subsilver2 │ ├── template │ │ └── event │ │ │ ├── overall_header_head_append.html │ │ │ ├── overall_footer_after.html │ │ │ ├── viewtopic_body_poll_option_after.html │ │ │ └── posting_poll_body_options_after.html │ └── theme │ │ └── advancedpolls.css └── prosilver │ ├── template │ ├── event │ │ ├── overall_header_head_append.html │ │ ├── viewtopic_body_poll_question_prepend.html │ │ ├── posting_editor_subject_before.html │ │ ├── viewtopic_body_poll_option_after.html │ │ └── posting_poll_body_options_after.html │ ├── js │ │ ├── scoring_preview.js │ │ ├── poll_length_reposition.js │ │ ├── scoring_topic.js │ │ ├── onload.js │ │ ├── poll_length_posting.js │ │ └── functions.js │ └── lib │ │ └── jxtools.js │ └── theme │ └── advancedpolls.css ├── migrations ├── v1_2_1_data_permissions.php ├── v1_1_0_step3_configs.php ├── v1_2_0_data_permissions.php ├── v1_0_0_data_module.php ├── v1_1_0_step2_data_revert_null_votes.php ├── v1_0_0_configs.php ├── v1_1_0_step1_data_permissions.php ├── v1_0_0_schema.php ├── v1_2_0_schema.php └── v1_2_0_configs.php ├── acp ├── advancedpolls_info.php └── advancedpolls_module.php ├── composer.json ├── adm └── style │ └── acp_advancedpolls.html ├── language ├── en │ ├── advancedpolls_common.php │ ├── permissions_advancedpolls.php │ ├── info_acp_advancedpolls.php │ └── advancedpolls.php ├── it │ ├── advancedpolls_common.php │ ├── permissions_advancedpolls.php │ ├── info_acp_advancedpolls.php │ └── advancedpolls.php ├── es │ ├── advancedpolls_common.php │ ├── permissions_advancedpolls.php │ ├── info_acp_advancedpolls.php │ └── advancedpolls.php ├── ru │ ├── advancedpolls_common.php │ ├── permissions_advancedpolls.php │ ├── info_acp_advancedpolls.php │ └── advancedpolls.php ├── nl │ ├── advancedpolls_common.php │ ├── permissions_advancedpolls.php │ ├── info_acp_advancedpolls.php │ └── advancedpolls.php ├── fr │ ├── advancedpolls_common.php │ ├── permissions_advancedpolls.php │ ├── info_acp_advancedpolls.php │ └── advancedpolls.php ├── de │ ├── permissions_advancedpolls.php │ ├── advancedpolls.php │ └── info_acp_advancedpolls.php ├── sv │ ├── permissions_advancedpolls.php │ ├── advancedpolls.php │ └── info_acp_advancedpolls.php └── he │ ├── permissions_advancedpolls.php │ ├── advancedpolls.php │ └── info_acp_advancedpolls.php ├── config └── services.yml ├── ext.php ├── cron └── task │ └── pollend.php ├── notification └── pollended.php ├── event └── listener.php └── license.txt /styles/subsilver2/template/event/overall_header_head_append.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /styles/prosilver/template/event/overall_header_head_append.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | -------------------------------------------------------------------------------- /styles/prosilver/template/event/viewtopic_body_poll_question_prepend.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /styles/subsilver2/theme/advancedpolls.css: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Advanced Polls 4 | * 5 | * @copyright (c) 2015 Wolfsblvt ( www.pinkes-forum.de ) 6 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 7 | * @author Clemens Husung (Wolfsblvt) 8 | */ 9 | 10 | span.poll_vote_notice { 11 | display: block; 12 | } -------------------------------------------------------------------------------- /styles/subsilver2/template/event/overall_footer_after.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /styles/prosilver/theme/advancedpolls.css: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Advanced Polls 4 | * 5 | * @copyright (c) 2015 Wolfsblvt ( www.pinkes-forum.de ) 6 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 7 | * @author Clemens Husung (Wolfsblvt) 8 | */ 9 | 10 | fieldset.polls dl.poll_voters_box { 11 | margin-top: 0px; 12 | padding-top: 0px; 13 | margin-left: 35px; 14 | border-top: 0px solid transparent; 15 | } 16 | span.poll_vote_notice { 17 | display: block; 18 | } 19 | 20 | dd label { 21 | white-space: normal !important; 22 | } -------------------------------------------------------------------------------- /styles/prosilver/template/js/scoring_preview.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Advanced Polls - Scoring Polls 4 | * 5 | * @copyright (c) 2015 javiexin ( www.exincastillos.es ) 6 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 7 | * @author Javier Lopez (javiexin) 8 | */ 9 | 10 | $(document).ready(function () { 11 | var $poll = $('#preview fieldset.polls'); 12 | var $container = $("#ap_poll_preview_hidden_container"); 13 | var $content = $container.contents(); 14 | 15 | $poll.children().remove(); 16 | $poll.append($content); 17 | $container.remove(); 18 | }); 19 | -------------------------------------------------------------------------------- /styles/prosilver/template/js/poll_length_reposition.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Advanced Polls - Poll Length Reposition 4 | * 5 | * @copyright (c) 2015 javiexin ( www.exincastillos.es ) 6 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 7 | * @author Javier Lopez (javiexin) 8 | */ 9 | 10 | $(document).ready(function () { 11 | var $pollLengthDl = $('label > #poll_length').closest('dl'); 12 | var $container = $("#ap_poll_length_container"); 13 | var $content = $container.contents(); 14 | 15 | $pollLengthDl.prev('dl').remove(); 16 | $pollLengthDl.replaceWith($content); 17 | $container.remove(); 18 | }); 19 | -------------------------------------------------------------------------------- /migrations/v1_2_1_data_permissions.php: -------------------------------------------------------------------------------- 1 | '\wolfsblvt\advancedpolls\acp\advancedpolls_module', 19 | 'title' => 'AP_TITLE_ACP', 20 | 'modes' => array( 21 | 'settings' => array('title' => 'AP_SETTINGS_ACP', 'auth' => 'ext_wolfsblvt/advancedpolls && acl_a_board', 'cat' => array('AP_TITLE_ACP')), 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /migrations/v1_1_0_step3_configs.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | class="most-votes"> 6 | 7 | 8 | 9 | 10 | 11 | {L_AP_VOTERS}{L_COLON} {poll_option.VOTER_LIST}{L_AP_NONE} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /migrations/v1_2_0_data_permissions.php: -------------------------------------------------------------------------------- 1 | '\wolfsblvt\advancedpolls\acp\advancedpolls_module', 33 | 'modes' => array('settings'), 34 | ), 35 | )), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /migrations/v1_1_0_step2_data_revert_null_votes.php: -------------------------------------------------------------------------------- 1 | db->sql_query($sql); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /migrations/v1_0_0_configs.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 22 | 23 | -------------------------------------------------------------------------------- /styles/subsilver2/template/event/posting_poll_body_options_after.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {L_AP_POLL_VOTES_HIDE}{L_COLON}
{L_AP_POLL_VOTES_HIDE_EXPLAIN} 4 | 5 | 6 | 7 | 8 | 9 | {L_AP_POLL_VOTERS_SHOW}{L_COLON}
{L_AP_POLL_VOTERS_SHOW_EXPLAIN} 10 | 11 | 12 | 13 | 14 | 15 | {L_AP_POLL_VOTERS_LIMIT}{L_COLON}
{L_AP_POLL_VOTERS_LIMIT_EXPLAIN} 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /migrations/v1_0_0_schema.php: -------------------------------------------------------------------------------- 1 | array( 24 | $this->table_prefix . 'topics' => array( 25 | 'wolfsblvt_poll_votes_hide' => array('BOOL', 0), 26 | 'wolfsblvt_poll_voters_show' => array('BOOL', 0), 27 | 'wolfsblvt_poll_voters_limit' => array('BOOL', 0), 28 | ), 29 | ), 30 | ); 31 | } 32 | 33 | public function revert_schema() 34 | { 35 | return array( 36 | 'drop_columns' => array( 37 | $this->table_prefix . 'topics' => array( 38 | 'wolfsblvt_poll_votes_hide', 39 | 'wolfsblvt_poll_voters_show', 40 | 'wolfsblvt_poll_voters_limit', 41 | ), 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wolfsblvt/advancedpolls", 3 | "type": "phpbb-extension", 4 | "description": "Advances the core poll system of phpBB with new features like hiding votes till end, showing poll voters, limiting the votes and more.", 5 | "homepage": "http://pinkes-forum.de/dev/find.php?ext=advancedpolls", 6 | "version": "1.2.1-b1", 7 | "time": "2015-07-15", 8 | "keywords": ["phpbb", "extension", "advancedpolls", "advanced", "poll"], 9 | "license": "GPL-2.0", 10 | "authors": [ 11 | { 12 | "name": "Clemens Husung (Wolfsblvt)", 13 | "homepage": "http://www.pinkes-forum.de/", 14 | "email": "wolfsblvt@gmx.de", 15 | "role": "Main Developer" 16 | }, 17 | { 18 | "name": "Javier Lopez (javiexin)", 19 | "email": "javiexin@gmail.com", 20 | "role": "Developer" 21 | } 22 | ], 23 | "require": { 24 | "php": ">=5.3.3" 25 | }, 26 | "require-dev": { 27 | "phpbb/epv": "dev-master", 28 | "codeclimate/php-test-reporter": "dev-master" 29 | }, 30 | "extra": { 31 | "display-name": "Advanced Polls", 32 | "soft-require": { 33 | "phpbb/phpbb": ">=3.1.5,<3.2.*@dev" 34 | }, 35 | "version-check": { 36 | "host": "pinkes-forum.de", 37 | "directory": "/dev/advancedpolls", 38 | "filename": "version.json" 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /adm/style/acp_advancedpolls.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

{L_AP_TITLE}

6 | 7 |

{L_AP_TITLE_EXPLAIN}

8 |

{L_AP_COPYRIGHT}

9 | 10 | 11 |
12 |

{L_WARNING}

13 |

{ERROR_MSG}

14 |
15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | {options.LEGEND} 28 | 29 | 30 |
31 |

{options.TITLE_EXPLAIN}
32 |
{options.CONTENT}
33 |
34 | 35 | 36 | 37 | 38 |

39 |   40 | 41 |

42 | {S_FORM_TOKEN} 43 |
44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /language/en/advancedpolls_common.php: -------------------------------------------------------------------------------- 1 | 'Results are visible for poll:', 39 | 'NOTIFICATION_TYPE_AP_POLL_ENDED' => 'Results are now visible for a poll in which you have voted', 40 | )); 41 | -------------------------------------------------------------------------------- /language/it/advancedpolls_common.php: -------------------------------------------------------------------------------- 1 | 'Disponibili i risultati del sondaggio:', 40 | 'NOTIFICATION_TYPE_AP_POLL_ENDED' => 'I risultati del sondaggio in cui hai votato sono ora disponibili', 41 | )); 42 | -------------------------------------------------------------------------------- /migrations/v1_2_0_schema.php: -------------------------------------------------------------------------------- 1 | array( 24 | $this->table_prefix . 'topics' => array( 25 | 'wolfsblvt_poll_show_ordered' => array('BOOL', 0), 26 | 'wolfsblvt_poll_max_value' => array('UINT:4', 1), 27 | 'wolfsblvt_poll_total_value' => array('UINT:4', 1), 28 | ), 29 | $this->table_prefix . 'poll_votes' => array( 30 | 'wolfsblvt_poll_option_value' => array('UINT:4', 1), 31 | ), 32 | ), 33 | ); 34 | } 35 | 36 | public function revert_schema() 37 | { 38 | return array( 39 | 'drop_columns' => array( 40 | $this->table_prefix . 'topics' => array( 41 | 'wolfsblvt_poll_show_ordered', 42 | 'wolfsblvt_poll_max_value', 43 | 'wolfsblvt_poll_total_value', 44 | ), 45 | $this->table_prefix . 'poll_votes' => array( 46 | 'wolfsblvt_poll_option_value', 47 | ), 48 | ), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /language/es/advancedpolls_common.php: -------------------------------------------------------------------------------- 1 | 'Resultados visibles para la encuesta:', 40 | 'NOTIFICATION_TYPE_AP_POLL_ENDED' => 'Ya se pueden ver los resultados de una encuesta en la que ha votado', 41 | )); 42 | -------------------------------------------------------------------------------- /language/ru/advancedpolls_common.php: -------------------------------------------------------------------------------- 1 | 'Доступны результаты опроса:', 40 | 'NOTIFICATION_TYPE_AP_POLL_ENDED' => 'Результаты опроса, в котором вы голосовали, стали открыты для просмотра', 41 | )); 42 | -------------------------------------------------------------------------------- /language/nl/advancedpolls_common.php: -------------------------------------------------------------------------------- 1 | 'Resultaten zijn zichtbaar voor de peiling:', 40 | 'NOTIFICATION_TYPE_AP_POLL_ENDED' => 'Resultaten voor de peiling waarop u heeft gestemt zijn nu zichtbaar', 41 | )); 42 | -------------------------------------------------------------------------------- /language/fr/advancedpolls_common.php: -------------------------------------------------------------------------------- 1 | 8 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 9 | * 10 | */ 11 | 12 | /** 13 | * DO NOT CHANGE 14 | */ 15 | if (!defined('IN_PHPBB')) 16 | { 17 | exit; 18 | } 19 | 20 | if (empty($lang) || !is_array($lang)) 21 | { 22 | $lang = array(); 23 | } 24 | 25 | // DEVELOPERS PLEASE NOTE 26 | // 27 | // All language files should use UTF-8 as their encoding and the files must not contain a BOM. 28 | // 29 | // Placeholders can now contain order information, e.g. instead of 30 | // 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows 31 | // translators to re-order the output of data while ensuring it remains correct 32 | // 33 | // You do not need this where single placeholders are used, e.g. 'Message %d' is fine 34 | // equally where a string contains only two placeholders which are used to wrap text 35 | // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine 36 | // 37 | // Some characters you may want to copy&paste: 38 | // ’ « » “ ” … 39 | // 40 | 41 | $lang = array_merge($lang, array( 42 | 'NOTIFICATION_AP_POLL_ENDED' => 'Les résultats d’un sondage sont disponibles :', 43 | 'NOTIFICATION_TYPE_AP_POLL_ENDED' => 'Les résultats d’un sondage auquel vous avez participé sont disponibles', 44 | )); 45 | -------------------------------------------------------------------------------- /language/fr/permissions_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 8 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 9 | * 10 | */ 11 | 12 | /** 13 | * DO NOT CHANGE 14 | */ 15 | if (!defined('IN_PHPBB')) 16 | { 17 | exit; 18 | } 19 | 20 | if (empty($lang) || !is_array($lang)) 21 | { 22 | $lang = array(); 23 | } 24 | 25 | // DEVELOPERS PLEASE NOTE 26 | // 27 | // All language files should use UTF-8 as their encoding and the files must not contain a BOM. 28 | // 29 | // Placeholders can now contain order information, e.g. instead of 30 | // 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows 31 | // translators to re-order the output of data while ensuring it remains correct 32 | // 33 | // You do not need this where single placeholders are used, e.g. 'Message %d' is fine 34 | // equally where a string contains only two placeholders which are used to wrap text 35 | // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine 36 | // 37 | // Some characters you may want to copy&paste: 38 | // ’ « » “ ” … 39 | // 40 | 41 | // User Permissions 42 | $lang = array_merge($lang, array( 43 | 'ACL_F_SEEVOTERS' => 'Peut voir le nom des votants des sondages.', 44 | 'ACL_M_SEEVOTERS' => 'Peut voir le nom des votants des sondages.', 45 | )); 46 | -------------------------------------------------------------------------------- /migrations/v1_2_0_configs.php: -------------------------------------------------------------------------------- 1 | 'Kann die Benutzer sehen, abgestimmt haben, wenn aktiviert', 47 | )); 48 | -------------------------------------------------------------------------------- /language/en/permissions_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Can see poll voters', 47 | 'ACL_M_SEEVOTERS' => 'Can view poll voters', 48 | )); 49 | -------------------------------------------------------------------------------- /language/sv/permissions_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Kan se vem som röstat, om detta har aktiverats', 48 | )); 49 | -------------------------------------------------------------------------------- /language/he/permissions_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'אם מופעל יכול לצפות במצביעים בסקר', 48 | )); 49 | -------------------------------------------------------------------------------- /language/es/permissions_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Puede ver los votantes de la encuesta', 48 | 'ACL_M_SEEVOTERS' => 'Puede ver los votantes de la encuesta', 49 | )); 50 | -------------------------------------------------------------------------------- /language/nl/permissions_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Kunnen stemmers van de peilingen zien', 48 | 'ACL_M_SEEVOTERS' => 'Kunnen stemmers van de peilingen bekijken', 49 | )); 50 | -------------------------------------------------------------------------------- /styles/prosilver/template/event/viewtopic_body_poll_option_after.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
 
16 |
{L_AP_VOTERS}{poll_option.AP_VOTERS}{L_COLON} {poll_option.AP_VOTER_LIST}{L_AP_NONE}
17 |
18 | 19 | 20 | 21 | 30 | 31 | -------------------------------------------------------------------------------- /language/it/permissions_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Può vedere votanti', 49 | 'ACL_F_SEEVOTERS' => 'Può vedere votanti', 50 | 'ACL_M_SEEVOTERS' => 'Può vedere votanti', // There is no actual difference in Italian between "to see" and "to view". 51 | )); 52 | -------------------------------------------------------------------------------- /language/ru/permissions_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Может видеть голосовавших', 49 | 'ACL_M_SEEVOTERS' => 'Может просматривать голосовавших', 50 | )); 51 | -------------------------------------------------------------------------------- /language/he/advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'סקרים מתקדמים', 40 | 41 | 'AP_VOTES_HIDDEN' => 'הצבעות נסתרות', 42 | 'AP_POLL_RUN_TILL_APPEND' => ', עד אז כל ההצבעות נסתרות.', 43 | 'AP_VOTERS' => 'מצביעים', 44 | 'AP_NONE' => 'אין', 45 | 46 | 'AP_POLL_CANT_VOTE' => 'אתה לא יכול להשתתף בסקר זה. סיבה-', 47 | 'AP_POLL_REASON_NOT_POSTED' => 'לא כתבת הודעה בנושא זה', 48 | 'AP_POLL_VOTES_ARE_VISIBLE' => 'שים לב שההצבעה שלך גלויה.', 49 | 'AP_POLL_DONT_VOTE_SHOW_RESULTS' => 'הצג תוצאות מבלי להצביע', 50 | 51 | 'AP_POLL_VOTES_HIDE' => 'הסתר הצבעות', 52 | 'AP_POLL_VOTES_HIDE_EXPLAIN' => 'אם מופעל ההצבעות נסתרות עד סיום הסקר. אפשרות זו עובדת רק אם לסקר יש מועד סיום.', 53 | 'AP_POLL_VOTERS_SHOW' => 'הצג מצביעים', 54 | 'AP_POLL_VOTERS_SHOW_EXPLAIN' => 'אם מופעל בעלי הרשאות יוכלו לראות מי הצביע. שים לב שמצביעים עדיין יהיו נסתרים אם האפשרות מופעלות.', 55 | 'AP_POLL_VOTERS_LIMIT' => 'הגבל הצבעות', 56 | 'AP_POLL_VOTERS_LIMIT_EXPLAIN' => 'אם מופעל רק מי שכתב הודעה בנושא זה יכול להצביע.', 57 | )); 58 | -------------------------------------------------------------------------------- /language/he/info_acp_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'סקרים מתקדמים', 40 | 'AP_SETTINGS_ACP' => 'הגדרות', 41 | 42 | 'AP_TITLE' => 'סקרים מתקדמים', 43 | 'AP_TITLE_EXPLAIN' => 'מקדם את מערכת הסקרים של phpBB עם אפשרויות חדשות כגון הסתרת הצבעות עד סוף הסקר, הצגת שמות המצביעים ועוד.', 44 | 'AP_COPYRIGHT' => '© 2015 Wolfsblvt (www.pinkes-forum.de) [עוד תוספות מאת Wolfsblvt]', 45 | 46 | 'AP_SETTINGS' => 'הגדרות סקרים מתקדמים', 47 | 48 | 'AP_ACT_VOTES_HIDE' => 'הפעלת הסתרת מצביעים', 49 | 'AP_ACT_VOTES_HIDE_EXPLAIN' => 'מפעיל את האפשרות לבחר להסתיר את ההצבעות עד תום הסקר.', 50 | 'AP_ACT_VOTERS_SHOW' => 'הפעל הצגת מצביעים', 51 | 'AP_ACT_VOTERS_SHOW_EXPLAIN' => 'מפעיל את האפשרות לבחור ששמות המצביעים יוצגו בתוצאה שהם בחרו.', 52 | 'AP_ACT_VOTERS_LIMIT' => 'הפעל הגבלת מצביעים', 53 | 'AP_ACT_VOTERS_LIMIT_EXPLAIN' => 'מפעיל את האפשרות לבחור שרק מי שפרסם הודעה בנושא יכול להצביע בסקר.', 54 | 55 | 'AP_DEFAULT_VOTES_HIDE' => 'ברירת המחדר עבור הסתרת מצביעים', 56 | 'AP_DEFAULT_VOTERS_SHOW' => 'ברירת המחדל עבור הצגת מצביעים', 57 | 'AP_DEFAULT_VOTERS_LIMIT' => 'ברירת המחדל עבור הגבלת מצביעים', 58 | 'AP_DEFAULT_VOTES_CHANGE' => 'ברירת המחדל עבור שינוי הצבעות', 59 | 60 | )); 61 | -------------------------------------------------------------------------------- /styles/prosilver/template/lib/jxtools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * JxTools - JavaScript utility library 3 | * 4 | * @copyright (c) 2015 javiexin ( www.exincastillos.es ) 5 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 6 | * @author Javier Lopez (javiexin) 7 | */ 8 | 9 | var jxtools = {}; 10 | 11 | (function($) { // Avoid conflicts with other libraries 12 | 13 | 'use strict'; 14 | 15 | /* 16 | * JxTools - Perform actions on the DOM 17 | * 18 | * If the JxDom set of attributes is present in a DOM element, it is processed by this function, in the following order 19 | * [jxdom-target] Attribute that specifies (with a DOM selector) the DOM object that is the initial target of this operation; optional, defaults to $(this) 20 | * [jxdom-closest] DOM selector to apply to the target, to find the appropriate ancestor (starting with $(this)), that becomes the new target; optional 21 | * [jxdom-find] DOM selector to apply to the current target, to find the appropriate descendant, that becomes the new target; optional 22 | * [jxdom-action] Action to perform on the final target, using the contents of $(this) as parameter (if appropriate); mandatory 23 | * Actions may be: remove|replace|before|after|prepend|append 24 | * Each step should yield a single element as result, otherwise, the results are undefined 25 | * When these operations are completed, this object is discarded (removed from the DOM) 26 | */ 27 | $('[jxdom-action]').each(function() { 28 | var $this = $(this); 29 | var $contents = $this.contents(); 30 | var domTarget = $this.attr('jxdom-target'), 31 | domClosest = $this.attr('jxdom-closest'), 32 | domFind = $this.attr('jxdom-find'), 33 | domAction = $this.attr('jxdom-action'); 34 | var $target; 35 | 36 | $target = (domTarget !== undefined) ? $(domTarget) : $this; 37 | $target = (domClosest !== undefined) ? $target.closest(domClosest) : $target; 38 | $target = (domFind !== undefined) ? $target.find(domFind) : $target; 39 | 40 | switch (domAction) { 41 | case 'replace': 42 | $target.replaceWith($contents); 43 | break; 44 | case 'remove': 45 | $target.remove(); 46 | break; 47 | case 'before': 48 | $target.before($contents); 49 | break; 50 | case 'after': 51 | $target.after($contents); 52 | break; 53 | case 'append': 54 | $target.append($contents); 55 | break; 56 | case 'prepend': 57 | $target.prepend($contents); 58 | break; 59 | default: 60 | break; 61 | } 62 | $this.remove(); 63 | }); 64 | 65 | })(jQuery); // Avoid conflicts with other libraries 66 | -------------------------------------------------------------------------------- /language/sv/advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Avancerade omröstningar', 40 | 41 | 'AP_VOTES_HIDDEN' => 'Omröstningar dolda', 42 | 'AP_POLL_RUN_TILL_APPEND' => 'Alla omröstningar döljs fram till denna tidpunkt.', 43 | 'AP_VOTERS' => 'Medlemmar som har röstat', 44 | 'AP_NONE' => 'Inga', 45 | 46 | 'AP_POLL_CANT_VOTE' => 'Du kan ej rösta. Orsak', 47 | 'AP_POLL_REASON_NOT_POSTED' => 'du har ej skrivit något inlägg i denna tråd.', 48 | 'AP_POLL_VOTES_ARE_VISIBLE' => 'Beakta att ditt medlemsnamn kommer att visas vid ditt val i resultatet.', 49 | 'AP_POLL_DONT_VOTE_SHOW_RESULTS' => 'Rösta ej, visa resultat', 50 | 51 | 'AP_POLL_VOTES_HIDE' => 'Dölj omröstningen', 52 | 'AP_POLL_VOTES_HIDE_EXPLAIN' => 'Om denna inställning aktiveras så döljs resultatet tills omröstningen har avslutats.
Denna inställning fungerar endast om ett slutdatum har ställts in för omröstningen.', 53 | 'AP_POLL_VOTERS_SHOW' => 'Visa medlemmar som har röstat', 54 | 'AP_POLL_VOTERS_SHOW_EXPLAIN' => 'Om denna inställning aktiveras så visas medlemsnamnet under motsvarande röst för alla med motsvarande behörighet.
Beakta att detta döljs om omröstningen är dold.', 55 | 'AP_POLL_VOTERS_LIMIT' => 'Inlägg förutsätts', 56 | 'AP_POLL_VOTERS_LIMIT_EXPLAIN' => 'Om denna inställning aktiveras så kan endast medlemmar rösta som har skrivit ett inlägg i tråden.', 57 | )); 58 | -------------------------------------------------------------------------------- /language/de/advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Advanced Polls', 39 | 40 | 'AP_VOTES_HIDDEN' => 'Abstimmungen verborgen', 41 | 'AP_POLL_RUN_TILL_APPEND' => ' Bis zu diesem Zeitpunkt werden alle Abstimmungen verborgen.', 42 | 'AP_VOTERS' => 'Benutzer, die abgestimmt haben', 43 | 'AP_NONE' => 'Keine', 44 | 45 | 'AP_POLL_CANT_VOTE' => 'Du kannst bei dieser Umfrage nicht abstimmen. Grund', 46 | 'AP_POLL_REASON_NOT_POSTED' => 'Du hast noch keinen Beitrag in diesem Thema geschrieben.', 47 | 'AP_POLL_VOTES_ARE_VISIBLE' => 'Bitte beachte, dass wenn du abstimmst, wird deine Stimme sichtbar sein.', 48 | 'AP_POLL_DONT_VOTE_SHOW_RESULTS' => 'Nicht abstimmen, Ergebnis anzeigen', 49 | 50 | 'AP_POLL_VOTES_HIDE' => 'Verberge Abstimmungen', 51 | 'AP_POLL_VOTES_HIDE_EXPLAIN' => 'Wenn diese Option aktiviert ist, werden Abstimmungen verborgen, bis die Umfrage beendet ist.
Diese Option funktioniert nur, wenn ein End-Datum für diese Umfrage setzt ist.', 52 | 'AP_POLL_VOTERS_SHOW' => 'Zeige Benutzer, die abgestimmt haben', 53 | 'AP_POLL_VOTERS_SHOW_EXPLAIN' => 'Wenn diese Option aktiviert ist, werden Benutzer, die abgestimmt haben, für alle mit den entsprechenden Berechtigungen unter den Optionen angezeigt.
Beachte, dass dies verborgen bleibt, falls die Abstimmungen verborgen sein sollten.', 54 | 'AP_POLL_VOTERS_LIMIT' => 'Schränke Abstimmung ein', 55 | 'AP_POLL_VOTERS_LIMIT_EXPLAIN' => 'Wenn diese Option aktiviert ist, werden Benutzer nur abstimmen können, wenn sie bereits in diesem Thema geschrieben haben.', 56 | )); 57 | -------------------------------------------------------------------------------- /language/sv/info_acp_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Avancerade omröstningar', 40 | 'AP_SETTINGS_ACP' => 'Inställningar', 41 | 42 | 'AP_TITLE' => 'Avancerade omröstningar', 43 | 'AP_TITLE_EXPLAIN' => 'Utökar omröstningssystemet i phpBB med nya funktioner, du kan t.ex. dölja omröstningesresultatet tills omröstningen har avslutats, visa vem som röstat, osv.', 44 | 'AP_COPYRIGHT' => '© 2015 Wolfsblvt (www.pinkes-forum.de) [Fler tillägg av Wolfsblvt]', 45 | 46 | 'AP_SETTINGS' => 'Inställningar för Avancerade omröstningar', 47 | 48 | 'AP_ACT_VOTES_HIDE' => 'Aktivera döljning av resultat', 49 | 'AP_ACT_VOTES_HIDE_EXPLAIN' => 'Aktiverar inställningen som döljer omröstningens resultat tills omröstningen har avslutats.', 50 | 'AP_ACT_VOTERS_SHOW' => 'Aktivera visning av medlemmar som har röstat', 51 | 'AP_ACT_VOTERS_SHOW_EXPLAIN' => 'Aktiverar inställningen som visar vem som har röstat och vad rösten har lagts på.', 52 | 'AP_ACT_VOTERS_LIMIT' => 'Aktivera förutsättning av inlägg för omröstning', 53 | 'AP_ACT_VOTERS_LIMIT_EXPLAIN' => 'Aktiverar inställningen som gör att man endast kan rösta om man har skrivit ett inlägg i omröstningstråden.', 54 | 55 | 'AP_DEFAULT_VOTES_CHANGE' => 'Välj grundinställning för ändring av röstning', 56 | 'AP_DEFAULT_VOTES_HIDE' => 'Välj grundinställning för "Dölja omröstning"', 57 | 'AP_DEFAULT_VOTERS_SHOW' => 'Välj grundinställning för "Visning av medlemmar som har röstat"', 58 | 'AP_DEFAULT_VOTERS_LIMIT' => 'Välj grundinställning för "Inskränkning av omröstning"', 59 | )); 60 | -------------------------------------------------------------------------------- /language/de/info_acp_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Advanced Polls', 39 | 'AP_SETTINGS_ACP' => 'Einstellungen', 40 | 41 | 'AP_TITLE' => 'Advanced Polls', 42 | 'AP_TITLE_EXPLAIN' => 'Erweitert das Umfragen-System von phpBB mit neuen Funktionen, wie das Verbergen der Abstimmungen bis zum Ende der Umfrage, dem Anzeigen der Benutzer, die abgestimmt haben, dem Limitieren des Abstimmens und mehr.', 43 | 'AP_COPYRIGHT' => '© 2015 Wolfsblvt (www.pinkes-forum.de) [Mehr Erweiterungen von Wolfsblvt]', 44 | 45 | 'AP_SETTINGS' => 'Advanced Polls Einstellungen', 46 | 47 | 'AP_ACT_VOTES_HIDE' => 'Aktiviere Verbergen der Abstimmungen', 48 | 'AP_ACT_VOTES_HIDE_EXPLAIN' => 'Aktiviert die Option zum Auswählen, dass Abstimmungen bis zum Ende der Umfrage verborgen werden.', 49 | 'AP_ACT_VOTERS_SHOW' => 'Aktiviere Anzeigen von Benutzern, die abgestimmt haben', 50 | 'AP_ACT_VOTERS_SHOW_EXPLAIN' => 'Aktiviert die Option zum Auswählen, dass Benutzer, die abgestimmt haben, für jede Abstimmungs-Option angezeigt werden.', 51 | 'AP_ACT_VOTERS_LIMIT' => 'Aktiviere Einschränkung der Abstimmung', 52 | 'AP_ACT_VOTERS_LIMIT_EXPLAIN' => 'Aktiviert die Option zum Auswählen, dass nur Benutzer abstimmen können, die bereits in diesem Thema geantwortet haben.', 53 | 54 | 'AP_DEFAULT_VOTES_CHANGE' => 'Standardmäßig ausgewählter Wert für "Ändern der Abstimmung erlauben"', 55 | 'AP_DEFAULT_VOTES_HIDE' => 'Standardmäßig ausgewählter Wert für "Verbergen der Abstimmungen"', 56 | 'AP_DEFAULT_VOTERS_SHOW' => 'Standardmäßig ausgewählter Wert für "Anzeigen von Benutzern, die abgestimmt haben"', 57 | 'AP_DEFAULT_VOTERS_LIMIT' => 'Standardmäßig ausgewählter Wert für "Einschränkung der Abstimmung"', 58 | )); 59 | -------------------------------------------------------------------------------- /ext.php: -------------------------------------------------------------------------------- 1 | container->get('notification_manager'); 30 | $phpbb_notifications->enable_notifications('wolfsblvt.advancedpolls.notification.type.pollended'); 31 | return 'notifications'; 32 | 33 | break; 34 | 35 | default: 36 | 37 | // Run parent enable step method 38 | return parent::enable_step($old_state); 39 | 40 | break; 41 | } 42 | } 43 | 44 | /** 45 | * Overwrite disable_step to disable advanced polls notifications 46 | * before the extension is disabled. 47 | * 48 | * @param mixed $old_state State returned by previous call of this method 49 | * @return mixed Returns false after last step, otherwise temporary state 50 | */ 51 | function disable_step($old_state) 52 | { 53 | switch ($old_state) 54 | { 55 | case '': // Empty means nothing has run yet 56 | 57 | // Disable board rules notifications 58 | $phpbb_notifications = $this->container->get('notification_manager'); 59 | $phpbb_notifications->disable_notifications('wolfsblvt.advancedpolls.notification.type.pollended'); 60 | return 'notifications'; 61 | 62 | break; 63 | 64 | default: 65 | 66 | // Run parent disable step method 67 | return parent::disable_step($old_state); 68 | 69 | break; 70 | } 71 | } 72 | 73 | /** 74 | * Overwrite purge_step to purge advanced polls notifications before 75 | * any included and installed migrations are reverted. 76 | * 77 | * @param mixed $old_state State returned by previous call of this method 78 | * @return mixed Returns false after last step, otherwise temporary state 79 | */ 80 | function purge_step($old_state) 81 | { 82 | switch ($old_state) 83 | { 84 | case '': // Empty means nothing has run yet 85 | 86 | // Purge board rules notifications 87 | $phpbb_notifications = $this->container->get('notification_manager'); 88 | $phpbb_notifications->purge_notifications('wolfsblvt.advancedpolls.notification.type.pollended'); 89 | return 'notifications'; 90 | 91 | break; 92 | 93 | default: 94 | 95 | // Run parent purge step method 96 | return parent::purge_step($old_state); 97 | 98 | break; 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /cron/task/pollend.php: -------------------------------------------------------------------------------- 1 | set_name('wolfsblvt.advancedpolls.pollend'); 29 | 30 | $this->config = $config; 31 | $this->db = $db; 32 | $this->log = $log; 33 | $this->user = $user; 34 | $this->notification_manager = $notification_manager; 35 | } 36 | 37 | /** 38 | * Runs this cron task. 39 | * 40 | * @return null 41 | */ 42 | public function run() 43 | { 44 | $this->last_run = (int) $this->config['wolfsblvt.advancedpolls.pollend_last_gc']; 45 | $this->this_run = $this->last_run + (int) $this->config['wolfsblvt.advancedpolls.pollend_gc']; 46 | $this->next_run = (int) 0; 47 | 48 | // Grab all polls finished since the last execution of this task that were hidden 49 | $sql = 'SELECT topic_id, forum_id, topic_poster, topic_title, poll_title, poll_start + poll_length as poll_end 50 | FROM ' . TOPICS_TABLE . ' 51 | WHERE poll_start > 0 AND poll_length > 0 52 | AND wolfsblvt_poll_votes_hide = 1 53 | AND poll_start + poll_length > ' . $this->last_run . ' 54 | ORDER BY poll_start + poll_length ASC'; 55 | $result = $this->db->sql_query($sql); 56 | 57 | $topics = array(); 58 | $this->this_run = time(); 59 | while ($row = $this->db->sql_fetchrow($result)) 60 | { 61 | if ((int) $row['poll_end'] > $this->this_run) 62 | { 63 | $this->next_run = (int) $row['poll_end']; 64 | break; 65 | } 66 | $topics[] = $row; 67 | } 68 | $this->db->sql_freeresult($result); 69 | 70 | // Send notifications for each poll that requires it 71 | foreach ($topics as $topic_data) 72 | { 73 | $this->notification_manager->add_notifications('wolfsblvt.advancedpolls.notification.type.pollended', $topic_data); 74 | } 75 | 76 | // Setup the next run of this task 77 | $this->config->set('wolfsblvt.advancedpolls.pollend_last_gc', $this->this_run); 78 | $this->config->set('wolfsblvt.advancedpolls.pollend_gc', ($this->next_run) ? $this->next_run - $this->this_run : 0); 79 | } 80 | 81 | /** 82 | * Returns whether this cron task can run, given current board configuration. 83 | * 84 | * @return bool 85 | */ 86 | public function is_runnable() 87 | { 88 | return (bool) $this->config['wolfsblvt.advancedpolls.activate_notifications'] && $this->config['wolfsblvt.advancedpolls.pollend_gc']; 89 | } 90 | 91 | /** 92 | * Returns whether this cron task should run now, because enough time 93 | * has passed since it was last run. 94 | * 95 | * @return bool 96 | */ 97 | public function should_run() 98 | { 99 | return (bool) ($this->config['wolfsblvt.advancedpolls.pollend_last_gc'] < time() - $this->config['wolfsblvt.advancedpolls.pollend_gc']); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /language/en/info_acp_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Advanced Polls', 39 | 'AP_SETTINGS_ACP' => 'Settings', 40 | 41 | 'AP_TITLE' => 'Advanced Polls', 42 | 'AP_TITLE_EXPLAIN' => 'Advances the core poll system of phpBB with new features like hiding votes till end, showing poll voters, limiting the votes and more.', 43 | 'AP_COPYRIGHT' => '© 2015 Wolfsblvt (www.pinkes-forum.de) [More extensions of Wolfsblvt]', 44 | 45 | 'AP_SETTINGS' => 'Advanced Polls Settings', 46 | 'AP_GLOBAL_SETTINGS' => 'Advanced Polls Global Settings (apply to all polls)', 47 | 'AP_PER_POLL_SETTINGS' => 'Advanced Polls Per Poll Settings (selectable per poll, with default value set here)', 48 | 49 | 'AP_ACT_VOTES_HIDE' => 'Activate hide votes', 50 | 'AP_ACT_VOTES_HIDE_EXPLAIN' => 'Activates the option to choose that poll votes are hidden until the poll ends.', 51 | 'AP_ACT_VOTERS_SHOW' => 'Activate show voters', 52 | 'AP_ACT_VOTERS_SHOW_EXPLAIN' => 'Activates the option to choose that poll voters are displayed for each poll option.', 53 | 'AP_ACT_VOTERS_LIMIT' => 'Activate limit voters', 54 | 'AP_ACT_VOTERS_LIMIT_EXPLAIN' => 'Activates the option to choose to limit voter for a poll to users that have already posted in this topic.', 55 | 'AP_ACT_POLL_NO_VOTE' => 'Activate no vote', 56 | 'AP_ACT_POLL_NO_VOTE_EXPLAIN' => 'Changes the standard “View results” link by a “Don’t vote, view results” link, that will not allow voting after viewing the results unless "Change votes" is selected.', 57 | 'AP_ACT_SHOW_ORDERED' => 'Activate show ordered', 58 | 'AP_ACT_SHOW_ORDERED_EXPLAIN' => 'Activates the option to choose to show the results by descending order of votes received (highest voted first).', 59 | 'AP_ACT_POLL_SCORING' => 'Activate scoring polls', 60 | 'AP_ACT_POLL_SCORING_EXPLAIN' => 'Activates the possibility to assign different scores to the poll options.', 61 | 'AP_ACT_INCREMENTAL_VOTES' => 'Activate incremental voting', 62 | 'AP_ACT_INCREMENTAL_VOTES_EXPLAIN' => 'Activates the possibility to vote incrementally, while you have not exhausted your available voting capabilities.', 63 | 'AP_ACT_CLOSED_VOTING' => 'Activate closed voting', 64 | 'AP_ACT_CLOSED_VOTING_EXPLAIN' => 'Activates the possibility to vote on an open poll even if the corresponding topic is locked.', 65 | 'AP_ACT_POLL_END' => 'Activate poll end', 66 | 'AP_ACT_POLL_END_EXPLAIN' => 'Allows specifying when a poll ends by date/time, instead of just specifying a poll duration since poll start.', 67 | 'AP_ACT_POLL_NOTIFICATIONS' => 'Activate poll notifications', 68 | 'AP_ACT_POLL_NOTIFICATIONS_EXPLAIN' => 'Activates sending notifications to all voters of a hidden poll when then poll has finished, and hence results are visible.', 69 | 70 | 'AP_DEFAULT_VOTES_CHANGE' => 'Selected default for change vote', 71 | 'AP_DEFAULT_VOTES_HIDE' => 'Selected default for hide votes', 72 | 'AP_DEFAULT_VOTERS_SHOW' => 'Selected default for show voters', 73 | 'AP_DEFAULT_VOTERS_LIMIT' => 'Selected default for limit voters', 74 | 'AP_DEFAULT_SHOW_ORDERED' => 'Selected default for show ordered', 75 | )); 76 | -------------------------------------------------------------------------------- /styles/prosilver/template/js/poll_length_posting.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Advanced Polls - Poll Length Posting aids 4 | * 5 | * @copyright (c) 2015 javiexin ( www.exincastillos.es ) 6 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 7 | * @author Javier Lopez (javiexin) 8 | */ 9 | 10 | var apPollStartInitial = new Date(); 11 | var apPollStart = new Date(); 12 | var apPollEnd = new Date(); 13 | var apPollLength = 0; // seconds 14 | var apPollLengthScale = 24; // days by default 15 | 16 | apInitPollLength(); 17 | 18 | function apInitPollLength() 19 | { 20 | var year = document.getElementById('wolfsblvt_poll_end_year').value; 21 | if (year != "") apPollEnd.setFullYear(year); 22 | var mon = document.getElementById('wolfsblvt_poll_end_mon').value; 23 | if (mon != "") apPollEnd.setMonth(mon - 1); 24 | var mday = document.getElementById('wolfsblvt_poll_end_mday').value; 25 | if (mday != "") apPollEnd.setDate(mday); 26 | var hours = document.getElementById('wolfsblvt_poll_end_hours').value; 27 | if (hours != "") apPollEnd.setHours(hours); 28 | var minutes = document.getElementById('wolfsblvt_poll_end_minutes').value; 29 | if (minutes != "") apPollEnd.setMinutes(minutes); 30 | 31 | var length = document.getElementById('poll_length').value; 32 | if (length > 0) apPollLength = length * apPollLengthScale * 3600; 33 | 34 | apPollStart.setTime(apPollEnd.getTime() - apPollLength * 1000); 35 | apPollStartInitial = apPollStart; 36 | 37 | var duration = (length > 0) ? 1 : 0; 38 | document.getElementById('wolfsblvt_poll_duration').selectedIndex = duration; 39 | apChangeDuration(document.getElementById('wolfsblvt_poll_duration').value); 40 | } 41 | 42 | function apChangeDuration(val) 43 | { 44 | apUpdatePollEnd(val != ''); 45 | document.getElementById('wolfsblvt_poll_length').style.display='none'; 46 | document.getElementById('wolfsblvt_poll_end').style.display='none'; 47 | if (val != '') document.getElementById(val).style.display='inline-block'; 48 | } 49 | 50 | function apAdjustLengthScale(newScale) 51 | { 52 | apPollLengthScale = newScale; 53 | apUpdatePollEnd(true); 54 | } 55 | 56 | function apAdjustLength(val) 57 | { 58 | apPollLength = val * apPollLengthScale * 3600; 59 | apPollEnd.setTime(apPollStart.getTime() + apPollLength * 1000); 60 | apUpdatePollEnd(true); 61 | } 62 | 63 | function apAdjustEnd(what, val) 64 | { 65 | if (what == "year") { 66 | apPollEnd.setFullYear(val); 67 | } else if (what == "mon") { 68 | apPollEnd.setMonth(val - 1); 69 | } else if (what == "mday") { 70 | apPollEnd.setDate(val); 71 | } else if (what == "hours") { 72 | apPollEnd.setHours(val); 73 | } else if (what == "minutes") { 74 | apPollEnd.setMinutes(val); 75 | } 76 | apUpdatePollEnd(true); 77 | } 78 | 79 | function apUpdatePollEnd(fill) 80 | { 81 | var pollLengthValue = Math.ceil((apPollEnd.getTime() - apPollStartInitial.getTime()) / 1000 / 3600 / apPollLengthScale); 82 | apPollLength = pollLengthValue * apPollLengthScale * 3600; 83 | apPollStart.setTime(apPollEnd.getTime() - apPollLength * 1000); 84 | 85 | if (fill) { 86 | document.getElementById('wolfsblvt_poll_end_label').innerHTML = apPollEnd.getFullYear() + "/" + (apPollEnd.getMonth() + 1) + "/" + apPollEnd.getDate() + " " + apPollEnd.getHours() + ":" + apPollEnd.getMinutes(); 87 | document.getElementById('wolfsblvt_poll_end_year').value = apPollEnd.getFullYear(); 88 | document.getElementById('wolfsblvt_poll_end_mon').value = apPollEnd.getMonth() + 1; 89 | document.getElementById('wolfsblvt_poll_end_mday').value = apPollEnd.getDate(); 90 | document.getElementById('wolfsblvt_poll_end_hours').value = apPollEnd.getHours(); 91 | document.getElementById('wolfsblvt_poll_end_minutes').value = apPollEnd.getMinutes(); 92 | document.getElementById('poll_length').value = pollLengthValue; 93 | } else { 94 | document.getElementById('wolfsblvt_poll_end_label').innerHTML = ""; 95 | document.getElementById('wolfsblvt_poll_end_year').value = ""; 96 | document.getElementById('wolfsblvt_poll_end_mon').value = ""; 97 | document.getElementById('wolfsblvt_poll_end_mday').value = ""; 98 | document.getElementById('wolfsblvt_poll_end_hours').value = ""; 99 | document.getElementById('wolfsblvt_poll_end_minutes').value = ""; 100 | document.getElementById('poll_length').value = 0; 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /language/it/info_acp_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Sondaggi avanzati', 40 | 'AP_SETTINGS_ACP' => 'Impostazioni', 41 | 42 | 'AP_TITLE' => 'Sondaggi avanzati', 43 | 'AP_TITLE_EXPLAIN' => 'Estende la funzione base dei sondaggi phpBB con nuove impostazioni come nascondere i voti fino al termine di un sondaggio, mostrare i votanti, limitare il voto e molto altro.', 44 | 'AP_COPYRIGHT' => '© 2015 Wolfsblvt (www.pinkes-forum.de) [Altre estensioni da Wolfsblvt]', 45 | 46 | 'AP_SETTINGS' => 'Impostazioni sondaggi avanzati', 47 | 'AP_GLOBAL_SETTINGS' => 'Impostazioni globali sondaggi avanzati (per tutti i sondaggi)', 48 | 'AP_PER_POLL_SETTINGS' => 'Impostazioni sondaggi avanzati per singolo sondaggio (valori predefiniti, modificabili per ogni sondaggio)', 49 | 50 | 'AP_ACT_VOTES_HIDE' => 'Attiva voti nascosti', 51 | 'AP_ACT_VOTES_HIDE_EXPLAIN' => 'Attiva l’opzione per nascondere il numero di voti fino al termine del sondaggio.', 52 | 'AP_ACT_VOTERS_SHOW' => 'Attiva votanti visibili', 53 | 'AP_ACT_VOTERS_SHOW_EXPLAIN' => 'Attiva l’opzione per mostrare i votanti per ogni risposta del sondaggio.', 54 | 'AP_ACT_VOTERS_LIMIT' => 'Attiva limite per votanti', 55 | 'AP_ACT_VOTERS_LIMIT_EXPLAIN' => 'Attiva l’opzione per limitare il voto a chi abbia prima risposto al topic.', 56 | 'AP_ACT_POLL_NO_VOTE' => 'Attiva astensione', 57 | 'AP_ACT_POLL_NO_VOTE_EXPLAIN' => 'Cambia il link standard “Mostra risultati” con “Mi astengo, mostra risultati” che non permetterà di votare dopo aver visto i risultati (a meno che non sia attiva l’opzione di cambio voto).', 58 | 'AP_ACT_SHOW_ORDERED' => 'Attiva mostra ordinate', 59 | 'AP_ACT_SHOW_ORDERED_EXPLAIN' => 'Attiva l’opzione per la scelta di visualizzazione dei risultati in ordine decrescente per voti ricevuti (la più votata per prima).', 60 | 'AP_ACT_POLL_SCORING' => 'Attiva punteggi sondaggio', 61 | 'AP_ACT_POLL_SCORING_EXPLAIN' => 'Attiva l’opzione per assegnare punteggi differenti alle opzioni di voto.', 62 | 'AP_ACT_INCREMENTAL_VOTES' => 'Attiva voto incrementale', 63 | 'AP_ACT_INCREMENTAL_VOTES_EXPLAIN' => 'Attiva l’opzione per votare in maniera incrementale, fintanto che non sia estinta la propria possibilità di voto.', 64 | 'AP_ACT_CLOSED_VOTING' => 'Attiva voto chiuso', 65 | 'AP_ACT_CLOSED_VOTING_EXPLAIN' => 'Attiva l’opzione per permettere il voto in sondaggi aperti in topic chiusi.', 66 | 'AP_ACT_POLL_END' => 'Attiva termine voto', 67 | 'AP_ACT_POLL_END_EXPLAIN' => 'Attiva l’opzione per specificate la data e/o l’ora di fine sondaggio, invece di specificarne la durata a partire dall’inizio del sondaggio.', 68 | 'AP_ACT_POLL_NOTIFICATIONS' => 'Attiva notifiche sondaggio', 69 | 'AP_ACT_POLL_NOTIFICATIONS_EXPLAIN' => 'Attiva l’invio di notifiche ai votanti alla scadenza di una votazione con voti nascosti per cui sono visibili i risultati.', 70 | 71 | 'AP_DEFAULT_VOTES_CHANGE' => 'Impostazione predefinita per cambio voto', 72 | 'AP_DEFAULT_VOTES_HIDE' => 'Impostazione predefinita per voti nascosti', 73 | 'AP_DEFAULT_VOTERS_SHOW' => 'Impostazione predefinita per votanti visibili', 74 | 'AP_DEFAULT_VOTERS_LIMIT' => 'Impostazione predefinita per limite per votanti', 75 | 'AP_DEFAULT_SHOW_ORDERED' => 'Impostazione predefinita per mostra ordinate', 76 | )); 77 | -------------------------------------------------------------------------------- /notification/pollended.php: -------------------------------------------------------------------------------- 1 | 'NOTIFICATION_TYPE_AP_POLL_ENDED', 39 | 'group' => 'NOTIFICATION_GROUP_POSTING', 40 | ); 41 | 42 | /** 43 | * {@inheritdoc} 44 | */ 45 | public function is_available() 46 | { 47 | return (bool) $this->config['wolfsblvt.advancedpolls.activate_notifications']; 48 | } 49 | 50 | /** 51 | * {@inheritdoc} 52 | */ 53 | public static function get_item_id($data) 54 | { 55 | return (int) $data['topic_id']; 56 | } 57 | 58 | /** 59 | * {@inheritdoc} 60 | */ 61 | public static function get_item_parent_id($data) 62 | { 63 | // No parent 64 | return 0; // (int) $data['forum_id'] ?? 65 | } 66 | 67 | /** 68 | * {@inheritdoc} 69 | */ 70 | public function find_users_for_notification($data, $options = array()) 71 | { 72 | $options = array_merge(array( 73 | 'ignore_users' => array(), 74 | ), $options); 75 | 76 | // Grab all users that have voted in the poll 77 | $sql = 'SELECT vote_user_id 78 | FROM ' . POLL_VOTES_TABLE . ' 79 | WHERE topic_id = ' . (int) $data['topic_id'] . ' 80 | GROUP BY vote_user_id'; 81 | $result = $this->db->sql_query($sql); 82 | 83 | $users = array(); 84 | while ($row = $this->db->sql_fetchrow($result)) 85 | { 86 | $users[] = (int) $row['vote_user_id']; 87 | } 88 | $this->db->sql_freeresult($result); 89 | 90 | if (empty($users)) 91 | { 92 | return array(); 93 | } 94 | $users = array_unique($users); 95 | 96 | return $this->check_user_notification_options($users, $options); 97 | } 98 | 99 | /** 100 | * {@inheritdoc} 101 | */ 102 | public function users_to_query() 103 | { 104 | return array($this->get_data('poster_id')); 105 | } 106 | 107 | /** 108 | * {@inheritdoc} 109 | */ 110 | public function get_avatar() 111 | { 112 | return $this->user_loader->get_avatar($this->get_data('poster_id')); 113 | } 114 | 115 | /** 116 | * {@inheritdoc} 117 | */ 118 | public function get_title() 119 | { 120 | return $this->user->lang($this->language_key); 121 | } 122 | 123 | /** 124 | * {@inheritdoc} 125 | */ 126 | public function get_url() 127 | { 128 | return append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "t={$this->item_id}"); // "f={$this->item_parent_id}&t={$this->item_id}"); 129 | } 130 | 131 | /** 132 | * {@inheritdoc} 133 | */ 134 | public function get_email_template() 135 | { 136 | return false; 137 | } 138 | 139 | /** 140 | * {@inheritdoc} 141 | */ 142 | public function get_email_template_variables() 143 | { 144 | return array(); 145 | } 146 | 147 | /** 148 | * {@inheritdoc} 149 | */ 150 | public function get_reference() 151 | { 152 | return $this->user->lang('NOTIFICATION_REFERENCE', censor_text($this->get_data('topic_title'))); 153 | } 154 | 155 | /** 156 | * Function for preparing the data for insertion in an SQL query 157 | * (The service handles insertion) 158 | * 159 | * @param array $data The data for the poll 160 | * @param array $pre_create_data Data from pre_create_insert_array() 161 | * 162 | * @return array Array of data ready to be inserted into the database 163 | */ 164 | public function create_insert_array($data, $pre_create_data = array()) 165 | { 166 | $this->set_data('poster_id', (int) $data['topic_poster']); 167 | $this->set_data('forum_id', (int) $data['forum_id']); 168 | $this->set_data('topic_id', (int) $data['topic_id']); 169 | $this->set_data('topic_title', $data['topic_title']); 170 | $this->set_data('poll_title', $data['poll_title']); 171 | $this->set_data('poll_end', (int) $data['poll_end']); 172 | 173 | return parent::create_insert_array($data, $pre_create_data); 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /language/it/advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Sondaggi avanzati', 40 | 41 | // Viewtopic 42 | 'AP_VOTES_HIDDEN' => 'Voti nascosti', 43 | 'AP_POLL_RUN_TILL_APPEND' => ', fino ad allora i voti saranno nascosti.', 44 | 'AP_VOTERS' => 'Votanti', 45 | 'AP_NONE' => 'Nessuno', 46 | 47 | 'AP_POLL_CANT_VOTE' => 'Non puoi votare questo sondaggio. Motivo', 48 | 'AP_POLL_REASON_NOT_POSTED' => 'Non hai lasciato messaggi in questo topic.', 49 | 'AP_POLL_VOTES_ARE_VISIBLE' => 'Votando questo sondaggio, il tuo voto sarà visibile.', 50 | 'AP_POLL_DONT_VOTE_SHOW_RESULTS' => 'Mi astengo, mostra risultati', 51 | 'AP_POLL_RESULTS_ARE_ORDERED' => 'I risultati sono ordinati per numero di voti ricevuti in ordine decrescente.', 52 | 'AP_POLL_TYPE_MISMATCH' => 'Dati sondaggio inconsistenti, errore interno.', 53 | 'AP_VOTE_CHANGED' => 'Non hai i permessi per cambiare i voti espressi.', 54 | 'AP_TOO_MANY_VOTES' => 'Stai cercando di esprimere troppi voti.', 55 | 56 | 'AP_MAX_VOTES_SELECT' => array( 57 | 1 => 'Puoi esprimere fino a %2$d voti per %1$d opzioni', 58 | 2 => 'Puoi esprimere fino a %2$d voti fra %1$d opzioni', 59 | ), 60 | 'AP_GUEST_VOTES' => array( 61 | 1 => '%d voto da un ospite', 62 | 2 => '%d voti da ospiti', 63 | ), 64 | 65 | // Posting 66 | 'AP_POLL_VOTES_HIDE' => 'Nascondi voti', 67 | 'AP_POLL_VOTES_HIDE_EXPLAIN' => 'Se abilitato, i votanti saranno nascosti fino al termine del sondaggio. Quest’opzione entra in funzione se viene specificata una durata massima per il sondaggio.', 68 | 'AP_POLL_VOTERS_SHOW' => 'Mostra votanti', 69 | 'AP_POLL_VOTERS_SHOW_EXPLAIN' => 'Se abilitato, i votanti saranno mostrati agli utenti dotati di apposito permesso. I votanti saranno comunque nascosti se è abilitata la relativa opzione.', 70 | 'AP_POLL_VOTERS_LIMIT' => 'Limita voto', 71 | 'AP_POLL_VOTERS_LIMIT_EXPLAIN' => 'Se abilitato, gli utenti potranno votare dopo aver risposto al topic.', 72 | 'AP_POLL_SHOW_ORDERED' => 'Mostra risultati ordinati', 73 | 'AP_POLL_SHOW_ORDERED_EXPLAIN' => 'Quando vengono mostrati i risultati, le opzioni appariranno in ordine decrescente per numero di voti ricevuti (la più votata per prima); altrimenti, sarà mostrato l’ordine specificato per le opzioni.', 74 | 'AP_POLL_END' => 'Termine del sondaggio', 75 | 'AP_POLL_END_EXPLAIN' => 'Specifica data e ora per il termine del sondaggio. Se specificate, queste opzioni prevarranno sulla durata specificata per il sondaggio; per usare la durata in giorni, vuotare questi campi.', 76 | 77 | 'AP_YYYY_MM_DD' => 'AAAA-MM-GG', 78 | 'AP_HH_MM' => 'HH:MM', 79 | 'AP_POLL_END_INVALID' => 'La data e/o l’ora indicata non è valida', 80 | 'AP_POLL_TOTAL_LOWER_MAX_VOTES' => 'Il numero di voti per singola opzione non può essere maggiore del numero di voti totali per tutte le opzioni', 81 | 'AP_POLL_TOTAL_LOWER_MAX_OPTS' => 'Il numero massimo di opzioni da votare non può essere superiore al numero di voti totali per tutte le opzioni', 82 | 83 | 'AP_POLL_MAX_VALUE' => 'Voti massimi', 84 | 'AP_POLL_MAX_VALUE_EXPLAIN' => 'Il numero di voti massimi esprimibili da ogni votante per singola opzione.', 85 | 'AP_POLL_TOTAL_VALUE' => 'Voti totali', 86 | 'AP_POLL_TOTAL_VALUE_EXPLAIN' => 'Il numero di voti totali esprimibili da ogni votante per tutte le opzioni.', 87 | )); 88 | -------------------------------------------------------------------------------- /language/es/info_acp_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Encuestas Avanzadas', 40 | 'AP_SETTINGS_ACP' => 'Configuración', 41 | 42 | 'AP_TITLE' => 'Encuestas Avanzadas', 43 | 'AP_TITLE_EXPLAIN' => 'Mejora el sistema de encuestas nativo de phpBB con nuevas posibilidades como ocultar votos hasta el final, mostrar los votantes de la encuesta, limitar los posibles votantes y más.', 44 | 'AP_COPYRIGHT' => '© 2015 Wolfsblvt (www.pinkes-forum.de) [Más Extensiones de Wolfsblvt]', 45 | 46 | 'AP_SETTINGS' => 'Configuración de Encuestas Avanzadas', 47 | 'AP_GLOBAL_SETTINGS' => 'Configuración Global de Encuestas Avanzadas (aplicables a todas las encuestas)', 48 | 'AP_PER_POLL_SETTINGS' => 'Configuración Por Encuesta de Encuestas Avanzadas (seleccionables por encuesta, con los valores por defecto indicados aquí)', 49 | 50 | 'AP_ACT_VOTES_HIDE' => 'Activar votos ocultos', 51 | 'AP_ACT_VOTES_HIDE_EXPLAIN' => 'Activa la opción de que los votos de la encuesta estén ocultos hasta que termine la encuesta.', 52 | 'AP_ACT_VOTERS_SHOW' => 'Activar mostrar votantes', 53 | 'AP_ACT_VOTERS_SHOW_EXPLAIN' => 'Activa la opción de que se muestren los votantes de cada opción de la encuesta.', 54 | 'AP_ACT_VOTERS_LIMIT' => 'Activar limitar votos', 55 | 'AP_ACT_VOTERS_LIMIT_EXPLAIN' => 'Activa la opción de limitar los votantes para una encuesta a los usuarios que ya han escrito en ese tema.', 56 | 'AP_ACT_POLL_NO_VOTE' => 'Activar no votar', 57 | 'AP_ACT_POLL_NO_VOTE_EXPLAIN' => 'Cambia el enlace "Mostrar resultados" por un enlace "No quiero votar", que no permite votar después de ver los resultados a menos que "Cambiar el voto" esté seleccionado.', 58 | 'AP_ACT_SHOW_ORDERED' => 'Activar ordenación', 59 | 'AP_ACT_SHOW_ORDERED_EXPLAIN' => 'Activa la opción de mostrar los resultados por orden descendente de votos recibidos (el más votado primero).', 60 | 'AP_ACT_POLL_SCORING' => 'Activar encuestas puntuables', 61 | 'AP_ACT_POLL_SCORING_EXPLAIN' => 'Activa la posibilidad de asignar diferentes puntuaciones a las opciones de la encuesta.', 62 | 'AP_ACT_INCREMENTAL_VOTES' => 'Activar voto incremental', 63 | 'AP_ACT_INCREMENTAL_VOTES_EXPLAIN' => 'Activa la posibilidad de votar incrementalmente, mientras no se hayan emitido todos los votos disponibles.', 64 | 'AP_ACT_CLOSED_VOTING' => 'Activar voto en temas cerrados', 65 | 'AP_ACT_CLOSED_VOTING_EXPLAIN' => 'Activa la posibilidad de votar en encuestas abiertas incluse cuando el tema correspondiente está cerrado.', 66 | 'AP_ACT_POLL_END' => 'Activar final de encuesta', 67 | 'AP_ACT_POLL_END_EXPLAIN' => 'Permite especificar cuando termina una encuesta en fecha y hora, en lugar de especificar tan solo una duración a partir del inicio de la encuesta.', 68 | 'AP_ACT_POLL_NOTIFICATIONS' => 'Activar notificaciones de encuestas', 69 | 'AP_ACT_POLL_NOTIFICATIONS_EXPLAIN' => 'Activa el envío de notificaciones a todos los votantes en encuestas ocultas cuando la encuenta ha finalizado, y por tanto los resultados son visibles.', 70 | 71 | 'AP_DEFAULT_VOTES_CHANGE' => 'Valor por defecto para cambiar el voto', 72 | 'AP_DEFAULT_VOTES_HIDE' => 'Valor por defecto para votos ocultos', 73 | 'AP_DEFAULT_VOTERS_SHOW' => 'Valor por defecto para mostrar votantes', 74 | 'AP_DEFAULT_VOTERS_LIMIT' => 'Valor por defecto para limitar votos', 75 | 'AP_DEFAULT_SHOW_ORDERED' => 'Valor por defecto para ordenación', 76 | )); 77 | -------------------------------------------------------------------------------- /language/en/advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Advanced Polls', 39 | 40 | // Viewtopic 41 | 'AP_VOTES_HIDDEN' => 'Votes hidden', 42 | 'AP_POLL_RUN_TILL_APPEND' => ', until then all votes are hidden.', 43 | 'AP_VOTERS' => 'Voters', 44 | 'AP_NONE' => 'None', 45 | 46 | 'AP_POLL_CANT_VOTE' => 'You can’t vote on this poll. Reason', 47 | 'AP_POLL_REASON_NOT_POSTED' => 'You haven’t posted in this topic.', 48 | 'AP_POLL_VOTES_ARE_VISIBLE' => 'Please note that if you vote, your vote will be visible.', 49 | 'AP_POLL_DONT_VOTE_SHOW_RESULTS' => 'Don’t vote, view results', 50 | 'AP_POLL_RESULTS_ARE_ORDERED' => 'Please note that results are sorted by decreasing number of votes received.', 51 | 'AP_POLL_TYPE_MISMATCH' => 'Inconsistent poll data, internal error.', 52 | 'AP_VOTE_CHANGED' => 'You do not have permissions to change your casted votes.', 53 | 'AP_TOO_MANY_VOTES' => 'You have tried to assign too many votes.', 54 | 55 | 'AP_MAX_VOTES_SELECT' => array( 56 | 1 => 'You may give up to %2$d votes to %1$d option', 57 | 2 => 'You may give up to %2$d votes amongst %1$d options', 58 | ), 59 | 'AP_GUEST_VOTES' => array( 60 | 1 => '%d vote from guest', 61 | 2 => '%d votes from guests', 62 | ), 63 | 64 | // Posting 65 | 'AP_POLL_VOTES_HIDE' => 'Hide votes', 66 | 'AP_POLL_VOTES_HIDE_EXPLAIN' => 'If enabled votes will be hidden until the poll ends. This option only works if the poll has a specified end.', 67 | 'AP_POLL_VOTERS_SHOW' => 'Show poll voters', 68 | 'AP_POLL_VOTERS_SHOW_EXPLAIN' => 'If enabled voters will be shown to those people who have the permission. Note that voters still will be hidden if votes are hidden.', 69 | 'AP_POLL_VOTERS_LIMIT' => 'Limit votes', 70 | 'AP_POLL_VOTERS_LIMIT_EXPLAIN' => 'If enabled users can only vote if they have posted in this topic already.', 71 | 'AP_POLL_SHOW_ORDERED' => 'Show results ordered', 72 | 'AP_POLL_SHOW_ORDERED_EXPLAIN' => 'When results are shown, these are ordered by descending number of votes received (highest voted first). Otherwise, poll option order is used.', 73 | 'AP_RUN_POLL' => 'Run poll', 74 | 'AP_RUN_POLL_FOR' => 'for', 75 | 'AP_RUN_POLL_UNTIL' => 'until', 76 | 'AP_RUN_POLL_INDEFINITELY' => 'indefinitely', 77 | 'AP_POLL_END' => 'Poll end', 78 | 'AP_POLL_END_EXPLAIN' => 'Specify the date and time when the poll ends. If any of these fields is specified, it overrides the Poll Length. Date fields left empty default to the current Poll End date; hour fields left empty default to 0. If you want to revert back to using Poll Length, you will need to clean all these fields.', 79 | 80 | 'AP_YYYY_MM_DD' => 'YYYY-MM-DD', 81 | 'AP_HH_MM' => 'HH:MM', 82 | 'AP_POLL_END_INVALID' => 'Specified date/time is invalid', 83 | 'AP_POLL_TOTAL_LOWER_MAX_VOTES' => 'The maximum votes for a single option cannot be more than the total votes to distribute amongs all options', 84 | 'AP_POLL_TOTAL_LOWER_MAX_OPTS' => 'The maximum options to vote cannot be more than the total votes to distribute amongs all options', 85 | 86 | 'AP_POLL_MAX_VALUE' => 'Maximum votes', 87 | 'AP_POLL_MAX_VALUE_EXPLAIN' => 'This is the maximum number of votes that a voter might give to a single option.', 88 | 'AP_POLL_TOTAL_VALUE' => 'Total votes', 89 | 'AP_POLL_TOTAL_VALUE_EXPLAIN' => 'This is the total number of votes that a voter might distribute amongst all options.', 90 | )); 91 | -------------------------------------------------------------------------------- /language/nl/info_acp_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Geavanceerde Peilingen', 40 | 'AP_SETTINGS_ACP' => 'Instellingen', 41 | 42 | 'AP_TITLE' => 'Geavanceerde Peilingen', 43 | 'AP_TITLE_EXPLAIN' => 'Uitbreiding van de in phpBB aanwezige Peiling systeem met oa.stemmen verbergen tot einde peiling, stemmers tonen, berperken van de stemmers en meer.', 44 | 'AP_COPYRIGHT' => '© 2015 Wolfsblvt (www.pinkes-forum.de) [Meer extensies van Wolfsblvt]', 45 | 46 | 'AP_SETTINGS' => 'Geavanceerde instellingen Peilingen', 47 | 'AP_GLOBAL_SETTINGS' => 'Globale instellingen geavanceerde peilingen (geld voor alle peilingen)', 48 | 'AP_PER_POLL_SETTINGS' => 'Instellingen per peiling (per peiling te selecteren, standaard waarden)', 49 | 50 | 'AP_ACT_VOTES_HIDE' => 'Activeer stemmen verbergen', 51 | 'AP_ACT_VOTES_HIDE_EXPLAIN' => 'Activeren van deze optie verbergt de stemmen op Peilingen tot deze ten einde is.', 52 | 'AP_ACT_VOTERS_SHOW' => 'Activeer het tonen van de stemmers', 53 | 'AP_ACT_VOTERS_SHOW_EXPLAIN' => 'Activeren van deze optie toont de stemmers in elke optie van de Peiling.', 54 | 'AP_ACT_VOTERS_LIMIT' => 'Activeer beperking stemmers', 55 | 'AP_ACT_VOTERS_LIMIT_EXPLAIN' => 'Door activering van deze optie kunnen alleen gebruikers stemmen die in het bewuste onderwerp geschreven hebben.', 56 | 'AP_ACT_POLL_NO_VOTE' => 'Activeer niet stemmen', 57 | 'AP_ACT_POLL_NO_VOTE_EXPLAIN' => 'Wijzigd de standaard "Toon stemmen" link door een "Niet stemmen" link, dit staat niet toe om na het bebijken van de resultaten alsnog te kunnen stemmen tenzij "Stem wijzigen" is geselecteerd.', 58 | 'AP_ACT_SHOW_ORDERED' => 'Activeer toon volgorde', 59 | 'AP_ACT_SHOW_ORDERED_EXPLAIN' => 'Activeer deze optie om de resultaten op aflopende volgorde van het aantal stemmen te tonen (hoogste aantal stemmen eerst).', 60 | 'AP_ACT_POLL_SCORING' => 'Activeer peiling score', 61 | 'AP_ACT_POLL_SCORING_EXPLAIN' => 'Activeer de mogelijkheid om verschillende scores aan een peilings opties toe te voegen.', 62 | 'AP_ACT_INCREMENTAL_VOTES' => 'Activeer incrementele stemmen', 63 | 'AP_ACT_INCREMENTAL_VOTES_EXPLAIN' => 'Activeer de mogelijkheid om een incrementele stem uit te brengen, terwijl u niet uw beschikbare stemmen vermogens heeft uitgeput.', 64 | 'AP_ACT_CLOSED_VOTING' => 'Activeer gesloten stemmen', 65 | 'AP_ACT_CLOSED_VOTING_EXPLAIN' => 'Activeer de mogelijkheid in een open peiling te stemmen terwijl het bijbehorende onderwerp gesloten is.', 66 | 'AP_ACT_POLL_END' => 'Activeer einde van een peiling', 67 | 'AP_ACT_POLL_END_EXPLAIN' => 'Staat het toe om een peiling op een bepaalde datum/tijd te sluiten in plaats van een tijdsduur vanaf dat de peiling gestart is.', 68 | 'AP_ACT_POLL_NOTIFICATIONS' => 'Activeer berichtgeving over een peiling', 69 | 'AP_ACT_POLL_NOTIFICATIONS_EXPLAIN' => 'Activeerd het versturen van een bericht naar alle stemmers van een normale of verborgen peiling wanneer deze afgelopen is en de resultaten zichtbaar zijn.', 70 | 71 | 'AP_DEFAULT_VOTES_CHANGE' => 'Selecteer standaard waarde voor het wijzigen van stemmen', 72 | 'AP_DEFAULT_VOTES_HIDE' => 'Selecteer standaard waarde voor het verbergen van stemmen', 73 | 'AP_DEFAULT_VOTERS_SHOW' => 'Selecteer standaard waarde voor het tonen van stemmers', 74 | 'AP_DEFAULT_VOTERS_LIMIT' => 'Selecteer standaard waarde voor het beperking van stemmers', 75 | 'AP_DEFAULT_SHOW_ORDERED' => 'Standaard waarden voor het tonen van de volgorde', 76 | )); 77 | -------------------------------------------------------------------------------- /language/fr/info_acp_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 8 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 9 | * 10 | */ 11 | 12 | /** 13 | * DO NOT CHANGE 14 | */ 15 | if (!defined('IN_PHPBB')) 16 | { 17 | exit; 18 | } 19 | 20 | if (empty($lang) || !is_array($lang)) 21 | { 22 | $lang = array(); 23 | } 24 | 25 | // DEVELOPERS PLEASE NOTE 26 | // 27 | // All language files should use UTF-8 as their encoding and the files must not contain a BOM. 28 | // 29 | // Placeholders can now contain order information, e.g. instead of 30 | // 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows 31 | // translators to re-order the output of data while ensuring it remains correct 32 | // 33 | // You do not need this where single placeholders are used, e.g. 'Message %d' is fine 34 | // equally where a string contains only two placeholders which are used to wrap text 35 | // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine 36 | // 37 | // Some characters you may want to copy&paste: 38 | // ’ « » “ ” … 39 | // 40 | 41 | $lang = array_merge($lang, array( 42 | 'AP_TITLE_ACP' => 'Sondages avancés', 43 | 'AP_SETTINGS_ACP' => 'Paramètres', 44 | 45 | 'AP_TITLE' => 'Sondages avancés', 46 | 'AP_TITLE_EXPLAIN' => 'Système avancé des sondages de phpBB comportant de nouvelles fonctionnalités telles que les votes masqués jusqu’à la fin, l’affichage du nom des votants, la restriction de votes et davantage.', 47 | 'AP_COPYRIGHT' => '© 2015 Wolfsblvt (www.pinkes-forum.de) [Plus d’extensions de Wolfsblvt]', 48 | 49 | 'AP_SETTINGS' => 'Paramètres des sondages avancés', 50 | 'AP_GLOBAL_SETTINGS' => 'Paramètres globaux des sondages avancés (s’applique à tous les sondages)', 51 | 'AP_PER_POLL_SETTINGS' => 'Paramètres des sondages avancés par sondage (sélectionnable par sondage, comportant une valeur par défaut définie ici)', 52 | 53 | 'AP_ACT_VOTES_HIDE' => 'Activer les votes masqués', 54 | 'AP_ACT_VOTES_HIDE_EXPLAIN' => 'Active l’option permettant de masquer les votes jusqu’à la fin du sondage.', 55 | 'AP_ACT_VOTERS_SHOW' => 'Activer l’affichage du nom des votants', 56 | 'AP_ACT_VOTERS_SHOW_EXPLAIN' => 'Active l’option permettant de voir le nom des votants pour chacune des options du sondage.', 57 | 'AP_ACT_VOTERS_LIMIT' => 'Activer la restriction des votes', 58 | 'AP_ACT_VOTERS_LIMIT_EXPLAIN' => 'Active l’option permettant de restreindre les votes aux participants de ce sujet.', 59 | 'AP_ACT_POLL_NO_VOTE' => 'Activer le choix non votant', 60 | 'AP_ACT_POLL_NO_VOTE_EXPLAIN' => 'Ajoute au texte du lien « Voir les résultats » le texte précédent « Ne souhaite pas voter, », ne permettant pas de voter après avoir vu les résultats sauf si l’option « Permettre de voter à nouveau » est cochée.', 61 | 'AP_ACT_SHOW_ORDERED' => 'Activer le tri des votes', 62 | 'AP_ACT_SHOW_ORDERED_EXPLAIN' => 'Active l’option permettant d’afficher les résultats triés par ordre décroissant du nombre de votes reçus (le plus de votes en premier).', 63 | 'AP_ACT_POLL_SCORING' => 'Activer la notation aux sondages', 64 | 'AP_ACT_POLL_SCORING_EXPLAIN' => 'Active la possibilité d’assigner différents scores aux options du sondage.', 65 | 'AP_ACT_INCREMENTAL_VOTES' => 'Activer le vote progressif', 66 | 'AP_ACT_INCREMENTAL_VOTES_EXPLAIN' => 'Active la possibilité de voter suivant ses capacités de vote disponibles.', 67 | 'AP_ACT_CLOSED_VOTING' => 'Activer le vote fermé', 68 | 'AP_ACT_CLOSED_VOTING_EXPLAIN' => 'Active la possibilité de voter à un sondage ouvert, même si le sujet correspondant est verrouillé.', 69 | 'AP_ACT_POLL_END' => 'Activer la fin du sondage', 70 | 'AP_ACT_POLL_END_EXPLAIN' => 'Permet de spécifier la date et l’heure de fin du sondage, en lieu et place d’une durée.', 71 | 'AP_ACT_POLL_NOTIFICATIONS' => 'Activer les notifications de sondage', 72 | 'AP_ACT_POLL_NOTIFICATIONS_EXPLAIN' => 'Active l’envoi de notifications à tous les votants d’un sondage masqué lorsque celui-ci est terminé, indiquant que les résultats sont disponibles.', 73 | 74 | 'AP_DEFAULT_VOTES_CHANGE' => 'Paramètre par défaut pour le changement des votes', 75 | 'AP_DEFAULT_VOTES_HIDE' => 'Paramètre par défaut pour les votes masqués', 76 | 'AP_DEFAULT_VOTERS_SHOW' => 'Paramètre par défaut pour l’affichage du nom des votants', 77 | 'AP_DEFAULT_VOTERS_LIMIT' => 'Paramètre par défaut pour la restriction des votes', 78 | 'AP_DEFAULT_SHOW_ORDERED' => 'Paramètre par défaut pour le tri des votes', 79 | )); 80 | -------------------------------------------------------------------------------- /language/nl/advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Geavanceerde Peilingen', 40 | 41 | // Viewtopic 42 | 'AP_VOTES_HIDDEN' => 'Stemmen verbergen', 43 | 'AP_POLL_RUN_TILL_APPEND' => ', tot, dan alle stemmen verbegen.', 44 | 'AP_VOTERS' => 'Stemmers', 45 | 'AP_NONE' => 'Geen', 46 | 47 | 'AP_POLL_CANT_VOTE' => 'U kunt op deze vraag niet stemmen omdat', 48 | 'AP_POLL_REASON_NOT_POSTED' => 'U heeft in dit onderwerp niets geschreven.', 49 | 'AP_POLL_VOTES_ARE_VISIBLE' => 'Denk eraan dat wanneer u stemt uw stem zichbaar word', 50 | 'AP_POLL_DONT_VOTE_SHOW_RESULTS' => 'Resultaten tonen zonder te stemmen', 51 | 'AP_POLL_RESULTS_ARE_ORDERED' => 'Let op dat de resultaten in aflopende volgorde worden weergegeven op basis van de ontvangen stemmen.', 52 | 'AP_POLL_TYPE_MISMATCH' => 'Inconsistente peiling gegevens, interne fout.', 53 | 'AP_VOTE_CHANGED' => 'U hoeft geen rechten om uw uitgebrachte stemmen te veranderen.', 54 | 'AP_TOO_MANY_VOTES' => 'U heeft geprobeerd om te veel te stemmem.', 55 | 56 | 'AP_MAX_VOTES_SELECT' => array( 57 | 1 => 'U mag tot %2$d opties kiezen bij %1$d stemmen', 58 | 2 => 'U mag tot %2$d optis kiezen onder %1$d stemmen', 59 | ), 60 | 'AP_GUEST_VOTES' => array( 61 | 1 => '%d stem van een gast', 62 | 2 => '%d stemmen van gasten', 63 | ), 64 | 65 | // Posting 66 | 'AP_POLL_VOTES_HIDE' => 'Verberg stemmen', 67 | 'AP_POLL_VOTES_HIDE_EXPLAIN' => 'Indien ingeschakeld zullen de stemmen tot het einde van de peiling verborgen zijn. Deze optie werkt alleen wanneer de peiling een specifieke einde heeft.', 68 | 'AP_POLL_VOTERS_SHOW' => 'Toon stemmers van deze peiling', 69 | 'AP_POLL_VOTERS_SHOW_EXPLAIN' => 'Indien ingeschakeld zullen de stemmers getoont worden aan die personen die deze rechten hebben. Let erop dat de stemmers verborgen blijven wanneer de stemmen niet getoont worden.', 70 | 'AP_POLL_VOTERS_LIMIT' => 'Beperk stemmen', 71 | 'AP_POLL_VOTERS_LIMIT_EXPLAIN' => 'Indien ingeschakeld kunnen gebruikers alleen stemmen wanneer ze in dat onderwerp iets geschreven hebben.', 72 | 'AP_POLL_SHOW_ORDERED' => 'Toon resultaten op volgorde', 73 | 'AP_POLL_SHOW_ORDERED_EXPLAIN' => 'Indien resultaten weergegeven worden zijn deze op aflopende volgorde op basis van het aantal ontvangen stemmen (Meest gestemde eerst). Of anders op basis van peiling opties.', 74 | 'AP_POLL_END' => 'Einde van de peiling', 75 | 'AP_POLL_END_EXPLAIN' => 'Geef de datum op wanneer de peiling eindigd. Indien opgegeven overschrijft deze de lengte van de peiling. Als u dit niet wenst te gebruiken dient deze velden leeg te laten/maken.', 76 | 77 | 'AP_YYYY_MM_DD' => 'JJJJ-MM-DD', 78 | 'AP_HH_MM' => 'UU:MM', 79 | 'AP_POLL_END_INVALID' => 'Opgegeven datum of tijd is ongeldig', 80 | 'AP_POLL_TOTAL_LOWER_MAX_VOTES' => 'De maximale aantal stemmen voor een enkele optie kan nooit meer zijn dan het maximale aantal stemmen over alle opties', 81 | 'AP_POLL_TOTAL_LOWER_MAX_OPTS' => 'De maximale opties om te stemmen mag niet meer dan de totale stemmen die onder alle opties te verdelen zijn', 82 | 83 | 'AP_POLL_MAX_VALUE' => 'Maximale aantal stemmen', 84 | 'AP_POLL_MAX_VALUE_EXPLAIN' => 'Dit is het maximale aantal stemmen dat een gebruiker per optie mag geven.', 85 | 'AP_POLL_TOTAL_VALUE' => 'Totale stemmen', 86 | 'AP_POLL_TOTAL_VALUE_EXPLAIN' => 'Dit is het totale aantal stemmen dat een gebruiker voor alle opties mag vergeven.', 87 | )); 88 | -------------------------------------------------------------------------------- /language/ru/info_acp_advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Расширенные опросы', 41 | 'AP_SETTINGS_ACP' => 'Настройки', 42 | 43 | 'AP_TITLE' => 'Расширенные опросы', 44 | 'AP_TITLE_EXPLAIN' => 'Расширяет систему опросов PHPBB новыми функциями, такими как скрытие голосований до конца опроса, просмотр пользователей, которые проголосовали, ограничение голосования и мн. др.', 45 | 'AP_COPYRIGHT' => '© 2015 Wolfsblvt (www.pinkes-forum.de) [More extensions of Wolfsblvt]', 46 | 47 | 'AP_SETTINGS' => 'Настройки расширенных опросов', 48 | 'AP_GLOBAL_SETTINGS' => 'Глобальные настройки Расширенных опросов (относятся ко всем опросам)', 49 | 'AP_PER_POLL_SETTINGS' => 'Персональные настройки Расширенных опросов (выбираются в опросе со значениями по умолчанию, установленными ниже)', 50 | 51 | 'AP_ACT_VOTES_HIDE' => 'Включить скрытие голосований', 52 | 'AP_ACT_VOTES_HIDE_EXPLAIN' => 'Включает опцию для выбора, чтобы голосования до конца опроса были скрыты.', 53 | 'AP_ACT_VOTERS_SHOW' => 'Включить отображение пользователей, которые проголосовали', 54 | 'AP_ACT_VOTERS_SHOW_EXPLAIN' => 'Включает опцию для выбора, чтобы пользователи, которые проголосовали, отображались для каждого варианта голосования.', 55 | 'AP_ACT_VOTERS_LIMIT' => 'Включить ограничение голосования', 56 | 'AP_ACT_VOTERS_LIMIT_EXPLAIN' => 'Включает опцию для выбора, чтобы могли голосовать только те пользователи, которые уже ответили в этой теме.', 57 | 'AP_ACT_POLL_NO_VOTE' => 'Разрешить не голосовать', 58 | 'AP_ACT_POLL_NO_VOTE_EXPLAIN' => 'Изменяет стандартное значение ссылки "Результаты голосования" на "Не хочу голосовать, посмотреть результаты", что не позволит голосовать после просмотра результатов, если "Переголосование" не выбрано.', 59 | 'AP_ACT_SHOW_ORDERED' => 'Включить порядок отображения результатов', 60 | 'AP_ACT_SHOW_ORDERED_EXPLAIN' => 'Включает возможность выбора результатов по порядку убывания полученных голосов (наибольшее количество голосов вверху).', 61 | 'AP_ACT_POLL_SCORING' => 'Включить вес вариантов опроса', 62 | 'AP_ACT_POLL_SCORING_EXPLAIN' => 'Предоставляет возможность назначать различные балы в параметрах опроса.', 63 | 'AP_ACT_INCREMENTAL_VOTES' => 'Включить поэтапное голосование', 64 | 'AP_ACT_INCREMENTAL_VOTES_EXPLAIN' => 'Позволяет голосовать постепенно до тех пор, пока вы не исчерпаете доступные для опроса лимиты.', 65 | 'AP_ACT_CLOSED_VOTING' => 'Включить голосование в закрытых темах', 66 | 'AP_ACT_CLOSED_VOTING_EXPLAIN' => 'Позволяет голосовать в актуальном опросе, даже если выбранная тема закрыта.', 67 | 'AP_ACT_POLL_END' => 'Включить дату окончания опроса', 68 | 'AP_ACT_POLL_END_EXPLAIN' => 'Позволяет указать дату/время окончания опроса (не только продолжительность в днях с момента начала).', 69 | 'AP_ACT_POLL_NOTIFICATIONS' => 'Активировать уведомления опроса', 70 | 'AP_ACT_POLL_NOTIFICATIONS_EXPLAIN' => 'Активирует отправку уведомлений для всех участников, проголосовавших в скрытом опросе, после того, как голосование закончено и становятся видны результаты.', 71 | 72 | 'AP_DEFAULT_VOTES_CHANGE' => 'По умолчанию выбрано значение разрешать переголосование', 73 | 'AP_DEFAULT_VOTES_HIDE' => 'По умолчанию выбрано значение скрытия голосовавших', 74 | 'AP_DEFAULT_VOTERS_SHOW' => 'По умолчанию выбрано значение отображения проголосовавших', 75 | 'AP_DEFAULT_VOTERS_LIMIT' => 'По умолчанию выбрано значение ограничения проголосовавших', 76 | 'AP_DEFAULT_SHOW_ORDERED' => 'По умолчанию выбрано значение порядка отображения', 77 | )); 78 | -------------------------------------------------------------------------------- /language/es/advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Encuestas Avanzadas', 41 | 42 | // Viewtopic 43 | 'AP_VOTES_HIDDEN' => 'Votos ocultos', 44 | 'AP_POLL_RUN_TILL_APPEND' => ', hasta entonces todos los votos estarán ocultos.', 45 | 'AP_VOTERS' => 'Votantes', 46 | 'AP_NONE' => 'Ninguno', 47 | 48 | 'AP_POLL_CANT_VOTE' => 'Usted no puede votar en esta encuesta. Razón', 49 | 'AP_POLL_REASON_NOT_POSTED' => 'No ha escrito en este tema.', 50 | 'AP_POLL_VOTES_ARE_VISIBLE' => 'Tenga en cuenta que si vota, su voto será visible.', 51 | 'AP_POLL_DONT_VOTE_SHOW_RESULTS' => 'No voto, ver los resultados', 52 | 'AP_POLL_RESULTS_ARE_ORDERED' => 'Los resultados están ordenados por número decreciente de votos recibidos.', 53 | 'AP_POLL_TYPE_MISMATCH' => 'Datos inconsistentes en la encuesta, error interno.', 54 | 'AP_VOTE_CHANGED' => 'No tiene permiso para cambiar sus votos ya emitidos.', 55 | 'AP_TOO_MANY_VOTES' => 'Ha intentado otorgar demasiados votos.', 56 | 57 | 'AP_MAX_VOTES_SELECT' => array( 58 | 1 => 'Puede otorgar hasta %2$d votos a %1$d opción', 59 | 2 => 'Puede otorgar hasta %2$d votos entre %1$d opciones', 60 | ), 61 | 'AP_GUEST_VOTES' => array( 62 | 1 => '%d voto de invitado', 63 | 2 => '%d votos de invitados', 64 | ), 65 | 66 | // Posting 67 | 'AP_POLL_VOTES_HIDE' => 'Ocultar votos', 68 | 'AP_POLL_VOTES_HIDE_EXPLAIN' => 'Si esta habilitado, los votos estarán ocultos hasta que la encuesta termine. Esta opción sólo funciona si la encuesta tiene un final determinado.', 69 | 'AP_POLL_VOTERS_SHOW' => 'Mostrar votantes de la encuesta', 70 | 'AP_POLL_VOTERS_SHOW_EXPLAIN' => 'Si esta habilitado, los votantes serán mostrados a aquellas personas que tengan el permiso oportuno. Tenga en cuenta que los votantes estarán ocultos si los votos están ocultos.', 71 | 'AP_POLL_VOTERS_LIMIT' => 'Limite de votos', 72 | 'AP_POLL_VOTERS_LIMIT_EXPLAIN' => 'Si esta habilitado, los usuarios habilitados sólo pueden votar si ya han escrito en este tema.', 73 | 'AP_POLL_SHOW_ORDERED' => 'Ordenar resultados', 74 | 'AP_POLL_SHOW_ORDERED_EXPLAIN' => 'Cuando se muestran los resultados, estos se ordenan por número decreciente de votos recibidos (el más votado primero). En caso contrario, se usa el orden de opciones en la encuesta.', 75 | 'AP_RUN_POLL' => 'Realizar encuesta', 76 | 'AP_RUN_POLL_FOR' => 'durante', 77 | 'AP_RUN_POLL_UNTIL' => 'hasta', 78 | 'AP_RUN_POLL_INDEFINITELY' => 'indefinidamente', 79 | 'AP_POLL_END' => 'Fin de la encuesta', 80 | 'AP_POLL_END_EXPLAIN' => 'Especifica la fecha y hora de finalización de la encuesta. Si se especifica cualquiera de estos campos, no se tiene en cuenta la duración de la encuesta. Los campos de fecha no especificados toman el valor de la fecha de finalización actual; los campos de hora no especificados toman el valor 0. Si se quiere volver a utilizar la duración, tendrá que borrar el contenido de todos estos campos.', 81 | 82 | 'AP_YYYY_MM_DD' => 'AAAA-MM-DD', 83 | 'AP_HH_MM' => 'HH:MM', 84 | 'AP_POLL_END_INVALID' => 'La fecha/hora especificada no es válida', 85 | 'AP_POLL_TOTAL_LOWER_MAX_VOTES' => 'El número máximo de votos a una opción no puede ser superior al total de votos a repartir entre las opciones posibles', 86 | 'AP_POLL_TOTAL_LOWER_MAX_OPTS' => 'El número máximo de opciones a las que se puede votar no puede ser superior al total de votos a repartir entre las opciones posibles', 87 | 88 | 'AP_POLL_MAX_VALUE' => 'Votos máximos', 89 | 'AP_POLL_MAX_VALUE_EXPLAIN' => 'Este es el número máximo de votos que un votante puede otorgar a una misma opción.', 90 | 'AP_POLL_TOTAL_VALUE' => 'Votos totales', 91 | 'AP_POLL_TOTAL_VALUE_EXPLAIN' => 'Este es el número total de votos que un votante puede otorgar, repartidos entre las opciones posibles.', 92 | )); 93 | -------------------------------------------------------------------------------- /language/fr/advancedpolls.php: -------------------------------------------------------------------------------- 1 | 8 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 9 | * 10 | */ 11 | 12 | /** 13 | * DO NOT CHANGE 14 | */ 15 | if (!defined('IN_PHPBB')) 16 | { 17 | exit; 18 | } 19 | 20 | if (empty($lang) || !is_array($lang)) 21 | { 22 | $lang = array(); 23 | } 24 | 25 | // DEVELOPERS PLEASE NOTE 26 | // 27 | // All language files should use UTF-8 as their encoding and the files must not contain a BOM. 28 | // 29 | // Placeholders can now contain order information, e.g. instead of 30 | // 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows 31 | // translators to re-order the output of data while ensuring it remains correct 32 | // 33 | // You do not need this where single placeholders are used, e.g. 'Message %d' is fine 34 | // equally where a string contains only two placeholders which are used to wrap text 35 | // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine 36 | // 37 | // Some characters you may want to copy&paste: 38 | // ’ « » “ ” … 39 | // 40 | 41 | $lang = array_merge($lang, array( 42 | 'ADVANCEDPOLLS_EXT_NAME' => 'Sondages avancés', 43 | 44 | // Viewtopic 45 | 'AP_VOTES_HIDDEN' => 'Votes masqués', 46 | 'AP_POLL_RUN_TILL_APPEND' => ', tous les votes seront masqués jusqu’à cette date.', 47 | 'AP_VOTERS' => 'Votants', 48 | 'AP_NONE' => 'Aucun', 49 | 50 | 'AP_POLL_CANT_VOTE' => 'Vous ne pouvez pas voter à ce sondage. Raison', 51 | 'AP_POLL_REASON_NOT_POSTED' => 'Vous n’avez pas participé à ce sujet.', 52 | 'AP_POLL_VOTES_ARE_VISIBLE' => 'Veuillez noter que si vous votez, votre vote sera visible.', 53 | 'AP_POLL_DONT_VOTE_SHOW_RESULTS' => 'Ne souhaite pas voter, voir les résultats', 54 | 'AP_POLL_RESULTS_ARE_ORDERED' => 'Veuillez noter que les résultats sont triés par ordre décroissant du nombre de votes reçus.', 55 | 'AP_POLL_TYPE_MISMATCH' => 'Erreur interne, les données du sondage sont incompatibles.', 56 | 'AP_VOTE_CHANGED' => 'Vous n’avez pas l’autorisation de modifier vos votes.', 57 | 'AP_TOO_MANY_VOTES' => 'Vous avez tenté de soumettre un nombre trop élevé de votes.', 58 | 59 | 'AP_MAX_VOTES_SELECT' => array( 60 | 1 => 'Vous pouvez soumettre jusqu’à %2$d votes pour %1$d option', 61 | 2 => 'Vous pouvez soumettre jusqu’à %2$d votes parmi %1$d options', 62 | ), 63 | 'AP_GUEST_VOTES' => array( 64 | 1 => '%d vote d’invité', 65 | 2 => '%d votes d’invités', 66 | ), 67 | 68 | // Posting 69 | 'AP_POLL_VOTES_HIDE' => 'Masquer les votes', 70 | 'AP_POLL_VOTES_HIDE_EXPLAIN' => 'Si activé, les votes seront masqués jusqu’à la fin du sondage. Cette option fonctionne uniquement si le sondage possède une date d’échéance.', 71 | 'AP_POLL_VOTERS_SHOW' => 'Afficher le nom des votants', 72 | 'AP_POLL_VOTERS_SHOW_EXPLAIN' => 'Si activé, le noms des votants sera affiché aux utilisateurs ayant la permission adéquate. Le nom des votants ne sera pas affiché si les votes sont masqués.', 73 | 'AP_POLL_VOTERS_LIMIT' => 'Restreindre les votes', 74 | 'AP_POLL_VOTERS_LIMIT_EXPLAIN' => 'Si activé, seuls les participants à ce sujet peuvent voter.', 75 | 'AP_POLL_SHOW_ORDERED' => 'Trier les résultats', 76 | 'AP_POLL_SHOW_ORDERED_EXPLAIN' => 'Lorsque les résultats sont affichés, ceux-ci sont triés par ordre décroissant du nombre de votes reçus (le plus de votes en premier). Sinon, l’option de tri par défaut du sondage est utilisée.', 77 | 'AP_RUN_POLL' => 'Lancer le sondage', 78 | 'AP_RUN_POLL_FOR' => 'pour', 79 | 'AP_RUN_POLL_UNTIL' => 'jusqu’à', 80 | 'AP_RUN_POLL_INDEFINITELY' => 'indéfiniment', 81 | 'AP_POLL_END' => 'Fin du sondage', 82 | 'AP_POLL_END_EXPLAIN' => 'Spécifie la date et l’heure de fin du sondage. Si un de ces champs est spécifié, cela remplace la durée du sondage. Les champs laissés vides pour la date sont remplacés par la date de fin par défaut; les champs de l’heure laissés vides sont par défaut à 0. Si vous souhaitez utiliser la durée du sondage, cela nécessite de vider tous les champs.', 83 | 84 | 'AP_YYYY_MM_DD' => 'AAAA-MM-JJ', 85 | 'AP_HH_MM' => 'HH:MM', 86 | 'AP_POLL_END_INVALID' => 'La date/heure spécifiée est invalide', 87 | 'AP_POLL_TOTAL_LOWER_MAX_VOTES' => 'Le nombre maximum de votes pour une seule option ne peut pas dépasser le nombre total de votes à soumettre à toutes les options', 88 | 'AP_POLL_TOTAL_LOWER_MAX_OPTS' => 'Le nombre maximum d’options de vote ne peut pas dépasser le nombre total de votes à soumettre à toutes les options', 89 | 90 | 'AP_POLL_MAX_VALUE' => 'Nombre maximum de votes', 91 | 'AP_POLL_MAX_VALUE_EXPLAIN' => 'Il s’agit du nombre maximum de votes qu’un votant peut soumettre à une seule option.', 92 | 'AP_POLL_TOTAL_VALUE' => 'Nombre total de votes', 93 | 'AP_POLL_TOTAL_VALUE_EXPLAIN' => 'Il s’agit du nombre total de votes qu’un votant peut soumettre parmi toutes les options.', 94 | )); 95 | -------------------------------------------------------------------------------- /language/ru/advancedpolls.php: -------------------------------------------------------------------------------- 1 | 'Расширенные опросы', 41 | 42 | // Viewtopic 43 | 'AP_VOTES_HIDDEN' => 'Голосования скрыты', 44 | 'AP_POLL_RUN_TILL_APPEND' => ', до этого момента, все голоса будут скрыты.', 45 | 'AP_VOTERS' => 'Проголосовали', 46 | 'AP_NONE' => 'Нет голосов', 47 | 48 | 'AP_POLL_CANT_VOTE' => 'Вы не можете голосовать в этом опросе. Причина', 49 | 'AP_POLL_REASON_NOT_POSTED' => 'Вы ещё ни одного сообщения не написали в этой теме.', 50 | 'AP_POLL_VOTES_ARE_VISIBLE' => 'Обратите внимание, если вы проголосуете, ваш голос будет виден.', 51 | 'AP_POLL_DONT_VOTE_SHOW_RESULTS' => 'Не голосовать, только посмотреть результат.', 52 | 'AP_POLL_RESULTS_ARE_ORDERED' => 'Обратите внимание, результаты сортируются по мере уменьшения числа полученных голосов.', 53 | 'AP_POLL_TYPE_MISMATCH' => 'Несоответствие данных голосования, внутренняя ошибка.', 54 | 'AP_VOTE_CHANGED' => 'У вас нет права для изменения результатов голосования.', 55 | 'AP_TOO_MANY_VOTES' => 'Вы пытались установить слишком много голосов.', 56 | 57 | 'AP_MAX_VOTES_SELECT' => array( 58 | 1 => 'Вы можете выбрать до %2$d результатов из %1$d варианта', 59 | 2 => 'Вы можете выбрать до %2$d среди %1$d вариантов', 60 | ), 61 | 'AP_GUEST_VOTES' => array( 62 | 1 => '%d голос от гостя', 63 | 2 => '%d голоса от гостей', 64 | 3 => '%d голосов от гостей', 65 | ), 66 | 67 | // Posting 68 | 'AP_POLL_VOTES_HIDE' => 'Скрыть голосования', 69 | 'AP_POLL_VOTES_HIDE_EXPLAIN' => 'Если эта опция включена, голосования будут скрыты до тех пор, пока опрос не будет окончен
Эта опция работает только тогда, если в этом голосовании установлена дата окончания опроса.', 70 | 'AP_POLL_VOTERS_SHOW' => 'Показать список проголосовавших', 71 | 'AP_POLL_VOTERS_SHOW_EXPLAIN' => 'Если эта опция включена, пользователи, которые проголосовали, будут отображаться для всех с соответствующими настройками прав.
Обратите внимание, что проголосовавшие остаются скрытыми, если выбрано скрытое голосование.', 72 | 'AP_POLL_VOTERS_LIMIT' => 'Ограничить голосования', 73 | 'AP_POLL_VOTERS_LIMIT_EXPLAIN' => 'Если эта опция включена, голосовать смогут только те пользователи, которые уже ответили в этой теме.', 74 | 'AP_POLL_SHOW_ORDERED' => 'Порядок результатов голосования', 75 | 'AP_POLL_SHOW_ORDERED_EXPLAIN' => 'Результаты голосования отображаются в порядке убывания количества полученных голосов (наибольшее количество голосов вначале).
В противном случае результаты опроса отображаются в порядке их создания.', 76 | 'AP_RUN_POLL' => 'Продолжать опрос', 77 | 'AP_RUN_POLL_FOR' => 'в течение', 78 | 'AP_RUN_POLL_UNTIL' => 'до даты', 79 | 'AP_RUN_POLL_INDEFINITELY' => 'бесконечно', 80 | 'AP_POLL_END' => 'Окончание голосования', 81 | 'AP_POLL_END_EXPLAIN' => 'Укажите дату и время окончания голосования. Если любое из этих полей заполнено, длительность опроса в днях будет переопределена указанными значениями. По умолчанию поля даты пустые, но при указании длительности опроса, они автоматически заполняются датой его окончания; поля времени, также пустые по умолчанию, при этом устанавливаются в 0. Если вы хотите изменить длительность опрос, используя количество дней, вам следует очистить поля даты и времени окончания голосования, затем указать длительность опроса в днях.', 82 | 83 | 'AP_YYYY_MM_DD' => 'ГГГГ-ММ-ДД', 84 | 'AP_HH_MM' => 'ЧЧ:ММ', 85 | 'AP_POLL_END_INVALID' => 'Дата/Время указаны некорректно', 86 | 'AP_POLL_TOTAL_LOWER_MAX_VOTES' => 'Максимум голосов на один вариант не может быть больше, чем общая сумма голосов, которые распределяются между всеми вариантами', 87 | 'AP_POLL_TOTAL_LOWER_MAX_OPTS' => 'Максимум вариантов за которые можно проголосовать не можеть быть больше, чем общая сумма голосов, которые распределяются между всеми вариантами', 88 | 89 | 'AP_POLL_MAX_VALUE' => 'Максимум голосов', 90 | 'AP_POLL_MAX_VALUE_EXPLAIN' => 'Ограничение максимального количества голосов для одного варианта ответа.', 91 | 'AP_POLL_TOTAL_VALUE' => 'Всего голосов', 92 | 'AP_POLL_TOTAL_VALUE_EXPLAIN' => 'Ограничение общего количества голосов для всех вариантов опроса.', 93 | )); 94 | -------------------------------------------------------------------------------- /styles/prosilver/template/js/functions.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Advanced Polls 4 | * 5 | * @copyright (c) 2015 Wolfsblvt ( www.pinkes-forum.de ) 6 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 7 | * @author Clemens Husung (Wolfsblvt) 8 | */ 9 | 10 | // namespacing 11 | $.wolfsblvt = $.extend({}, $.wolfsblvt, { 12 | 13 | /// The Cookie Name for advanced searchbox pin setting. 14 | advancedpoll_json_data: wolfsblvt_ap_json_data, 15 | 16 | override_callback_advancedpolls_vote_poll_hidden: function (res) { 17 | /// 18 | /// Overrides the ajax callback function for poll votes 19 | /// 20 | /// (object) The results of the poll. 21 | 22 | if (typeof res.success !== 'undefined') { 23 | var poll = $('.topic_poll'); 24 | var panel = poll.find('.panel'); 25 | var resultsVisible = poll.find('dl:first-child .resultbar').is(':visible'); 26 | 27 | // Define functions we need inside of that function here 28 | var updatePanelHeight = function (height) { 29 | height = (typeof height === 'undefined') ? panel.find('.inner').outerHeight() : height; 30 | panel.css('min-height', height); 31 | }; 32 | var resizePanel = function (time) { 33 | var panelHeight = panel.height(); 34 | var innerHeight = panel.find('.inner').outerHeight(); 35 | 36 | if (panelHeight !== innerHeight) { 37 | panel.css({ 'min-height': '', 'height': panelHeight }) 38 | .animate({ height: innerHeight }, time, function () { 39 | panel.css({ 'min-height': innerHeight, 'height': '' }); 40 | }); 41 | } 42 | }; 43 | 44 | // Set min-height to prevent the page from jumping when the content changes 45 | updatePanelHeight(); 46 | 47 | // Remove the View results link 48 | if (!resultsVisible) { 49 | poll.find('.poll_view_results').hide(500); 50 | } 51 | 52 | if (!res.can_vote) { 53 | poll.find('.polls, .poll_max_votes, .poll_vote, .poll_option_select').fadeOut(500, function () { 54 | poll.find('.resultbar, .poll_option_percent, .poll_total_votes').show(); 55 | }); 56 | } else { 57 | // If the user can still vote, simply slide down the results 58 | poll.find('.resultbar, .poll_option_percent, .poll_total_votes').show(500); 59 | } 60 | 61 | // Get the votes count of the highest poll option 62 | // no 63 | 64 | // Update the total votes count 65 | poll.find('.poll_total_vote_cnt').html("??"); 66 | 67 | // Update each option 68 | poll.find('[data-poll-option-id]').each(function () { 69 | var $this = $(this); 70 | var optionId = $this.attr('data-poll-option-id'); 71 | var voted = (typeof res.user_votes[optionId] !== 'undefined'); 72 | var altText; 73 | 74 | altText = $this.attr('data-alt-text'); 75 | if (voted) { 76 | $this.attr('title', $.trim(altText)); 77 | } else { 78 | $this.attr('title', ''); 79 | }; 80 | 81 | $this.toggleClass('voted', voted); 82 | }); 83 | 84 | if (!res.can_vote) { 85 | poll.find('.polls').delay(400).fadeIn(500); 86 | } 87 | 88 | // Display "Your vote has been cast." message. Disappears after 5 seconds. 89 | var confirmationDelay = (res.can_vote) ? 300 : 900; 90 | poll.find('.vote-submitted').delay(confirmationDelay).slideDown(200, function () { 91 | if (resultsVisible) { 92 | updatePanelHeight(); 93 | } 94 | 95 | $(this).delay(5000).fadeOut(500, function () { 96 | resizePanel(300); 97 | }); 98 | }); 99 | 100 | // Remove the gap resulting from removing options 101 | setTimeout(function () { 102 | resizePanel(500); 103 | }, 1500); 104 | } 105 | }, 106 | extend_callback_advancedpolls_vote_poll_show_voters: function (res) { 107 | /// 108 | /// Extends the ajax callback function to show poll voters 109 | /// 110 | /// (object) The results of the poll. 111 | 112 | if (typeof res.success !== 'undefined') { 113 | var poll = $('.topic_poll'); 114 | var scoring = (typeof res.scoring !== 'undefined'); 115 | var spanname = 'name="' + $.wolfsblvt.advancedpoll_json_data.username_clean + '"'; 116 | var spanval_begin = "" + $.wolfsblvt.advancedpoll_json_data.username_string; 117 | var spanval_end = ""; 118 | 119 | console.log("running the extended callback code"); 120 | 121 | // Update each option 122 | poll.find('[data-poll-option-id]').each(function () { 123 | var $this = $(this); 124 | var $votersbox_voters = $this.next(".poll_voters_box").find(".poll_voters"); 125 | var optionId = $this.attr('data-poll-option-id'); 126 | var voted = (typeof res.user_votes[optionId] !== 'undefined'); 127 | var spanval = spanval_begin + ((scoring) ? "(" + res.user_vote_counts[optionId] + ")" : "") + spanval_end; 128 | 129 | var $voter_user = $votersbox_voters.children("span[" + spanname + "]"); 130 | 131 | if (voted) { 132 | if ($voter_user.length === 0) { 133 | if (res.vote_counts[optionId] > ((scoring) ? res.user_vote_counts[optionId] : 1)) { 134 | // If there are more voters than just the current user, add seperator after last element 135 | $votersbox_voters.children(":last-child").after($.wolfsblvt.advancedpoll_json_data.l_seperator); 136 | } 137 | else { 138 | // Remove the "No voters" notice 139 | $votersbox_voters.children('span[name="none"]').hide(500, function () { $(this).remove(); }); 140 | } 141 | $(spanval).hide().appendTo($votersbox_voters).show(500); 142 | } 143 | else { 144 | if (scoring) { 145 | $(spanval).hide().replaceAll($voter_user).show(500); 146 | } 147 | } 148 | } 149 | else { 150 | if ($voter_user.length > 0) { 151 | var callback = function () { 152 | if (res.vote_counts[optionId] > 0) { 153 | if (this.nextSibling !== null) { 154 | this.nextSibling.remove(); 155 | } 156 | else { 157 | if (this.previousSibling !== null) { 158 | this.previousSibling.remove(); 159 | } 160 | } 161 | } 162 | else { 163 | var $none_voter = $('' + $.wolfsblvt.advancedpoll_json_data.l_none + "").hide(); 164 | $none_voter.appendTo($votersbox_voters).show(500); 165 | } 166 | $(this).remove(); 167 | }; 168 | $voter_user.hide(500, callback); 169 | } 170 | } 171 | }); 172 | } 173 | }, 174 | }); -------------------------------------------------------------------------------- /styles/prosilver/template/event/posting_poll_body_options_after.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
51 |
52 |
{L_POLL_MAX_OPTIONS_EXPLAIN}
53 |
54 |
55 |
56 |
{L_AP_POLL_MAX_VALUE_EXPLAIN}
57 |
58 |
59 |
60 |
{L_AP_POLL_TOTAL_VALUE_EXPLAIN}
61 |
62 |
63 | 64 | 65 | 66 |
67 | 68 | 69 | 70 |
71 |
72 |
73 |
74 | 75 | 76 | 77 |
78 |
79 |
80 |
81 | 82 | 83 |
84 |
85 |
86 |
87 | 88 | 89 |
90 |
91 |
92 |
93 | 94 | 95 |
96 |
97 |
98 |
99 | 100 | 101 | -------------------------------------------------------------------------------- /event/listener.php: -------------------------------------------------------------------------------- 1 | advancedpolls = $advancedpolls; 43 | $this->path_helper = $path_helper; 44 | $this->template = $template; 45 | $this->user = $user; 46 | } 47 | 48 | /** 49 | * Assign functions defined in this class to event listeners in the core 50 | * 51 | * @return array 52 | */ 53 | public static function getSubscribedEvents() 54 | { 55 | return array( 56 | 'core.permissions' => 'adv_polls_permissions', // permissions 57 | 'core.user_setup' => 'load_language_on_setup', // language for notifications 58 | 'core.posting_modify_submission_errors' => 'check_config_for_polls', // posting check before saving 59 | 'core.posting_modify_template_vars' => 'config_for_polls_to_template', // posting to template 60 | 'core.submit_post_modify_sql_data' => 'save_config_for_polls', // posting to db 61 | 'core.viewtopic_modify_poll_data' => 'do_poll_voting_modifications', // viewtopic to db 62 | 'core.viewtopic_modify_poll_template_data' => 'do_poll_template_modifications', // viewtopic to template 63 | ); 64 | } 65 | 66 | /** 67 | * Adds the permission to the right permission category 68 | * 69 | * @param object $event The event object 70 | * @return void 71 | */ 72 | public function adv_polls_permissions($event) 73 | { 74 | $permissions = array_merge($event['permissions'], array( 75 | 'f_seevoters' => array('lang' => 'ACL_F_SEEVOTERS', 'cat' => 'polls'), 76 | 'm_seevoters' => array('lang' => 'ACL_M_SEEVOTERS', 'cat' => 'misc'), 77 | )); 78 | $event['permissions'] = $permissions; 79 | } 80 | 81 | /** 82 | * Load common language files during user setup 83 | * 84 | * @param object $event The event object 85 | * @return void 86 | */ 87 | public function load_language_on_setup($event) 88 | { 89 | $lang_set_ext = $event['lang_set_ext']; 90 | $lang_set_ext[] = array( 91 | 'ext_name' => 'wolfsblvt/advancedpolls', 92 | 'lang_set' => array('advancedpolls', 'advancedpolls_common'), 93 | ); 94 | $event['lang_set_ext'] = $lang_set_ext; 95 | } 96 | 97 | /** 98 | * Checks the advanced config for polls before saving into the topic, from the posting page 99 | * 100 | * @param object $event The event object 101 | * @return void 102 | */ 103 | public function check_config_for_polls($event) 104 | { 105 | $poll = $event['poll']; 106 | 107 | if ($event['submit'] && isset($poll['poll_title']) && $poll['poll_title']) 108 | { 109 | $error = $this->advancedpolls->check_config_for_polls($poll); 110 | if (count($error)) 111 | { 112 | $event['error'] = array_merge($event['error'], $error); 113 | } 114 | else 115 | { 116 | $event['poll'] = $poll; 117 | } 118 | } 119 | } 120 | 121 | /** 122 | * Adds the poll config options to the posting template 123 | * 124 | * @param object $event The event object 125 | * @return void 126 | */ 127 | public function config_for_polls_to_template($event) 128 | { 129 | $post_data = $event['post_data']; 130 | $page_data = $event['page_data']; 131 | $preview = $event['preview']; 132 | $this->advancedpolls->config_for_polls_to_template($post_data, $page_data, $preview); 133 | $event['page_data'] = $page_data; 134 | } 135 | 136 | /** 137 | * Saves the advanced config for polls into the topic, from the posting page 138 | * 139 | * @param object $event The event object 140 | * @return void 141 | */ 142 | public function save_config_for_polls($event) 143 | { 144 | if (isset($event['poll']['poll_title'])) 145 | { 146 | $sql_data = $event['sql_data']; 147 | $this->advancedpolls->save_config_for_polls($sql_data); 148 | $event['sql_data'] = $sql_data; 149 | } 150 | } 151 | 152 | /** 153 | * Modifies the voting process depending on the advanced poll settings 154 | * 155 | * @param object $event The event object 156 | * @return void 157 | */ 158 | public function do_poll_voting_modifications($event) 159 | { 160 | $topic_data = $event['topic_data']; 161 | 162 | if (isset($topic_data['poll_title'])) 163 | { 164 | $vote_counts = $event['vote_counts']; 165 | $cur_voted_id = $event['cur_voted_id']; 166 | $voted_id = $event['voted_id']; 167 | $poll_info = $event['poll_info']; 168 | $s_can_vote = $event['s_can_vote']; 169 | $viewtopic_url = $event['viewtopic_url']; 170 | $this->advancedpolls->do_poll_voting_modifications($topic_data, $vote_counts, $cur_voted_id, $voted_id, $poll_info, $s_can_vote, $viewtopic_url); 171 | $event['vote_counts'] = $vote_counts; 172 | $event['cur_voted_id'] = $cur_voted_id; 173 | $event['voted_id'] = $voted_id; 174 | $event['poll_info'] = $poll_info; 175 | $event['s_can_vote'] = $s_can_vote; 176 | } 177 | } 178 | 179 | /** 180 | * Modifys the viewtopic template vars to match the advanced poll settings 181 | * 182 | * @param object $event The event object 183 | * @return void 184 | */ 185 | public function do_poll_template_modifications($event) 186 | { 187 | $topic_data = $event['topic_data']; 188 | 189 | if (isset($topic_data['poll_title'])) 190 | { 191 | $vote_counts = $event['vote_counts']; 192 | $poll_info = $event['poll_info']; 193 | $poll_template_data = $event['poll_template_data']; 194 | $poll_options_template_data = $event['poll_options_template_data']; 195 | $this->advancedpolls->do_poll_template_modifications($topic_data, $vote_counts, $poll_info, $poll_template_data, $poll_options_template_data); 196 | $event['poll_template_data'] = $poll_template_data; 197 | $event['poll_options_template_data'] = $poll_options_template_data; 198 | } 199 | } 200 | } 201 | -------------------------------------------------------------------------------- /acp/advancedpolls_module.php: -------------------------------------------------------------------------------- 1 | config = $phpbb_container->get('config'); 45 | $this->db = $phpbb_container->get('dbal.conn'); 46 | $this->user = $phpbb_container->get('user'); 47 | $this->template = $phpbb_container->get('template'); 48 | $this->request = $phpbb_container->get('request'); 49 | 50 | $action = $this->request->variable('action', '', true); 51 | $submit = ($this->request->is_set_post('submit')) ? true : false; 52 | 53 | $this->form_key = 'acp_advancedpolls'; 54 | add_form_key($this->form_key); 55 | 56 | $display_vars = array( 57 | 'title' => 'AP_TITLE_ACP', 58 | 'vars' => array( 59 | 'legend1' => 'AP_GLOBAL_SETTINGS', 60 | 'wolfsblvt.advancedpolls.activate_incremental_votes' => array('lang' => 'AP_ACT_INCREMENTAL_VOTES', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 61 | 'wolfsblvt.advancedpolls.activate_closed_voting' => array('lang' => 'AP_ACT_CLOSED_VOTING', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 62 | 'wolfsblvt.advancedpolls.activate_no_vote' => array('lang' => 'AP_ACT_POLL_NO_VOTE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 63 | 'wolfsblvt.advancedpolls.activate_poll_end' => array('lang' => 'AP_ACT_POLL_END', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 64 | 'wolfsblvt.advancedpolls.activate_notifications' => array('lang' => 'AP_ACT_POLL_NOTIFICATIONS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 65 | 'legend2' => 'AP_PER_POLL_SETTINGS', 66 | 'wolfsblvt.advancedpolls.activate_poll_scoring' => array('lang' => 'AP_ACT_POLL_SCORING', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 67 | 'wolfsblvt.advancedpolls.default_poll_votes_change' => array('lang' => 'AP_DEFAULT_VOTES_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 68 | 'wolfsblvt.advancedpolls.activate_poll_votes_hide' => array('lang' => 'AP_ACT_VOTES_HIDE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 69 | 'wolfsblvt.advancedpolls.default_poll_votes_hide' => array('lang' => 'AP_DEFAULT_VOTES_HIDE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 70 | 'wolfsblvt.advancedpolls.activate_poll_voters_show' => array('lang' => 'AP_ACT_VOTERS_SHOW', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 71 | 'wolfsblvt.advancedpolls.default_poll_voters_show' => array('lang' => 'AP_DEFAULT_VOTERS_SHOW', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 72 | 'wolfsblvt.advancedpolls.activate_poll_voters_limit' => array('lang' => 'AP_ACT_VOTERS_LIMIT', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 73 | 'wolfsblvt.advancedpolls.default_poll_voters_limit' => array('lang' => 'AP_DEFAULT_VOTERS_LIMIT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 74 | 'wolfsblvt.advancedpolls.activate_poll_show_ordered' => array('lang' => 'AP_ACT_SHOW_ORDERED', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true), 75 | 'wolfsblvt.advancedpolls.default_poll_show_ordered' => array('lang' => 'AP_DEFAULT_SHOW_ORDERED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 76 | 'legend3' => 'ACP_SUBMIT_CHANGES' 77 | ), 78 | ); 79 | 80 | #region Submit 81 | if ($submit) 82 | { 83 | $submit = $this->do_submit_stuff($display_vars); 84 | 85 | // If the submit was valid, so still submitted 86 | if ($submit) 87 | { 88 | trigger_error($this->user->lang('CONFIG_UPDATED') . adm_back_link($this->u_action), E_USER_NOTICE); 89 | } 90 | } 91 | #endregion 92 | 93 | $this->generate_stuff_for_cfg_template($display_vars); 94 | 95 | // Output page template file 96 | $this->tpl_name = 'acp_advancedpolls'; 97 | $this->page_title = $this->user->lang($display_vars['title']); 98 | } 99 | 100 | /** 101 | * Abstracted method to do the submit part of the acp. Checks values, saves them 102 | * and displays the message. 103 | * If error happens, Error is shown and config not saved. (so this method quits and returns false. 104 | * 105 | * @param array $display_vars The display vars for this acp site 106 | * @param array $special_functions Assoziative Array with config values where special functions should run on submit instead of simply save the config value. Array should contain 'config_value' => function ($this) { function code here }, or 'config_value' => null if no function should run. 107 | * @return bool Submit valid or not. 108 | */ 109 | protected function do_submit_stuff($display_vars, $special_functions = array()) 110 | { 111 | $this->new_config = $this->config; 112 | $cfg_array = ($this->request->is_set('config')) ? $this->request->variable('config', array('' => '')) : $this->new_config; 113 | $error = isset($error) ? $error : array(); 114 | 115 | validate_config_vars($display_vars['vars'], $cfg_array, $error); 116 | 117 | if (!check_form_key($this->form_key)) 118 | { 119 | $error[] = $this->user->lang['FORM_INVALID']; 120 | } 121 | 122 | // Do not write values if there is an error 123 | if (sizeof($error)) 124 | { 125 | $submit = false; 126 | return false; 127 | } 128 | 129 | // We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to... 130 | foreach ($display_vars['vars'] as $config_name => $null) 131 | { 132 | // We want to skip that, or run the function. (We do this before checking if there is a request value set for it, 133 | // cause maybe we want to run a function anyway, based on whatever. We can check stuff manually inside this function) 134 | if (is_array($special_functions) && array_key_exists($config_name, $special_functions)) 135 | { 136 | $func = $special_functions[$config_name]; 137 | if (isset($func) && is_callable($func)) 138 | { 139 | $func(); 140 | } 141 | 142 | continue; 143 | } 144 | 145 | if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false) 146 | { 147 | continue; 148 | } 149 | 150 | // Sets the config value 151 | $this->new_config[$config_name] = $cfg_array[$config_name]; 152 | $this->config->set($config_name, $cfg_array[$config_name]); 153 | } 154 | 155 | return true; 156 | } 157 | 158 | /** 159 | * Abstracted method to generate acp configuration pages out of a list of display vars, using 160 | * the function build_cfg_template(). 161 | * Build configuration template for acp configuration pages 162 | * 163 | * @param array $display_vars The display vars for this acp site 164 | */ 165 | protected function generate_stuff_for_cfg_template($display_vars) 166 | { 167 | $this->new_config = $this->config; 168 | $cfg_array = ($this->request->is_set('config')) ? $this->request->variable('config', array('' => '')) : $this->new_config; 169 | $error = isset($error) ? $error : array(); 170 | 171 | validate_config_vars($display_vars['vars'], $cfg_array, $error); 172 | 173 | foreach ($display_vars['vars'] as $config_key => $vars) 174 | { 175 | if (!is_array($vars) && strpos($config_key, 'legend') === false) 176 | { 177 | continue; 178 | } 179 | 180 | if (strpos($config_key, 'legend') !== false) 181 | { 182 | $this->template->assign_block_vars('options', array( 183 | 'S_LEGEND' => true, 184 | 'LEGEND' => (isset($this->user->lang[$vars])) ? $this->user->lang[$vars] : $vars) 185 | ); 186 | 187 | continue; 188 | } 189 | 190 | $type = explode(':', $vars['type']); 191 | 192 | $l_explain = ''; 193 | if ($vars['explain'] && isset($vars['lang_explain'])) 194 | { 195 | $l_explain = (isset($this->user->lang[$vars['lang_explain']])) ? $this->user->lang[$vars['lang_explain']] : $vars['lang_explain']; 196 | } 197 | else if ($vars['explain']) 198 | { 199 | $l_explain = (isset($this->user->lang[$vars['lang'] . '_EXPLAIN'])) ? $this->user->lang[$vars['lang'] . '_EXPLAIN'] : ''; 200 | } 201 | 202 | $content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars); 203 | 204 | if (empty($content)) 205 | { 206 | continue; 207 | } 208 | 209 | $this->template->assign_block_vars('options', array( 210 | 'KEY' => $config_key, 211 | 'TITLE' => (isset($this->user->lang[$vars['lang']])) ? $this->user->lang[$vars['lang']] : $vars['lang'], 212 | 'S_EXPLAIN' => $vars['explain'], 213 | 'TITLE_EXPLAIN' => $l_explain, 214 | 'CONTENT' => $content, 215 | )); 216 | } 217 | 218 | $this->template->assign_vars(array( 219 | 'S_ERROR' => (sizeof($error)) ? true : false, 220 | 'ERROR_MSG' => implode('
', $error), 221 | 222 | 'U_ACTION' => $this->u_action) 223 | ); 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | --------------------------------------------------------------------------------