I agree that the poll pal can be a resource hog when figure out what to display and displaying it.
I have debated on a few routes to speed things up such as:
1. A dedicated poll feature, independant from .threads posts but with access based on groups. (I debate this about every 2 or 3 days) lol 2. Caching the poll display and results. (I started working on this but figured it was easier done with 6.0's poll pal because I have straightened a few things out so I can see what the heck I was doing... lol) 3. Add an index or two to the database to try and speed up the searches. (I have done this with some limited success in 6.0. It's not as good a search as it can be but it's better than it was) 4. Combine some information in the database to limit the number of queries. (I have done this with 6.0)
Now I think I understand your direction on this...
What would happen is that when ever a poll is posted it's information including title and options along with what board (to base access by) would be stored seperately. This dedicated pollpal data table would then need to store the post number, post date, board keyword, poll name, poll title, poll options, poll votes and total votes per poll.
addpost.php would need to store information in this new table when a poll is entered. deletepost.php would need to remove this poll. modifypost.php would need to update information related to the poll as well. Any script that I'm forgetting that can modify a post will probably need to be gone over also.
The first route and this last one would be the fastest. The last one would also add a query to all .threads scripts that deal with posts and polls as far as modifying and storing information goes. One of the things that always stops me from really embeding some IIP code into threads as far as possible is that it will require the end user to do a lot of editing.
All input on this is welcomed. I do listen. (sometimes forget but not on purpose... lol)
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.