[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.
Locked
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 » Thu Feb 23, 2017 12:45 am

3Di wrote:
Thu Feb 23, 2017 12:22 am
Hi Javier,
in case of "delete user but retain posts" the only reference you could play with is the index post_username in the POSTS table, the poster_id will be set to ANONYMOUS (1).
Like adding a vote_user_name to the VOTES_TABLE and do some magic.

If you retain posts whilst deleting an user IMO the votes should be retained as well, removed in case of "delete user and posts". But that's just my opinion. :)

Regards.
Thanks Marco.

I have reviewed the core, and the fact is that regardless of the delete user option (retain or delete posts), the votes table remains intact. But, as you said, there is no way to restore the username (unless you store them in the poll votes table, as you suggested, but IMO that would be overkill).

So, I am inclined to leave it alone, and "just" consider those votes as guest votes always. If you see guest votes in a poll that does not allow voting to guests, and you had deleted a user... Well, it's either that, or not much more (deleting votes during user deletion could be an option, but very costly, for almost no benefit).

Quick and dirty hack (I will provide a more definite fix in the next rev):
Around line 700, after { and before a call to to get_username_string, add the following:

Code: Select all

if (!isset($user_cache[$voter_id]['total_user_votes']))
{
	continue;
}
And then, around line 727, also after { and before a call to to get_username_string, add the following:

Code: Select all

if (!isset($voter_data['total_user_votes']))
{
	continue;
}
Untested ;)
-javiexin

User avatar
3Di
Registered User
Posts: 12130
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT), Frankfurt (DE)
Name: Marco
Contact:

Re: [3.1][BETA] Advanced Polls 1.2

Post by 3Di » Thu Feb 23, 2017 1:41 am

Or use a "not available" language string to display instead of the supposed username

Code: Select all

if (!isset($voter_data['total_user_votes']))
{
	$username_not_avail = $this->user->lang['USERNAME_NOT_AVAILABLE'];
	
	// etc...
.....
I don't know the code of this extension, just a thought, I already implemented this trick for TPOTM.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades

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 » Thu Feb 23, 2017 12:49 pm

Not a bad idea... I will look into it for the final fix.
-javiexin

User avatar
3Di
Registered User
Posts: 12130
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT), Frankfurt (DE)
Name: Marco
Contact:

Re: [3.1][BETA] Advanced Polls 1.2

Post by 3Di » Fri Feb 24, 2017 1:20 am

get_username_string as a 5th parameter has "guest_username" (optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then.)

The event core.modify_username_string allows to change this optional parameter to specify the guest username.

Seems elegant, at a first glance.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades

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 » Fri Feb 24, 2017 1:32 am

3Di wrote:
Fri Feb 24, 2017 1:20 am
get_username_string as a 5th parameter has "guest_username" (optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then.)

The event core.modify_username_string allows to change this optional parameter to specify the guest username.

Seems elegant, at a first glance.
The problem is that I should know where it is being called from, as I do not want to mess around with other extensions that might do this for (better) reasons. So I prefer the fix to involve only the current extension code (using the extra get_username_string param would be ok). Anyhow, the original name is lost, so there is no way to get anything but a generic language string, so if done, why not doing it directly... Not sure if it is worth that complication, this is an extremely rare case, so keeping the votes as "guest" votes could be ok. I will look into it.
-javiexin

User avatar
3Di
Registered User
Posts: 12130
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT), Frankfurt (DE)
Name: Marco
Contact:

Re: [3.1][BETA] Advanced Polls 1.2

Post by 3Di » Fri Feb 24, 2017 4:39 am

Indeed, agreed. :)
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades

User avatar
ALXGS
Registered User
Posts: 51
Joined: Wed Jan 11, 2017 4:27 pm

Re: [BETA] Advanced Polls 1.2

Post by ALXGS » Sat Mar 04, 2017 1:54 pm

javiexin wrote:
Sun Nov 06, 2016 12:59 pm
I am planning on releasing a new version within a month or two, to be submitted to the CDB.

