Poll result length?

Current Version: 2.1.0
Released: 2015-10-26
Forum rules
Before creating a new support thread, please take a look at the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked
User avatar

Topic author
Jupiter
Active Member
Posts: 21
Joined: 11. June 2008 18:27

Poll result length?

Post by Jupiter »

Your Portal Version: 2.1.0b1
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Basic Knowledge
Boardlink: http://www.gopherpucklive.com/forum/portal

What have you done before the problem was there?
Nothing

What have you already tryed to solve the problem?
No

Description and Message
I am wondering if I can get the CENTER POLL results to be longer? They have always been short compared to the main forum poll.

You can see what I mean here:
Portal Poll: http://www.gopherpucklive.com/forum/portal
Forum Poll: http://www.gopherpucklive.com/forum/vie ... 13&t=12715

You can see in the Forum that they results are more "pronounced". How can I get that in the portal poll?
User avatar

talonos
Portal Specialist
Posts: 241
Joined: 7. June 2009 15:12
phpBB.com User: talonos

Re: Poll result length?

Post by talonos »

if your running the newest version of board3 portal then you can set the poll as a "Top" or "Bottom" block which would make it full width of portal. full width on "center" is not possible.
Creating board3 website? check the sites out below for board3 compatible extensions
Talonos: Pretereo stormrage EU OFFLINE!
User avatar

Topic author
Jupiter
Active Member
Posts: 21
Joined: 11. June 2008 18:27

Re: Poll result length?

Post by Jupiter »

No... That's not what I mean. I mean the actual length of the poll results. The bars are so short on portal compared to the forum.
User avatar

talonos
Portal Specialist
Posts: 241
Joined: 7. June 2009 15:12
phpBB.com User: talonos

Re: Poll result length?

Post by talonos »

ahh ok so i've just looked at the coding quickly and i can see the difference.

Forum html shows

Code: Select all

<dd class="resultbar hidden" style="display: block;"><div style="width:100%;" class="pollbar1">31</div></dd>
<div class="pollbar1" style="width:100%;">31</div>
</dd>
and the portal html shows

Code: Select all

<dd class="resultbar"><div style="width:17%;" class="pollbar1">31</div></dd>
so from the looks of that it could be a coding error inside of your portal theme OR CSS error. that might give you an idea where to look. i'd have a look if i had more time but currently streched.
Creating board3 website? check the sites out below for board3 compatible extensions
Talonos: Pretereo stormrage EU OFFLINE!
User avatar

Topic author
Jupiter
Active Member
Posts: 21
Joined: 11. June 2008 18:27

Re: Poll result length?

Post by Jupiter »

You put me on the right track. It was in the poll.php module file.

I found this: $option_pct_txt = sprintf("%.1d%%", round($option_pct * 100));
and change it to this: $option_pct_txt = sprintf("%.1d%%", round($option_pct * 500));

Now the poll results fill the space much better.
User avatar

talonos
Portal Specialist
Posts: 241
Joined: 7. June 2009 15:12
phpBB.com User: talonos

Re: Poll result length?

Post by talonos »

ok so looks like you might have found a coding error, good to see you got it working correctly now :)
Creating board3 website? check the sites out below for board3 compatible extensions
Talonos: Pretereo stormrage EU OFFLINE!
User avatar

Topic author
Jupiter
Active Member
Posts: 21
Joined: 11. June 2008 18:27

Re: Poll result length?

Post by Jupiter »

I don't even know if that IS the error. In the forum is is coded at * 100 too.... But I needed to alter it to * 500 to get it to work on the portal poll. Strange.
User avatar

talonos
Portal Specialist
Posts: 241
Joined: 7. June 2009 15:12
phpBB.com User: talonos

Re: Poll result length?

Post by talonos »

ok so its a temp fix. i'll look over it when i have more time.
Creating board3 website? check the sites out below for board3 compatible extensions
Talonos: Pretereo stormrage EU OFFLINE!
User avatar

Topic author
Jupiter
Active Member
Posts: 21
Joined: 11. June 2008 18:27

Re: Poll result length?

Post by Jupiter »

Spoke too soon.... It fixed the bar length, but messed up the % amount. So back to the drawing board.
User avatar

Kirk
Dev
Posts: 1937
Joined: 27. July 2010 18:02
phpBB.de User: Kirk
Contact:

Re: Poll result length?

Post by Kirk »

Hi
The Poll lenght is in the root/ext/board3/portal/modules/poll.php defined:

Code: Select all

$option_pct_txt = sprintf("%.1d%%", round($option_pct * 100));
100 = 100%
Gruß Udo
Locked

Return to “Board3 Portal 2.1.x - English Support”