Dear IE users, I am working on fixing the minor design problems with the header elements, sorry! - Ryan
Ryan Coughlin - Web and Graphic Designer
My name is Ryan Coughlin and I am a Web and Graphic Designer. Its what I love to do.

Around in Europe

Wanted to write a quick post while overseas. Just wanted to say that sorry for the delay in posts recently. I have been away in Europe the past couple of weeks. I started in England and then headed for the Greek islands. Its a blast here, a great way to end the year and start the summer. I have been taking a bunch of photos and will be sure to upload them to flickr and post up the link. Wish I brought my laptop with me to upload and see what I got for shots so far.

I will be back on the 4th and back to reality, catching up on the site work that I have in store for me, along with the many blog posts I have as drafts right now. I have been slacking on that. Also, working on finishing the new layout for my site. Giant to do list, but I hope I can get it all done and get caught up. Cheers

Spread the love:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Mixx
  • Google Bookmarks
  • E-mail this story to a friend!
  • Reddit
  • Design Float
  • StumbleUpon
  • Technorati

Installing Ruby on Rails Plugins via MediaTemple

Good Morning and Happy Mothers Day!

I have been running Ruby on Rails on my Mac, playing around with applications, getting familiar with the framework. I recently started a Ruby on Rails project for a client and I told the client to switch over to MediaTemple, the best decision ever made. All of the controls and support are amazing. I was trying to run this command to install Restful Authentication:

./script/plugin install git://github.com/technoweenie/restful-authentication.git

The main issue to make sure to be aware of is to change to your containers directory using this via Terminal:

cd $HOME/../../containers

If you do run:

ls

You should now see a listing of any containers you have purchased in my case mine returns:

rails

Change directories for you are inside your rails application and now run:

./script/plugin install git://github.com/technoweenie/restful-authentication.git

You should be golden! Hope this helps out some people with any issues they may have. I should also add in that the command will generate your controllers/models, best of luck!

./script/generate authenticated user sessions
Spread the love:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Mixx
  • Google Bookmarks
  • E-mail this story to a friend!
  • Reddit
  • Design Float
  • StumbleUpon
  • Technorati

How to load data using JSON/PHP using jQuery

I have seen a good amount of people wanting to see learn how to load data on their website using jQuery, JSON, and PHP. I thought I would show a simple example that should give you a jump start to your project.

We are going to use $.getJSON() function, you have something like:

		$.getJSON("readJSON.php",function(data){
			$.each(data.posts, function(i,post){
				content = '<div id="post-'+ post.id +'">\n';
				content += '<h3>' + post.author + '</h3>\n';
				content += '<p class="small quiet">' + post.date_added + '</p>\n';
				content += '<p>' + post.post_content + '</p>';
				content += '<hr/>';
				$("#contents").append(content).fadeIn("slow");		
			});
		});

And example of JSON from the PHP page could look like:

{ posts: [{"id":"151","date_added":"2009-05-05 13:40:34","post_content":"This is a test post. jQuery!","author":"Ryan"},
{"id":"152","date_added":"2009-05-05 13:40:55","post_content":"Hey, you got to love Ajax","author":"John"}] }

That JSON above loads two records that will be displayed on to the page. An example PHP could look like:

The results are being pulled from a MySQL database with tables: id, author, post_content, date_added, and author.

I am going to wrap up and article on the jQuery/PHP/JSON comment form with the results loaded on to the page after form submission, stay tuned for a much more in depth explanation of using JSON with PHP and jQuery.

Spread the love:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Mixx
  • Google Bookmarks
  • E-mail this story to a friend!
  • Reddit
  • Design Float
  • StumbleUpon
  • Technorati

Time for another iGoogle theme?

So i came across my old iGoogle theme I made in the fall and was thinking of making another one. Shockingly, they’re extremely easy to create. Its a large XML document.  I have been working on a new layout for my site. I was thinking of another landscape but similar to the landscape, but different style.
Summer Landscape - iGoogle Theme

I am trying to free my schedule from client work to start working on the new layout, stil need to work on the move right text, bottom posts boxes, colors, and what the single page is going to look like, all in all its a work in progress. Almost done with a jQuery tutorial on submitting a  comment form and having the results loaded using jQuery/Ajax. The comments on the page are loading using PHP, JSON, and jQuery, very slick. Expect that very soon.

Spread the love:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Mixx
  • Google Bookmarks
  • E-mail this story to a friend!
  • Reddit
  • Design Float
  • StumbleUpon
  • Technorati

How to use jQuery to Serialize Ajax Forms

When I first started working with jQuery and submitting forms via Ajax, I’ve never really used .serialize() and wasn’t too familiar with it. I started to look in to how it works and what it can do. It can be a huge time saver, especially for larger forms.

Instead of declaring all of your data to be sent using something like:

	var fname     = $('#fname').attr('value');
	var lname     = $('#lname').attr('value');
	$.ajax({
	     data: “fname=+ fname +&amp; lname=+ lname,
	});

For a couple of fields above, that is fine, but what if you were creating a form with a large amount of fields. The last thing you would want to do is want to copy/paste that line 20 times for your field. Instead of grabbing each value of each form field we can use jQuery’s .serialize() to do the dirty work for us, which is a huge time saver. We can use something like:

	$(function() {
	     $('form').bind('submit',function() { showValues(); return false; });
        });
        function showValues() {
	     var str = $("form").serialize();
	     $(".results-box").fadeIn();
             $(".results").text(str);
	}

The first section binds the submit to a function. When a user submits the form call the function showValues(), the next bit. We grab the form and attach .serialize() to it. We want to serialize all fields within this form and display what data is going to be sent to the sever. A working demo has been uploaded.

Now with our data serialized it is ready to be sent over to the server side. Using jQuery .serialize() is much more effiecient compared to retrieving the value using .val().

Spread the love:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Mixx
  • Google Bookmarks
  • E-mail this story to a friend!
  • Reddit
  • Design Float
  • StumbleUpon
  • Technorati