Double poll results/questions

Support for the IM Portal Project

Moderator: Integra Moderator

Double poll results/questions

PostAuthor: Coder » Sun Jul 08, 2007 1:09 pm

IMPortal - latest release
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?
Last edited by Coder on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Coder
Newbie
Newbie
 
Posts: 16
Likes: 0 post
Liked in: 0 post
Joined: Tue Jun 26, 2007 7:43 am
Cash on hand: 0.00
Location: Phoenix, AZ

Re: Double poll results/questions

PostAuthor: Coder » Tue Jul 10, 2007 12:23 am

I found a temporary workaround to this by moving the poll into the "footer" section of the portal, so it doesn't show up in the forum display. Everything is hunky-dory with it like that, but it means that the poll is forever relegated to the footer and must never be in the site-wide header ...

Unless, of course, you know differently, which being the case, please hit reply and give us some suggestions!!
Last edited by Coder on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Coder
Newbie
Newbie
 
Posts: 16
Likes: 0 post
Liked in: 0 post
Joined: Tue Jun 26, 2007 7:43 am
Cash on hand: 0.00
Location: Phoenix, AZ


Return to IM Portal Support Forum

Who is online

Registered users: Bing [Bot], Helter, Majestic-12 [Bot]