13 Dec 2008

10

Web Design Trend: Hand-Drawn Style

There are plenty of trends in web design, from wooden, to large background, and to barely there. One though that has been growing especially in 2008 is the hand-drawn style. This, ‘sketchy’ style is used on many websites, but still provides an original touch to any design.

In this post I’ve collected a few of the greater hand-drawn designs on the web today, as well as resources and a few tips on how you can achieve this style for yourself.

08 Dec 2008

11

Are SEO consultants worth the money?

When I started my website I wanted it too be big. Who doesn’t? I started reading up on how to market my website, and found the power of an SEO consultant. An SEO consultant is a professional that comes in, and optimizes your website for maximum usability and search engine friendliness. Needless to say, this can save you a ton of time and gain you a lot of visitors.

Because of lacking funds, I started doing some web marketing for my website by myself. I decided I’d get a good start at least, and pay for an SEO specialist later.

I soon realized I wouldn’t need that specialist though. After studying SEO for only a month, I had cut my own search engine ranking down by more than 10,000,000. I didn’t even study very hard.

06 Dec 2008

1

Photoshop Tutorial: 3D Text Effects

Here’s another tutorial on Photoshop from Kasey. It’s about making 3D text, and the options you can use to go along with it. Very basic tutorial, but a powerful technique for any sort of website design.

02 Dec 2008

1

88 Resources for Web Developers

All web developers and web designers should know about the wonderful world of free resources. I’ve compiled a list of graphics, tools, tutorials, and generators that will make creating websites a much faster process, and hopefully produce better designers.

Here are 88 resources that can make your life as a web designer/developer much, much easier.

25 Nov 2008

5

Photoshop Tutorial: Vintage Photo

There has been a new tutorial added from Matt Lidlum. It is how to make a Vintage-style photo in Photoshop. Very neat technique.

19 Nov 2008

2

Reflection: A photoshop tutorial

There is a new Photoshop tutorial available on simple reflecting techniques. Most designers know that reflection and gradients are key factors to Web 2.0 design. Matt Lidlum goes through the basics of gradients, color, and the use of the Skew property to make great looking reflections effects on both text and photos.

18 Nov 2008

0

Link Bar: a Photoshop tutorial

Kasey has taken the time to proved a detailed video tutorial for Photoshop on creating a basic link bar. The finer details of web design are what make designs great. A professional, sleek navigation bar is a great addition to any website layout. Click the read more link to view the video.

17 Nov 2008

1

PHP for Beginners: Part II

This is a series of tutorials; here are the others:

This exercise assumes that you either have PHP installed on your computer already or that you have access to a server with PHP support.

Hail, reader! It is gratifying to find that you enjoyed (or at least survived) my first tutorial on the subject of PHP and preferred to continue with the course! I applaud this effort, as it is in the direction of one of the most useful and essential languages to a web developer in the Web 2.0 era.

But we shall hold the accolades until the end. For now, lets get a brief overview of what we’ll be digging into in Part II:

  • Variables and their uses
  • Data types
  • New functions
    • gettype()
    • var_dump()
    • settype()
  • Arithmetic operators
  • Quiz

Variables and their uses

Variables are the underlying dynamic ability of PHP. It’s what allows code to modify the input of a user to suit the purpose of the code’s author. Now, if you’ve taken anything higher than Algebra, you will find this section to be something of a breeze. For those who feel that a review would be beneficial, however, I’ve decided to include a crash course in variables and their operations.

Variables in PHP are much the same in nature as those in math: it is a number, sequence, or operator defined by a letter or a name, such as x or variable_1. In order to define a variable in PHP, you simply type the name of your variable and precede the name by a dollar sign, $. Following this, you will proceed to define the variable with an equal sign similar to below:

$name = "Matt Lidlum";

You will notice that the variable is now defined as Matt Lidlum, which is the argument of the function. The argument, if you’ll remember, is whatever is between either the parentheses or else the quotation marks. And as before, it is important to note that the variable is not defined as “Matt Lidlum”, but simply Matt Lidlum.

Names, however, are not the only things that you can put in here. Numbers can go in as well, as well as operators (which will be discussed later), and various other data types. For now, play around with variables and try using the print function we learned in Part I. An example script is below:

<html>
    <head>
       <title>PHP for Beginners: Part II</title>
    </head>
    <body>
        <?php
            $name = "Matt Lidlum";
            print "$name";
            // This function will print Matt Lidlum
        ?>
   </body>
</html>

Data types

Data types will again call on your mathematical skills in order for you to gain full comprehension. You will find a number of references to math class, so hopefully your motivation to learn PHP and other languages will be motivation enough to keep your head off that comfy sweatshirt.

Back to the matter at hand, there are a total of eight data types used within PHP: six standard and two special. To familiarize yourself with them, please glance over the following tables:

