Page 1 of 11

[ABD] Advanced Polls

Posted: Mon Dec 29, 2014 4:13 pm
by Wolfsblvt
Image

Extension Name: Advanced Polls
Author: Wolfsblvt

Extension Description: Advances the core poll system of phpBB with new features like hiding votes till end, showing poll voters, limiting the votes and more.
Extension Version: 1.1.0-b1

Requirements:
  • PHP: >= 5.4.0
Features:
Current Features
****************
  • Ability to hide poll votes till end of poll
  • Ability to show poll voters in poll
  • Ability to mark a poll as "I don't want to vote" so you can directly see the results
  • Choose default options for poll creation
  • Permission to see poll voters
  • Limit voting to people posted in thread
  • Works with all the ajax calls
  • Full subsilver2 support
Planned Features
****************
  • Notification if hidden poll you voted in has ended (?)
Screenshots:
Image

Image

Image

Image


Extension Download: wolfsblvt.advancedpolls.zip

GitHub Repository: http://github.com/Wolfsblvt/advancedpolls/
(Just for viewing purposes, do not install this extension from GitHub!)

More Information:
This extension is based on some event requests, here and here
There are some features missing in the core poll system of phpBB that I need for my forum, and I think it will be useful for others too, so I decided to combine the use cases for modifying the poll system and create one extension for this. Here is it now!
If you have suggestions, I would be glad (:

If you don't like the styling of the poll voters list, it can be easily modified in css, even with limiting the usernames displayed, etc.

First time I'll support subsilver2. I'll not use that style, so I will not test it very intensively. But if you have any issues, I'll look into it (:
This extension is fully compatible with the new ajax calls where the site isn't reloaded when you vote.

If have two suggestions for features, wich I don't really need, but if someone is interested in, I would do and include them.

Bug reports for this extension in this thread please, or on GitHub.

══════════════════════════════════════════════════
If you like what I am doing, you can Image me or buy me something here Image or here Image so that I keep doing what I am doing.

Re: [BETA] Advanced Polls

Posted: Mon Dec 29, 2014 4:13 pm
by Wolfsblvt
Changelog:
Actual Version
**************

-- Version 1.1.0-b1 --------------
• Included dutch, russion and italian translation
• Reduced required PHP version to 5.3.3
• Added travis testing for repository
• Fix settings lost on preview
• Implemented "Don't want to vote" option
• Implemented default option for phpBB core options for polls

###########################################################################
Past Versions
*************

-- Version 1.0.1 --------------
• Included spanish, french and swedish translation
• Fixed clipping issue in options on small resolution
• Typo in language files

-- Version 1.0.0 --------------
• First implementation for 3.1
• Implemented workaround for missing events


Events missing:
This extension is based on one template event, that is missing in phpBB 3.1.2 and lower. I'll try to add it to phpBB as soon as the BugTracker is back, so that it may be included in 3.1.3. But don't worry, there is a workaround included in this extension, wich uses another event and moves the html to the right position. Not the best, but it works (:
If you want to speed it up, you can add the events yourself to your phpBB core files:

prosilver
Open posting_poll_body.html and find:

Code: Select all

				<dt><label for="poll_vote_change">{L_POLL_VOTE_CHANGE}{L_COLON}</label></dt>
				<dd><label for="poll_vote_change"><input type="checkbox" id="poll_vote_change" name="poll_vote_change"{VOTE_CHANGE_CHECKED} /> {L_POLL_VOTE_CHANGE_EXPLAIN}</label></dd>
			</dl>
		<!-- ENDIF -->
Add after:

Code: Select all

		<!-- EVENT posting_poll_body_options_after -->
subsilver2
Open posting_poll_body.html and find:

Code: Select all

		<td class="row1"><b class="genmed">{L_POLL_VOTE_CHANGE}{L_COLON}</b><br /><span class="gensmall">{L_POLL_VOTE_CHANGE_EXPLAIN}</span></td>
		<td class="row2"><input type="checkbox" class="radio" name="poll_vote_change"{VOTE_CHANGE_CHECKED} /></td>
	</tr>
<!-- ENDIF -->
Add after:

Code: Select all

<!-- EVENT posting_poll_body_options_after -->

Re: [BETA] Advanced Polls

Posted: Mon Dec 29, 2014 6:14 pm
by Jessica
EDIT: oops never mind.

Very nice ext. I've always thought polls in phpBB sucked and needed major improving.

Re: [BETA] Advanced Polls

Posted: Mon Dec 29, 2014 6:29 pm
by Wolfsblvt
Jessica wrote:Very nice ext. I've always thought polls in phpBB sucked and needed major improving.
So is this what you thought about, or do you have any further improvement suggestions?

Re: [BETA] Advanced Polls

Posted: Mon Dec 29, 2014 6:52 pm
by sp3ctre
I have just tested it on my forum... absolutely brilliant, exactly what I was looking for. Thanks!

Re: [BETA] Advanced Polls

Posted: Mon Dec 29, 2014 7:01 pm
by koraldon
did not test it yet, but looks great.

Re: [BETA] Advanced Polls

Posted: Mon Dec 29, 2014 7:11 pm
by david63
I have not tried it yet but I notice that there are permissions. Does this mean that Admins and/or mods can see who has voted, and how, but members cannot?

Re: [BETA] Advanced Polls

Posted: Mon Dec 29, 2014 7:15 pm
by Wolfsblvt
david63 wrote:I have not tried it yet but I notice that there are permissions. Does this mean that Admins and/or mods can see who has voted, and how, but members cannot?
There is a permission for who can see poll voters if they are enabled.
By default, it is set to registered users (to prevent guests from seeing private data), but you can also change it to just admins/mods (:
But there is no option to see voters if the option is not enabled in this topic or the votes are hidden cause the poll still runs.

Re: [BETA] Advanced Polls

Posted: Mon Dec 29, 2014 7:32 pm
by Raul [ThE KuKa]
Nice extension Clemens ;)

Edit: Working Spanish translation. :geek:

Re: [BETA] Advanced Polls

Posted: Mon Dec 29, 2014 8:40 pm
by Raul [ThE KuKa]
"PR" Spanish translation ready. ;)

Re: [BETA] Advanced Polls

Posted: Mon Dec 29, 2014 11:29 pm
by spello
What about ability to hide poll results until sb vote?

Re: [BETA] Advanced Polls

Posted: Mon Dec 29, 2014 11:42 pm
by Wolfsblvt
spello wrote:What about ability to hide poll results until sb vote?
The results are hidden until you vote. Or do you mean that you cannot click on "show votes" until you have voted yourself?

Re: [BETA] Advanced Polls

Posted: Tue Dec 30, 2014 6:22 am
by Niknovel

Re: [BETA] Advanced Polls

Posted: Tue Dec 30, 2014 7:54 am
by Cobra45
Will there be voting for guests? Without it the polls are usless, in my opinion.

Re: [BETA] Advanced Polls

Posted: Tue Dec 30, 2014 8:50 am
by draky
Why not possible to install from GitHub ZIP file directly ?
Can't you include... what's not included on GH files ?

GH gives me RSS in fact to see if an extension has been updated :p