Adding the WP-Polls Plugin

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3 out of 5)
Loading ... Loading ...

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).

Poll Section Differences

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.

Poll Section Differences

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.

    Adding the WP-PostRatings Plugin

    1 Star2 Stars3 Stars4 Stars5 Stars (9 votes, average: 4.56 out of 5)
    Loading ... Loading ...

    Well, I finally got the WP-PostRatings plugin (the little star ratings above this text) working the way I wanted it to. Who would have thought simply wanting to get it to show up in the location where it is now would turn into a major pain in the ass. I guess it would probably help if I wasn’t learning PHP and WordPress tags and functions at the same time.

    I made the following modifications to the plugin:

         ** Change the layout of the ratings image and text from the default.

         ** Modify the various tooltips to show different information.

         ** Add new styles to the style sheet to match the current theme.

         ** Modify the default star image files so they are a hair smaller. I stumbled across a nice feature when doing this one. I didn’t want to get rid of the default images so I placed the modified image files in a new folder in the "images" directory. At this point I was about to start writing a bunch of If-Then statements to have it switch which images it was using based on the theme name. For some reason I went to the Ratings Options page beforehand (no real need to since I already had it set up the way I wanted it) and what do you know…it picked up the new folder and made it another option to select. So no coding on that one like I figured I’d have to do.

         ** Add in code so that it will always check to see what the name of the current theme is and if it’s not a specific one then it reverts back to the original code. This will be handy so that when I create my own theme later on I just have to add a couple new items to the style sheet and throw in a new section for the If-Then statements that are checking the theme name. Since I tend to bounce between a couple themes for a while until I settle on a final one this will save me from having to constantly comment / uncomment things in the plugin files.

         ** I wanted to modify the tooltips on items where you had already voted to say "You gave this post a rating of X". After getting the code working though I realized that the cookies (which is where I was pulling it from) only get a "1" passed to them no matter what the actual rating value was. I was already ready to be done with editing this thing so I decided to pass on modifying what gets written to the cookies. Might go back someday and make this change, but I doubt it.

    Note On Compatibility: I’ve done testing and it does appear to work fine on IE6, IE7 and Firefox. For some reason though, Opera always shows the "Loading" image from the moment the page is displayed. Oh well. I don’t use or even like Opera, so I’m not going to bother with trying to fix it for the one jackass that feels the need to be different by using that browser.

    Resume Your Delving

    1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...

    Well, my last post was in October 2005 so obviously I took the whole “no more episodic updates” thing to a whole different level than originally intended. Anyway, I’m finally back and hopefully I’ll stick around for a while this time, but don’t hold your breath.

    I’m in the process of migrating from HostMySite.com (great hosting but didn’t need all the features I was paying for) to DreamHost.com (holding my review for later as I joined during the power outage issues and it’s currently a mess). In the process I’ve gone ahead and gotten the blog it’s own domain because it was a good kid and deserved a treat. So on the off chance that you were so pathetic as to have bookmarked the old blog.fallenblossom.com address then you should switch it to point to the new address…www.delveintolunacy.com. The old site will still be up for a while while I’m getting things configured on the DreamHost side, but once I migrate the FallenBlossom domain it will vanish.

    Anyway, I could post tons of stuff regarding what has occurred since the last time I wrote, but I’ll spare you the boredom. If something that previously occurred ends up getting me up in arms again I’ll write something about it then. So for now I’m just working on getting the site setup like I want it. I’m currently using the Thirteen theme which I really like but not sure I’m not sure that I’ll stick with it. Even if I do, there are still a lot of things I want to change/add. If you can think of anything you would like to see added to the site or changed leave a comment and I’ll take it into consideration.

    No More Episodic Updates

    1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...

    As you might have noticed I haven’t posted recently. Prior to stopping I was mainly only doing updates for episodes of reality shows and the Chiefs games and it was just too much. Plus, the newness of the blog wore off and I got bored and went back to my real passion…masturbation. So anyway, I’m no longer doing the episodic updates unless something happens that really chaps my ass and I just have to rant. I’ll try doing other types of posts more often however.

    As a treat for all those that wake up each morning eagerly looking forward to not reading this blog I’ll give a quick update on the things I had been covering. No need to thank me, I know you don’t really appreciate it.

    The Amazing Race: Family Edition
    This season is worse than even I expected and for once I seem to be in the majority when it comes to bitching about something since all the TV writers are tearing this season a new one. The only good part of the show so far has been that the only African-American family on the show actually has the last name of Black and the immigrant Italian family that: live in New York City, have a husband in waste management and have a last name that is pronounced the same as a slang term for bribery. Excellent casting job TAR although I’m sure you could have fit a few more stereotypes into the line up had you really tried.

    I also love how much material the Weavers, a team consisting of a widow and her three hood-rat children, give me with which to feed my endless hatred of them. This lady is trying to learn leadership by racing with her kids and in the first episode she nearly orphaned them by getting run over by an Amish buggy. That one really tickled my sadistic side since she’s a widow due to her husband walking onto a NASCAR track in the middle of a race three months before this show started filming. Oh how I love thee, sweet irony. Next week they get to do a challenge at a NASCAR track and it looks like the kids break down….should be a good show.

    Survivor: Guatemala
    So far it’s a pretty boring season as there isn’t any real drama yet. Even the abnormal team shuffle didn’t stir things up. Oh well, it’s still Survivor so it’s all good.

    The Chiefs
    Jesus Christ on a cracker this season is looking bad. I already thought the first two games were fluke wins and the last two games just seem to back that up. If you think any aspect of this team, from coaching on down, is looking good so far please leave a comment with your address so I can come over and extricate your head from your ass.

    Big Brother 6 - 9/20/05

    1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...

    Well, that’s a wrap on another season and as much as I quit caring as soon as it was down to the final two I have to say I’m already missing it. I wish they would get rid of the audience for the finales but that seems to be the new black for reality shows so I doubt I’ll ever get that wish granted. Even with the audience there it was still much better than last year’s finale as far as production values go.

    I thought it was really surprising how blatantly they had Julie try to get it across to the Friendship as to how disliked they were. I was expecting them to go the gumdrop smile route and acting like the season turned out wonderfully. So at least some of the drama that I was hoping for ended up being there.

    As usual the Friendship folks were their usual selves. Eric acted like an ass the one time he got to talk as expected. Maggie acted like she had just witnessed someone stabbing a baby when Howie made his comments. Beau was flabbergasted that anyone could accuse Ivette of ever acting without integrity despite the people from his own group agreeing with the comments. April never could shut up and yet again her comments came back to bite her in the ass and her back-peddling just dug the hole deeper. Jen was in uber-bitch mode and actually took it to levels that I didn’t think she could possibly take it too.

    Speaking of Jen, she was the one that was a huge fan of BB and brought April along with her when they needed to bring a partner. She always talked about how she was a good strategist and knew how to play the game. However, with the way she acted last night it was apparent she didn’t play the game with the slightest bit of strategy and instead really did just view it as a summer camp where she could try to be the popular kid. I especially liked her comments after Kayser said he wished she could think for herself. Immediately she replied with “I can think for myself”. At that point Julie started talking to send the show to commercials, but Jen kept yammering in the background and said “My team were the ones that decided to get rid of you.” Apparently she doesn’t realize the meaning of “think for yourself” since she admitted that she just followed what the team said to do.

    I can’t finish off my posting on this season without a final rant about Ivette so here goes. Was it possible for Ivette to have been more of a sore loser immediately after Maggie was named the winner? They pulled the key and as soon as she saw Maggie’s name she got all frowny and stood up and started to walk off. Had Maggie not ran over to her and given her a hug I think she might have just walked right out of the house before she was supposed to. Then once they were out in the studio she kept acting the same way. I know it’s got to suck making it that far and then losing but she should have expected it. It was her friend that won yet it looked like she wouldn’t have even congratulated her if she hadn’t been forced to. What a self-centered bitch.

    Wow, hopefully the family version of The Amazing Race starting next week is as awful as I’m expecting it to be or I won’t have much to bitch about now that BB is over with.

    « Previous entries · Next entries »