Standard Data Types

PHP Standard Data types

Special Data Types

PHP Special Data Types

As I’m sure you will notice, a number of these data types are already familiar to you. The print function that we discussed within Part I as well as our $name variable both used a string data type. We will not be stopping there, however. Later this lesson you will also touch base on the double, integer, boolean, and NULL data types as well within the functions section.

New functions

As a quick review, you will remember that last lesson we learnt the function print. Within the argument of the print function you could type anything that you would wish to be displayed on your web page. Moving on from this, we will be mastering three new functions, all of which are more used as diagnostic tools to find errors in the code.

Gettype()

We’ll start with the gettype() function. The gettype() function is used in conjunction with the variables within an author’s program. What this function does is display the variable type (string, integer, etc.) on your web page. Simply type the variable name, $ and all, and PHP will return the variable type to you, simple as that. Although this may seem trivial in terms of use, I assure you that it will be built upon later.

Var_dump()

This function is similar to gettype() in its purpose: diagnostics. It does much the same thing, but in a different way. By placing a variable’s name within the argument, PHP will post the variable’s type as well as the variable’s value. Again, the purpose of this function will be built upon later.

Settype()

Settype() is used to change the variable’s type. This function comes in handy when evaluating a user’s input. For example, let’s say that you have created a form based off of PHP and HTML that asks for a user’s input on the company’s customer service. From a drop-down menu, they may choose either good, bad, or impartial. Now, for instance, let’s say that the user chooses good. With settype we can rewrite that variable as true, a boolean data type as you may remember. Thus, in later parts of the code, the true value will initiate other code segments to execute. Another example is a rating system. In a similar question, suppose the user has the option of typing a number 1-5. Suppose now that they type a non-integer value such as 4.2. With settype, the author can automatically change that input to an integer by simply setting the new type of the variable from double to integer. Thus, 4.2 will round down to 4, giving the author exactly what they want. In order for this to be carried out, however, the author must complete the function in the following manner:

<?php
     $VAR_NAME = "VAR_VALUE"
     settype ( $VAR_NAME , NEW_DATA_TYPE)
?>

Now that you have three new functions to add to your print function, it’s time to give them all a shot. Try using variables and messing around with data types as well. Below is an example of PHP and HTML code that I drew up:

<html>
     <head>
         <title>PHP for Beginners: Part II</title>
     </head>
     <body>
         <?php
              $double = "4.5";
              $integer = "6";
              $name = "Matt Lidlum"; //Three separate variables
              print "$name" //Matt Lidlum
              gettype ($integer) //Integer
              gettype ($name) //String
              settype ($double, int) //$double is now an integer
              print "$double" //5
         ?>
     </body>
</html>

Arithmetic Operators

Okay, I know this is getting long and a lot is being thrown at you, but hang in there. What the following discusses is operators; the little things that allow you to manipulate data such as variables or input. Below is a table of arithmetic operators. There are a number of other operators within PHP that are used to do such things as compare data, but we will focus on those in a later tutorial:

Operators

I’m sure you are heaving a huge sigh of relief because as you can tell, these are very simple operators. Simple operators, however, that can have a significant effect on a piece of code. We’ll start off nice and easy with operators. First, lets try them with the print function:

<?php
     print "4 + 5"; //9
?>

Nothing to it, right? This is, as the section is titled, simple arithmetic. Now lets try it out with variables and even changing the variable’s value.

<?php
     $x = "8";
     $x = "$x + 4"; //$x now equals 12
     $y = "2 * $x"; //$y now equals 24
     $z = "$y - $x"; //$z now equals 12
     print "$y - $x is equal to $z!"; //Math is fun!
?>

Here, I defined $x, modified it by adding 4, then defined $y as 2 * $x, and finally made $z equal to $y – $x. Play around with these operators, mixing the print or any other new function among it.

Quiz

Exams help you to retain knowledge that you have just gained, so with that in mind, I’m afraid it’s back to the classroom for everyone. I urge you to not look back at the material or peek ahead at the answer key.

#1: Using the gettype() function on $x when $x = “4.3″ will return…

A.) Boolean
B.) Integer
C.) Double

#2: Using $x from Question 1, using the settype() function on $x, changing it to Integer, will return the value…

A.) True
B.) $x
C.) 4

#3: Which of the following is not an arithmetic operator?

A.) %
B.) &
C.) *

#4: The data type NULL is present when a variable…

A.) Has not been used in a function
B.) Has not been initiated (defined)
C.) Is placed in the gettype() function

#5: Variables are always preceded by…

A.) $
B.) &
C.) %

Answer key: C,C,B,B,A

Conclusion

Well everyone, this tutorial must now come to a close! We’ve made some great strides in part two, and I hope that you’ll stick around for the next article, PHP for Beginners: Part III.

Page 23 of 24« First...102021222324