If you go to a site like ESPN.com, they give you a
poll, and clicking on the poll brings you back to the
same page with the poll results filled in. In PHPSlash
(even in Slashdot), you go to a separate page for
comments. If you have already voted, you get to look
at a useless poll form on the front page.
Can this be done with the current PSL implementation of
polls and blocks? Remember blocks are cached.
Maybe like this: Clicking on the "vote" button goes to
a process page, which counts the vote, calculates new
poll results, orders the poll block to reparse, and
redirects back to the previous page.
Block_render_poll::doParse() would check for whether
the user has voted, and if so, parse results instead of
the form. The result block would have a link to the
full result page, with its comments.
The problem is that blocks are not cached on a per-user
basis. So would the block never be cacheable for
this to work?
Log in to post a comment.