Discover & Rate New Music Check out ChartVote. Promote the music you like.

Archive for August, 2006

Create square image thumbnails with PHP

Creating image thumbnails in PHP is nothing new, but I have rarely seen a function that will create a square thumbnail without distorting the image. The function below will take an image and regardless of whether its a portrait or landscape size image it will generate a square thumbnail that is not distorted.

Example



PHP Source

PHP:
  1. function createThumb($source,$dest) {
  2.  
  3.     $thumb_size = 150;
  4.  
  5.     $size = getimagesize($source);
  6.     $width = $size[0];
  7.     $height = $size[1];
  8.  
  9.     if($width> $height) {
  10.         $x = ceil(($width - $height) / 2 );
  11.         $width = $height;
  12.     } elseif($height> $width) {
  13.         $y = ceil(($height - $width) / 2);
  14.         $height = $width;
  15.     }
  16.  
  17.     $new_im = ImageCreatetruecolor($thumb_size,$thumb_size);
  18.     $im = imagecreatefromjpeg($source);
  19.     imagecopyresampled($new_im,$im,0,0,$x,$y,$thumb_size,$thumb_size,$width,$height);
  20.     imagejpeg($new_im,$dest,100);
  21.  
  22. }

Download Source
- squarethumb.zip (1KB)

Smooth Paginator v.01 Released

My friend over at the Big Trapeze has released some PHP code to genereate a very sleak web 2.0ish paginator for your web projects.

If you’re developing a Web 2.0ish webiste, you’re going to want some cool pagination to show pages with lots of items–much like Flickr uses to show pages of pictures. - www.bigtrapeze.com

Screenshots

Go check it out!

Google Apps For Your Domain Screenshots

Google released Google Apps For Your Domain which is its first move towards its online office suite. I logged into my gmail account which is hosted on my domain and found all these new options. Here are some screenshots. Enjoy!

Google Apps Screenshot 1

Google Apps Screenshot 2

Google Apps Screenshot 3

Lightbox using iFrames instead of AJAX

I've been using the Lightbox Gone Wild hack of Lightbox on Indiefy to give the user experience more of an "application" feel. I like the users focus being brought to one area and not allowing them to do anything else until the current task is done.

For those of you who don't know what Lightbox is check out the original version here for more information.

Particle tree's hack of Lightbox allows other content besides images to be put into a Lightbox, but it uses AJAX to pull the content into the box. For my purposes this is overkill because an AJAX call is loading an iFrame which results in 2 HTTP requests and for forms inside a lightbox this won't function the way I want. I want the form to act separately from the current page so the user will not be redirected when the form is submitted. To me this gives the UI a smoother feel. Here is the code section that I modified.

Code

JavaScript:
  1. // Write an iFrame instead of using an AJAX call to pull the content
  2.     loadInfo: function() {
  3.        
  4.         info = "<div id='lbContent'><center><a href='#' class='lbAction' rel='deactivate'>(x) close.</a></center><iframe frameborder='0' width='500' height='350' src='" + this.content + "'</iframe></div>";
  5.         new Insertion.Before($('lbLoadMessage'), info)
  6.         $('lightbox').className = "done";   
  7.         this.actions();   
  8.        
  9.     },

I completely removed the processInfo function since it was no longer needed. The new loadInfo function is basically the modified code from processsInfo to write an iFrame instead of using AJAX. This will still take the href from the activating link and use that as the iframe's source URL. I hope this helps!

Download Complete Source (includes demo)
lightbox-iframe.zip (15k)

NOTE: The original version of Lightbox does NOT use AJAX. This code is based off of Particle Tree's lightbox implementation which DOES use AJAX. Some people were confused by this.

Where is Noah?

I apologize for my lack of consistent posting. All of my attention has been devoted to Indiefy and making it happen. Please bare with me and know that I will be posting regularly again in the near future.

Daily Goal #10

Figure out how to keep my venus fly trap alive.

iPod style pictures with PodAPic

I found out about a neat little service called PodAPic (Pod A Pic) this week from Jeff Nunn. We have all seen the iPod commercials and billboards with the bright colored background and the blacked out figure with white iPod headphones contrasting against the figure.

With PodAPic, you can turn any photo into an iPod style photo. Just upload your photo to PodAPic and in about 3 business days you'll have your PodAPic waiting for you in your inbox in all its iPod'ish glory.

This service reminds me of the funny picture booths at amusement parks, yet obviously this is web based. This is a great novelty gift idea and I can see people buying these for their friends. An option that I would like to see is the ability to have the PodAPic photo sent back in printed form on some nice glossy paper for an extra fee, but I would imagine most consumers would probably just do this themselves on their home printer. I think this is a Great niche service, so go check it out!

Examples

Help Get the Word Out

Since Indiefy started BETA invitation signups yesterday, I have been excited by the response Indiefy has received.

We are launching Indiefy in two stages. In the first stage indiefy will only be open to artists. This will give us a chance to prime the site with music and artists. Depending on how many artists sign up in this step will determine when we launch the second and finale step which will be open to everyone, but we will still operate under a "beta" status.

If you are interested in Indiefy please tell your friends and let your favorite bands know of this new service. If you would like to do a write up on your blog about Indeify please feel free to contact me if you have any questions. Any and all exposure will help. Thank you in advance!

Email: asknoah (at) gmail (dot) com    Cell: 918.639.6326

Get Your Indiefy BETA Invite

I am happy to announce that Indiefy is now accepting requests for BETA invites. The invite will allow you to signup for a beta artist account when we launch in the very near future. Thanks for all your patience and support.

Go to Indiefy.com to signup.

What is Indiefy?

Indiefy.com is a new online venue for independent artists to sell their music online or provide it as a free download.

Unlike iTunes, artists will receive the majority of the profit when they sell a song or album. All music will be available in high quality 192khz MP3 format. Indiefy will allow unlimited CD burning for personal use and once a song has been purchased, it will always be available for download in your “Music Locker”.

http://www.findmotive.com/2006/06/16/indiefycom-coming-2006/

Unfuddle is Basecamp for Developers

Unfuddle is a secure, hosted software development environment and project management solution for small software development teams. Unfuddle has many similarities to Basecamp by 37signals, but offers more features tuned to developer's needs. These features include a Ticket system where issues can be tied to a specific version, component, and milestone of the project you are working on and also source control with Subversion. A free plan is also available, so you can give the service a try.

I have used Basecamp in the past and it got the job done, but Unfuddle makes thing much easier for developers. I have been using their service this week for Indiefy and I absolutely love it. One thing I would like to see added would be another plan option between the free plan and the compact plan. Something around 10 bucks a month for half the space of the compact plan would work great for me.

If you are a developer and you are looking for a project management solution suited for developers then I highly recommend Unfuddle.

Screenshot

RSS Feed



Recommended Sites