Categories
Development

Rating System Added

I just developed a rating system to go along with my blog entries. Currently I’ve just included it with video game review, but it can apply for any type of posting. I used the Word Press Custom Field to store the rating. I created a custom field called Review and input a value of 0-5 as the rating via the post admin. That stores the rating with the post.

The following PHP code checks if a post contains a rating and if so, displays it:

if (get_post_meta($post->ID, "Review", true)) {
<div class="star-rating">
<p class="current-rating" style="width: echo (get_post_meta($post->ID, "Review", true) * 20); %;">Currently echo get_post_meta($post->ID, "Review", true); /5 Stars.</p>
</div>
}

Here’s more info about the get_post_meta function().

So it ends up outputting:

<div class="star-rating">
<p class="current-rating" style="width:80%;">Currently 4/5 Stars.</p>
</div>

Here is the CSS that styles it, right now I’m just using some standard stars I found elsewhere, but will probably change it to something else.

#yui-main .post .star-rating ul {
margin: 0;
padding: 0;
}
#yui-main .post .star-rating ul li {
list-style: none;
}

.star-rating,
.star-rating .current-rating {
background: url(/images/star.gif) left -1000px repeat-x;
}
.star-rating {
position:relative;
width:125px;
height:25px;
overflow:hidden;
list-style:none;
margin:0;
padding:0;
background-position: left top;
}
#yui-main .post .star-rating p {
display: inline;
margin: 0;
padding: 0;
text-indent: -9999px;
}
.star-rating .current-rating {
z-index:1;
position:absolute;
top:0;
left:0;
text-indent:-1000em;
height:25px;
line-height:25px;
outline:none;
overflow:hidden;
border: none;
background-position: left center;
}

And that’s it, a simple rating system by using the built in Custom Fields and a little PHP scripting and some CSS.

Categories
Adventure

Guessed My Change

PennyMy Commerce piggy bank was full and that meant that it was time to pay Penny a visit. Penny is the girl who lives inside the coin counting machine at Commerce bank and when I visit here from time to time she challenges me to guess within $1.99 how much change I have brought to her. It sounds easy to guess within $1.99, but trust me it’s a most difficult challenge.

I’ve come very close on multiple changes, but I just sensed that something would be different this time. After pressing go, the challenge began. After weighing the bank in my right hand one last time, my guess was $58.63. Now Penny’s counting would begin.

To my delight she congratulated me on my guess as the total was $57.17, which in fact is within the $1.99 range that was necessary to claim victory. I took my receipt and headed to the teller, eager in anticipation of what glorious prize awaited me.

With an ear to ear grin I presented the receipt to the teller. He immediately congratulated me on my excellent guess work. Then presented me with a Commerce coin bank. Actually an identical Commerce coin bank as the one that I had walked in there with. I was a bit stunned, another coin bank? Not even a t-shirt? I felt a bit ripped off, and took several lollipops and a pen just to feel as though I walked away with something for my hard work.

Categories
Sports

Upcoming Dodgeball Tournament

The first annual Mercer Madness Dodgeball Tournament takes place on April 12th. It Sounds really cool, and I’m in the process of trying to form a team. If you’re interested in playing some dodgeball on April 12th or have some questions about it, please leave a comment or contact me some other way.

Here’s the basic rules, more info can be found at their site, http://www.thendl.com/affiliates/mercer-madness/

Number of Balls:
Six red rubber balls: two stingers 5″ and four 8.5″ blockers.

Number of Players:
There may be 6 players on court, 10 per team.

Court size
The Courts are approximately 60′ X 30′

They’re also offering hair braiding and face painting if that interests you as well.

Categories
Video Games

Professor Layton and the Curious Village

Professor Layton and the Curious VillageIf you enjoy challenging puzzles, then you must try Professor Layton and the Curious Village on the DS. The game is a series of over 120 puzzles set in an adventure style game. Many of theses puzzles are difficult, very difficult.

The European art style is reminiscent from old European cartoons from the 70’s and early 80’s. It works really well for the theme. Very cool, you get better at solving the various puzzles as you play through. Though I still am terrible at the ones where you have to decide who’s telling the truth, seem to better at the one’s involving shapes or math.

Categories
Development

Adobe AIR

Adobe AIRStarted fooling around with Adobe AIR a bit. Here’s the description of what it is from Adobe: a cross-operating system runtime that allows you to leverage your existing web development skills (Adobe® Flash® CS3 Professional, Adobe® Flexâ„¢, HTML, JavaScript®, Ajax) to build and deploy Rich Internet Applications (RIAs) to the desktop. AIR enables you to work in familiar environments, to leverage the tools and approaches you find most comfortable, and by supporting Flash, Flex, HTML, JavaScript, and Ajax, to build the best possible experience that meets your needs.

To sum it up, it allows web developers to write desktop applications using the skills they already know. So that’s really cool. The AIR Developer Center has a ton of useful info.

Categories
Development

YUI 2.5.0 Released

The cool developers at Yahoo! just released version 2.5.0 of the Yahoo User Interface. They’ve added six new components:

There’s also major improvements to DataTable Control and the Slider Control.

This looks to be a very cool release, can’t wait to see what I can hack together with these new components.