We offer outstanding professional Joomla!TM extensions.

Professional Joomla! Extensions

Professional Joomla! Extensions

Forum Blogomunity Joomla Extensions p8pBB bridge Styles Poll bug ?

Member Login



Community Builder

This module is for demo of CB integration.





Forgot login?
No account yet? Register

Latest Forum Activity

Poll bug ?

Everything about customizing and using phpBB styles (templates).
Forum rules
This forum is not for any support questions/issues/features. Please use Support Center for such requests.
2 posts • Page 1 of 1

Poll bug ?

Postby am123 » May 18th, 2009, 6:17 am

Try to create poll with options !

Almost all work fine but in jsubsilver2 template bg image of results bar got height 3000 and width 250 !

So i look in template details and see that images height is from function:

'POLL_OPTION_IMG' => $user->img('poll_center', $option_pct_txt, round($option_pct * 250)),

So i little remodifing template ( like in jprosilver where bar is ok ) and recreate:

jsubsilver2/template/viewtopic_body.html

old
Code: Select all
<td dir="ltr">{POLL_LEFT_CAP_IMG}{poll_option.POLL_OPTION_IMG}{POLL_RIGHT_CAP_IMG}</td>


new
Code: Select all
<td class="phpbb_<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->">&nbsp;</td>


also add new images ( for every state of results like 20%, 40%, 60%, 80% and 100% )
in
jsubsilver2/theme/images/poll_center.gif
jsubsilver2/theme/images/poll_center2.gif
jsubsilver2/theme/images/poll_center4.gif
jsubsilver2/theme/images/poll_center6.gif
jsubsilver2/theme/images/poll_center8.gif

also add new classes for showing that in
jsubsilver2/theme/stylesheet.css

Code: Select all
.phpbb_pollbar1 {
   background-image: url('/./images/poll_center2.gif');
   background-repeat:no-repeat;
   width:42px;
}

.phpbb_pollbar2 {
   background-image: url('/./images/poll_center4.gif');
   background-repeat:no-repeat;
   width:84px;
}

.phpbb_pollbar3 {
   background-image: url('/./images/poll_center6.gif');
   background-repeat:no-repeat;
   width:126px;
}

.phpbb_pollbar4 {
   background-image: url('/./images/poll_center8.gif');
   background-repeat:no-repeat;
   width:168px;
}

.phpbb_pollbar5 {
   background-image: url('/./images/poll_center.gif');
   background-repeat:no-repeat;
   width:210px;
}


Now i got appropriate image for the actual number of votes !

( sorry by broken english ) :D
Image
am123
Newbie
Newbie
 
Posts: 18
Joined: March 22nd, 2009, 9:15 am
Name: Adam

Re: Poll bug ?

Postby Admin » May 18th, 2009, 1:31 pm

Realy an issue!
Seems better remove
Code: Select all
height:auto;

from stylesheet.css around line 17:

Code: Select all
#phpbb_area * {
   /* Reset browsers default margin, padding and font sizes */
   margin: 0;
   padding: 0;
   border:0;
   /*height:auto;*/
   list-style:none;
}
Let he without sin throw the first stone.
User avatar
Admin
Site Admin
Site Admin
 
Posts: 904
Joined: October 21st, 2008, 5:39 pm
Location: index.php
Name: Administrator
Browser: Chrome


2 posts • Page 1 of 1

Return to Styles

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests

 
Copyright © 2008-2012 Blogomunity.com
Trademarks and tradenames used herein are the property of their respective holders.
The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries. Blogomunity is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.