Adding the WP-Polls Plugin
August 13th, 2006 at 9:38 pm (Delve Into Lunacy, Projects)
· 738 views
·
·
This is driving me insane. The WP-Polls plugin works well enough but there were just a few visual things I wanted changed on it. For starters, I needed to modify the text so it appeared halfway decent. Here is what the text looked like originally and then what it looked like afterward it was fixed (also notice the "Polls" section isn’t as tall in the current version).

I had to modify two aspects of the style sheet attributes to get the text to look right. The first was adding the "Color" line. Not sure why that would smooth the text, but it did so I won’t question it. The second part was commenting out the "Width" line. I have no idea why but for some reason having this in there even after adding the "Color" line would still cause everything to look like crap. Below are the style sheet attributes that it uses.
[quickcode:noclick]*** Original Version ***
.wp-polls-ans {
width:100%;
filter: alpha(opacity=100);
-moz-opacity: 1;
opacity: 1;
}
*** Current Version ***
.wp-polls-ans {
/*width:100%;*/
color: #E5E6C2;
filter: alpha(opacity=100);
-moz-opacity: 1;
opacity: 1;
}[/quickcode]
Okay, so that fixed the text issue. However, it also created two new problems that just baffle me. The first issue is that in the original version the entire poll form (title, answers, voting button, etc) would fade out and then the results form would fade back in. However, if the "Width" setting isn’t included in the style sheet (which it can’t unless I want crappy text) then the fade in/fade out no longer occurs. I haven’t modified anything else besides that one setting so I have no clue why that would keep the Javascript from doing its thing. The Javascript never throws an error either so I know that it’s not just simply breaking it.
The second issue is that if you vote or click on the "View Results" link then you’ll notice a little "Loading" image that shows up at the bottom of the section while it’s doing it’s thing. When the image is displayed it spreads out the distance between the "Vote" button and the "Polls Archive" link. In the original version once the "Loading" image goes away the distance between those two things shrinks back up again. Again, if the "Width" setting isn’t in the style sheet then it breaks and the extra distance that got added when the "Loading" image appeared never vanishes. The images below illustrate what I’m talking about in terms of the distance thing.

I’m sure both the gap and the broken fade feature are tied together but why having the "Width" setting there would make a difference is beyond me. Oh well, I’d rather have decent looking text so I’ll just live with those two problems. The last issue is another one that I just can’t seem to figure out. Why the hell is there a white box showing up around the radio buttons? In Firefox it doesn’t appear but it does in IE. I’ve done all types of searches on the internet and can’t seem to find anything referencing this issue. Below is the code which doesn’t seem to have anything abnormal in it as far as I can tell.
[quickcode:noclick]
[/quickcode]
The things enclosed in %’s are variables that the plugin later replaces when the page is loaded. The remainder of the code remains unchanged. I’m clueless on how to fix it since the "Radio" input type doesn’t accept style settings by what I can tell.
I give up. The basic functionality at least works. So unless someone knows of a way to resolve these three issues I’ll just consider this particular plugin integration finished. I was really hoping to get it set up like with the post ratings plugin so that it could automatically switch it’s setup based on the theme name. It’s so heavily modifiable from within the WP Admin area (which is a plus) that I just don’t think it would be worth the effort.