There are only a few changes that I am planning:
- Vote removal
- Improvements on the poll definition page
- Chasing the inconsistent issue with some polls failing with the "Out of range value for column 'poll_start'" error

I will then work on the migration of the extension to 3.2.

Regards,
-javiexin
Hi javiexin! How it's going the work on 3.2? Some good news?

Great ext!!! :)

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 » Sat Mar 04, 2017 1:59 pm

ALXGS wrote:
Sat Mar 04, 2017 1:54 pm
Hi javiexin! How it's going the work on 3.2? Some good news?
Unfortunately, slow.

I am embarked in another extension that is taking way more that what I expected... But it will come :lol:
-javiexin

User avatar
EFiNSTORM
Registered User
Posts: 149
Joined: Fri Dec 26, 2008 4:09 am
Location: localhost
Contact:

Re: [3.1][BETA] Advanced Polls 1.2

Post by EFiNSTORM » Wed Mar 08, 2017 4:31 am

FYI guys,

Anyone using this extension with 3.2 will get an 500 error in notification options. Since it's still using the old 3.1 function.

Mohammed AlSarsawi
Registered User
Posts: 41
Joined: Fri Mar 03, 2017 1:35 pm

Re: [3.1][BETA] Advanced Polls 1.2

Post by Mohammed AlSarsawi » Sun Mar 12, 2017 3:41 am

Hello

Thank you for the great ext.
can you make the option of making poll for every posts in one subject
not only one poll for each subject
i really need this

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 » Sun Mar 12, 2017 11:19 am

If I understand you right, what you want is that a single topic has multiple polls in it, as many as one per post.

If this is the case, I must say that this is not possible with the current poll system in phpbb, as the poll is uniquely identified with the topic (poll is an optional component of the topic) and posts do NOT have any relation with polls.

So, I am afraid there is no chance. Sorry.
-javiexin

Mohammed AlSarsawi
Registered User
Posts: 41
Joined: Fri Mar 03, 2017 1:35 pm

Re: [3.1][BETA] Advanced Polls 1.2

Post by Mohammed AlSarsawi » Fri Mar 17, 2017 11:29 am

yes that what i mean .. poll for each post

I hope the phpBB poll system will support this in future
at least multi questions with there own options for a single subject


Thank you

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 » Fri Mar 17, 2017 3:37 pm

Mohammed AlSarsawi wrote:
Fri Mar 17, 2017 11:29 am
I hope the phpBB poll system will support this in future
at least multi questions with there own options for a single subject
Don't count on this.
But multiple questions in same poll might be possible in a future version of this extension, not any time soon though, too much backlog...
-javiexin

User avatar
Hippie459MN
Registered User
Posts: 865
Joined: Mon Oct 15, 2007 10:13 pm
Location: Minnesota, USA
Contact:

Re: [3.1][BETA] Advanced Polls 1.2

Post by Hippie459MN » Fri Mar 24, 2017 5:44 pm

I am having a problem. I have had this installed for some time and updated my forum a few times since and I am getting ready to go to 3.2 and that is when I noticed I no longer had any ACP settings for this in the extensions tab and when I disabled it and went to delete the data I get this error.

Code: Select all

A required module does not exist: AP_TITLE_ACP
I have tried re-uploading the extension files with no luch and it wont delete the data so I can uninstall it properly. Any ideas??

Thanks.

EDIT: I had to manually add the AP_TITLE_ACP to the extensions tab then delete data again and that seemed to work and not report any errors.

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 » Fri Mar 24, 2017 9:09 pm

Note that this extension does NOT work (completely) in 3.2. It needs updating in the Notification reminders section, and it has not gone through enough testing in 3.2.

Regarding your issue, what you did seems right to me. If you continue having issues let me know. But I suspect that at some point in time you removed the files without disabling/delete data the extension, and that is a bad idea in general (I know that usually happens by accident and not on purpose...)

Regards,
-javiexin

Locked

Return to “Abandoned Extensions”

Who is online

Users browsing this forum: Tbot [Bot] and 5 guests