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:

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

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

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.

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.

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...)