AndyB
Well-known member
I'd like to be able to have a link under each poll that would allow members to remove their vote.
I'm not sure if creating an add-on is the best way to do this.
I think the following needs to happen:
1) call a php script where I verify if the member has a vote and delete all rows from the xf_poll_vote that match that user_id
2) Call or duplicate the two functions from the following file -> library/Xenforo/Model/Poll.php
call -> public function rebuildPollData($pollId)
call -> public function rebuildPollResponseCache($pollId)
3) redirect back to the thread
Is it possible to create an add-on that can call the two public functions show in step #2?
Thank you.
I'm not sure if creating an add-on is the best way to do this.
I think the following needs to happen:
1) call a php script where I verify if the member has a vote and delete all rows from the xf_poll_vote that match that user_id
2) Call or duplicate the two functions from the following file -> library/Xenforo/Model/Poll.php
call -> public function rebuildPollData($pollId)
call -> public function rebuildPollResponseCache($pollId)
3) redirect back to the thread
Is it possible to create an add-on that can call the two public functions show in step #2?
Thank you.