Motivation: We're using 1click voting on a site where we want to have different output returned after casting a vote depending on whether you voted from a page view or a teaser view of a selection node.
Currently we don't pass the $page parameter when rendering the 1 click voting results. With the recently themeable selection_decisions_1click_controls() we can edit the $links but we don't get the $page parameter so when overriding that function we have to guess using menu_get_object or similar.
Instead, we could pass $page from decisions_selection_voting_form() to selection_decisions_1click_controls() and add a query string like page=1, and then look for it in selection_vote() and pass $page when we currently do print theme('selection_decisions_view_results', $node, FALSE, FALSE, $new_vote);
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 21004226.patch | 2.44 KB | ezra-g |
Comments
Comment #1
ezra-g commentedThis patch turned out to be smaller than I imagined.
Comment #2
ezra-g commentedI removed the unnecessary $page = 1 and this is now committed.
Comment #3
ezra-g commentedThis was missing some parameters in hook_theme, but I have corrected that omission.