Categories
Development

Adding a Row to a Google Docs Spreadsheet

I create a lot of web forms and like to share the data with those whom the form was created for. And while I was brushing my teeth the other morning I thought why not dump it straight to a Google Docs Spreadsheet, since most of the people I do this for are very familiar with working with a spreadsheet anyway.

Thanks to the Google Data Spreadsheets API this and many other features are possible. The site is well documented and the Zend Framework PHP client is a huge help. Luckily someone else had tried the same thing and documented it on his blog, so check that out as that was a tremendous help for me figuring out just how to do this.

Categories
Development

YouTube API updated

YouTubeThe folks at Google have added some very cool features to the YouTube API. They now offer the ability to upload and make other write calls using the API. So now it’d be possible to have users make comments or even upload their own videos without leaving your site. This is very cool and I can already think of a few things I’d like to try out with this.

It looks like they’re also offering a Javascript API that allows you to control the player via javascript. Along with that they’re also offering a chromeless player too. So now you can make custom controls for embedded YouTube videos. I can’t wait to get started with these features. A custom player can really make the movies work better with someone’s site.

The PHP Client Library (Zend Framework 1.50RC2) was also updated today too.

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

Categories
Development

Site Redesign

Decided to redesign the this site. I tend to lean towards dark colors with my personal stuff, but decided to try using some brighter colors for a change. So I picked some colors from a favorite t-shirt I used to wear back when I went to Belhaven. It’s still a work in progress, but I figured it was close enough to begin switching over.

I’m using the Zend Framework to interact with the YouTube Data API. It’s really awesome to work with if you’re a PHP developer and I’ve been relying on Zend a lot recently in many of the newer projects I’ve been working on. If you notice anything that seems broken or out of place please let me know as there’s still plenty of stuff I’ve got to finish up.