PhPBB - 2.0.22 (?)
Theme - Integra2
I created a poll forum and set it up in the ACP, then opened up the blocks management and set up the poll block in the portal header. All was well with the world, the poll displays perfectly on the portal page.
On going back to the forum and viewing the topic, the poll questions or poll results (depending on if you have voted or not) show up twice. Here is the poll block display:
[flash=,:3k0l9s2f]http://lotbshiva.org/poll1.jpg[/flash:3k0l9s2f]
Here is the same poll displayed from the forum:
[flash=,:3k0l9s2f]http://lotbshiva.org/poll2.jpg[/flash:3k0l9s2f]
From reading the code, the assignment of the results is done through the template class functions.
- Code: Select all
$template->assign_block_vars("poll_option", array( "POLL_OPTION_CAPTION" => $vote_info[$i]['vote_option_text'], "POLL_OPTION_RESULT" => $vote_info[$i]['vote_result'], "POLL_OPTION_PERCENT" => sprintf("%.1d%%", ($vote_percent * 100)), "POLL_OPTION_IMG" => $vote_graphic_img, "POLL_OPTION_IMG_WIDTH" => $portal_vote_graphic_length/1)
The template class then checks to see if the block is already assigned. If it is, then it appends to the previous results instead of overwriting them. This is easy to see - compare the length of the first poll result bar with the length of the one in the portal header.
I tried changing the name of the block in blocks_imp_poll.php and portal_poll_result.tpl to [assign_block_vars("ppoll_option"], and it then refused to display any results at all in the portal or in the topic!!
Any suggestions please?