linein designs

07 Apr, 2009

Masters Practice Round 2009 Surprise

Posted by: john In: flickr|pictures

My brother bought us practice round tickets this year to the Masters golf tournament in Augusta GA. Only living 30 minutes away, it’s surprising this was my first time going. Any how the day was good, we’d seen the course and were about to head home when we notice a large group around the putting green so we walk over to check out what was going on.

Tiger Woods is what was going on! Very cool – got to see him in person only about 5 feet in front of where we were standing.

View all Masters practice rounds pictures

This one about drove me crazy all night trying to think of why this does not work and to be honest I still don’t understand why it doesn’t. But below is a solution to the problem.

The problem was I was trying to close a popup and force the parent page to load a URL using onload.

So within the popup, I saved the form changes to the database and if everything was saved fine it would return to the popup with the code below.

< body onload="window.opener.location = '/directory/?action=confirmation'; window.close();">

But for some reason this would cause IE7 (didn’t check any version below 7 and worked fine in Firefox & Chrome) to just load and load and load but never actually load the page it was sent to. The big blue “e” would just spin. The URL was correct and it wasn’t stuck in some endless loop. But like I said, I’m still not sure what caused it to do that, but below is the solution that seemed to have worked.

Rather than placing the close and redirect in the onload, I simply added them within a script tag and placed it above all the other scripts.


My only guess is that by putting the code in the onload was causing it to not fully run the redirect. Anyway, I hope this helps someone else out there.

Please let me know if you know the reason what caused this error.

26 Feb, 2009

PHP Font Preview Function (text to image)

Posted by: john In: php|programing

For work we needed a way to allow the customer to preview what their Bible imprint text would look like before they placed their order. I’m sure there are ways to do this with JavaScript, but we chose to do this with PHP to prevent the site from relying on Javascript (there was already enough on the page).

View Demo
Download files (32 KB)

function text2image($text,$text_type)
{
	$text = ereg_replace("[^A-Za-z0-9 -]", "", $text); // change to allow whatever characters you made images for
	$length = strlen($text); // finds number of characters
	for($b=0; $b<$length; $b++) // loops through each character to convert to image
	{
		$text_type_function = $text_type; // resets font type each time
		if($text_type_function == 'sc') // script font type
		{
			if(ctype_upper($text[$b])){$text_type_function = 'sc_u';} // changes text type to upper
			elseif(is_numeric($text[$b])){$text_type_function = 'sc';} // checks for number (not really used in this function yet)
			if($text[$b] == ' '){$word .= '  ';} // could change to be blank image, but text spaces seem easier
			else
			{
				$image_word .= '';
			}
		}
		else // else block type
		{
			if(ctype_upper($text[$b])){$text_type_function = 'bm_u';}
			elseif(is_numeric($text[$b])){$text_type_function = 'bm';}
			$text[$b] = strtolower($text[$b]);
			if($text[$b] == ' '){$word .= '  ';}
			else
			{
				$image_word .= '';
			}
		}
	}
	return $image_word;
}

// useage
$text = 'Preview this font please';
echo text2image($text,'sc');

The above function works for the two fonts included in the zip file, but to add more, just create an image of all the letters and add another elseif statement to the function.

If you have any questions or need any help with adding more fonts, please either use the contact form or leave a comment below.

Tags:

13 Feb, 2009

Never Argue with a Woman

Posted by: john In: funny

One morning, the husband returns the boat to their lakeside cottage after several hours of fishing and decides to take a nap. Although not familiar with the lake, the wife decides to take the boat out. She motors out a short distance, anchors, puts her feet up, and begins to read her book.
Read the rest of this entry »

Tags:

12 Feb, 2009

9 Words Women Use (and Men Need to Know)

Posted by: john In: funny

1) Fine

This is the word women use to end an argument when they are right and you need to shut up.

2) Five Minutes

If she is getting dressed, this means a half an hour. Five minutes is only five minutes if you have just been given five more minutes to watch the game before helping around the house.

Read the rest of this entry »

Tags:

transfer_images

The other day we ran into a good problem that our site has grown and we are in need of a new server. So we ordered the server and now we need to transfer all the files from the old server to the new one. But rather than downloading all the files to our local machines then re-cuploading them to the new server, we’re going to show you how you can skip the middle man and transfer files from server to server.

The only requirements is that you need to have SSH access to both servers.

We’re going to be using the Linux command scp which stands for secure copy. (see http://linux.about.com/od/commands/l/blcmdl1_scp.htm for a complete listing of all the available options for scp)

We’re going to be using the following options:

  • r = recursively copy entire directories
  • C = compression enable
  • p = preserves modification times, access times, and modes from the original file
// To transfer all the files in the httpdocs directory to a folder on the remote machine
scp -rpC /var/www/httpdocs/* remote_user@remote_domain.com:/var/www/httpdocs

// Transfer only PHP files
scp -rpC /var/www/httpdocs/*.php remote_user@remote_domain.com:/var/www/httpdocs

Also, if you’re going to transfer a lot of data between the webservers, you probably want to add the nohup command too. nohup runs a command even if the session is disconnected or the user logs out. Another bit you can add is trailing ampersand (&) to the end the command to launch it in the background and get your command prompt back right away.

nohup scp -rpC /var/www/httpdocs/* remote_user@remote_domain.com:/var/www/httpdocs &

Hope this helps someone as much as it did me today. :)

This great tip came from Wes Widner of werxltd.com.

A while back we wrote an article on how to fade images in and out from a single directory using jQuery and another plugin, but today we’re going to add…actually we’re going to totally redo the way we did it in the past. The new way should leave a much smaller footprint.

View Demo
Read the rest of this entry »

17 Jan, 2009

Free Dog Screen Savers

Posted by: john In: animals|dogs

Due to popular demand, below is a list of a handful of free dog screen savers. Please check them out and leave a comment if you like one better than the other.

C`mon And Swim

ss_cmon_swim

Features:

  • This scuba diving pup invites you in, the water`s fine. Easy install. Plays the complete song by Bobby Freeman while bubbles float.

Download C`mon And Swim Screensaver (986 KB exe)

Read the rest of this entry »

I noticed in the pew there was a prayer request card already filled out, so I got it out and took a quick look at to find this:

prayer request

Please pray for:
Johnny because he got a big nose

Reason for request:
He need help with his nose

Please help
thank you

Kids are so honest. :)

30 Dec, 2008

Christmas Cards from My Daughter

Posted by: john In: funny|pictures

Out of all the gifts I received this Christmas, none touched my heart as much as the cards given to me from my 7 year old daughter Makenzy. I remember my parents telling me when I was younger all they wanted for Christmas was for me to make them something. Now I understand why they said that.

Below are the cards that she made for me this year. Hope you all had a great Christmas and a happy new year.

Merry Christmas Daddy
Read the rest of this entry »



Please Support Our Friends

Send emails with ease on this SMTP server by JangoSmtp.com.

Banner

About

My name is John Veldboom and have been in design and web programing for just over 8 years now. Started off as a hobby in high school but it has developed into a full time job now. I always tell people that if I wasn't doing this at work each day, I would be at home doing it for free. I love it!

Please visit the contact page to drop me a message.