[ABD] Advanced Polls 1.2

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Mohammed AlSarsawi
Registered User
Posts: 72
Joined: Fri Mar 03, 2017 1:35 pm

Re: [3.1][BETA] Advanced Polls 1.2

Post by Mohammed AlSarsawi »

suggestion

add option to reset the votes automatically after X days or hours


Thank you
Bruce Banner
Registered User
Posts: 1338
Joined: Thu Sep 25, 2014 10:36 am

Re: [3.1][BETA] Advanced Polls 1.2

Post by Bruce Banner »

Hi. I'm having an issue that was discussed earlier in this topic. It has to do with a particular file being the wrong UTF type or something but I know nothing about that so I'm hoping you'll be able to tell me exactly what I should do.

Here's what the poll creation options look like for me,

Image

As you can see, 2 options per user fields and no way to set a specific end time.
User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][BETA] Advanced Polls 1.2

Post by javiexin »

Before we go further: what are your versions of phpBB and Advanced Polls?
Also, have you checked the Advanced Polls settings page? Please, tell me your selected options.
You are talking about two options, but I don't see that, although it is irrelevant for now.
Let me know,
-javiexin
Bruce Banner
Registered User
Posts: 1338
Joined: Thu Sep 25, 2014 10:36 am

Re: [3.1][BETA] Advanced Polls 1.2

Post by Bruce Banner »

javiexin wrote: Wed Apr 19, 2017 9:16 am Before we go further: what are your versions of phpBB and Advanced Polls?
phpbb 3.1.10 and Advanced Polls 1.2.1-b1
Also, have you checked the Advanced Polls settings page? Please, tell me your selected options.
I have everything enabled, and everything set to yes.
You are talking about two options, but I don't see that
Look at the image again. 1 options per user field, and then below, another options per user field.
User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][BETA] Advanced Polls 1.2

Post by javiexin »

You are right, and gave me the pointer to the error...

Just replace the file styles/prosilver/template/lib/jxtools.js with a fresh download from GitHub, it had the wrong file endings, for some strange reason...

Thanks for pointing me to that bug!
-javiexin
Bruce Banner
Registered User
Posts: 1338
Joined: Thu Sep 25, 2014 10:36 am

Re: [3.1][BETA] Advanced Polls 1.2

Post by Bruce Banner »

javiexin wrote: Wed Apr 19, 2017 6:52 pm You are right, and gave me the pointer to the error...

Just replace the file styles/prosilver/template/lib/jxtools.js with a fresh download from GitHub, it had the wrong file endings, for some strange reason...

Thanks for pointing me to that bug!
-javiexin
You're welcome! And that remedy worked. Unfortunately, there's another bug.

As you can see here,

Image

and here,

Image

the time reads funny. It should say 20:06, not 20:6
User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][BETA] Advanced Polls 1.2

Post by javiexin »

Bruce Banner wrote: Wed Apr 19, 2017 7:13 pm Unfortunately, there's another bug.

As you can see here,

Image

and here,

Image

the time reads funny. It should say 20:06, not 20:6
That's an easy one, just formatting. Will fix it tomorrow, too late now. But the second picture will remain as shown: it is the way input elements work.
Bruce Banner
Registered User
Posts: 1338
Joined: Thu Sep 25, 2014 10:36 am

Re: [3.1][BETA] Advanced Polls 1.2

Post by Bruce Banner »

javiexin wrote: Wed Apr 19, 2017 8:45 pm
Bruce Banner wrote: Wed Apr 19, 2017 7:13 pm Unfortunately, there's another bug.

As you can see here,

Image

and here,

Image

the time reads funny. It should say 20:06, not 20:6
That's an easy one, just formatting. Will fix it tomorrow, too late now. But the second picture will remain as shown: it is the way input elements work.
Great, thanks.
Bruce Banner
Registered User
Posts: 1338
Joined: Thu Sep 25, 2014 10:36 am

Re: [3.1][BETA] Advanced Polls 1.2

Post by Bruce Banner »

Did you get a chance to fix the formatting?
User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][BETA] Advanced Polls 1.2

Post by javiexin »

Not yet, i'm doing it right now.
User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][BETA] Advanced Polls 1.2

Post by javiexin »

Bruce Banner wrote: Thu Apr 20, 2017 9:34 pm Did you get a chance to fix the formatting?
Quick fix.

Open file ext/wolfsblvt/advancedpolls/styles/prosilver/template/js/poll_length_posting.js with a good editor, such as Notepad++.

Find line starting with:

Code: Select all

		document.getElementById('wolfsblvt_poll_end_label').innerHTML = apPollEnd.getFullYear()
Replace full line with:

Code: Select all

		document.getElementById('wolfsblvt_poll_end_label').innerHTML = apPollEnd.getFullYear() + "/" + (apPollEnd.getMonth() + 1) + "/" + apPollEnd.getDate() + " " + ("0" + apPollEnd.getHours()).slice(-2) + ":" + ("0" + apPollEnd.getMinutes()).slice(-2);
That will do it.
-javiexin

PS: This "just" changes hours and minutes to be two digits always. The day and month are not zero-padded. And input does not use leading zeros either.
Bruce Banner
Registered User
Posts: 1338
Joined: Thu Sep 25, 2014 10:36 am

Re: [3.1][BETA] Advanced Polls 1.2

Post by Bruce Banner »

javiexin wrote: Thu Apr 20, 2017 9:47 pm
Bruce Banner wrote: Thu Apr 20, 2017 9:34 pm Did you get a chance to fix the formatting?
Quick fix.

Open file ext/wolfsblvt/advancedpolls/styles/prosilver/template/js/poll_length_posting.js with a good editor, such as Notepad++.

Find line starting with:

Code: Select all

		document.getElementById('wolfsblvt_poll_end_label').innerHTML = apPollEnd.getFullYear()
Replace full line with:

Code: Select all

		document.getElementById('wolfsblvt_poll_end_label').innerHTML = apPollEnd.getFullYear() + "/" + (apPollEnd.getMonth() + 1) + "/" + apPollEnd.getDate() + " " + ("0" + apPollEnd.getHours()).slice(-2) + ":" + ("0" + apPollEnd.getMinutes()).slice(-2);
That will do it.
-javiexin

PS: This "just" changes hours and minutes to be two digits always. The day and month are not zero-padded. And input does not use leading zeros either.
That worked great, thanks. :D Will you be uploading the fixed version of the file to github?
User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][BETA] Advanced Polls 1.2

Post by javiexin »

Sure, but will be when i update the extension further, so not soon.
Mohammed AlSarsawi
Registered User
Posts: 72
Joined: Fri Mar 03, 2017 1:35 pm

Re: [3.1][BETA] Advanced Polls 1.2

Post by Mohammed AlSarsawi »

Hello javiexin

suggestions :

- add option to reset the votes automatically after X days or hours
- add X maximum votes per day for each user


Thank you for your work
User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][BETA] Advanced Polls 1.2

Post by javiexin »

Mohammed AlSarsawi wrote: Sun Apr 23, 2017 4:21 am Hello javiexin

suggestions :

- add option to reset the votes automatically after X days or hours
- add X maximum votes per day for each user


Thank you for your work
Don't really get what you want, and more importantly, what is the use case for this?

Resetting the votes may be done by editing the poll (add/remove/change an option, and change it back if needed). But why would you want to reset a poll result, loosing all current votes? And what is the purpose of maximum votes per day? You are asking for a completely different type of feature...

This would complicate A LOT the code, including significant changes to the DB.

Without a clear use case, that might be of general value, I will not do anything, sorry.
Regards,
-javiexin
Locked

Return to “Abandoned Extensions”