• Archives

  • AddThis Social Bookmark Button

    Add to Technorati Favorites

  • Archive for December, 2007

    Making Greenish Leaves Interface for website using photoshop

    Sunday, December 23rd, 2007

    Original Tutorial: http://www.photoshopstar.com/web-graphics/interface-leaves/

    Well, in this easy, step-by-step tutorial I’m going to be showing you how to design some “interface leaves,” which could come in handy when designing a jungle-themed clan template or something like that. Here’s what I came up with:

    1. New Document, Find a Leaf Stock

    Well, first of all you want to open up a clan template you’ve been working on, or create a new document.
    In this case I created a new document and filled the background layer with a very dark color.
    After you’ve made your document/background or whatever, you’ll need to find some nice leaves.
    I simple went to Google Images and searched for “Leaves,” this is what I came up with.
    After you’ve got your leaves stock photo, copy/paste it to your document like so:

    It’s absolutely terrible quality, but at least the shape is still there… mostly.

    2. Making the Leaves Shape

    This part is personal preference really, are you familiar with the Pen Tool?
    If so, you can use the Pen Tool to draw a path around your leaves, other wise you’ll just want to use the Polygonal Lasso Tool.

    Fill the selection with a dark green, I used #748004.

    Apply the following Layer Styles to the leaves layer:
    Outer Glow

    Inner Glow

    Pattern Overlay (download the pattern from here)

    Now you should be left with something like this:

    3. Add Detail by Dodging & Burning

    Alright, to add the details to your leaves you’ll want to use the Dodge and Burn tools. The Dodge tool is used to add highlights to things, and the Burn tool is used to darken things.

    Dodge Tool
    Burn Too:

    Please remember that it doesn’t need to be perfect, just do something like what I’ve done here:

    4. Duplicating, Resizing

    Now it’s time to make some copies. Start by duplicating your main leaves layer and flipping the copy horizontally.
    Layer > Duplicate Layer
    Edit > Transform > Flip Horizontal

    Press ctrl+T to go into Transform mode, then size your leaves duplicate down.

    Move your copy over to the left and upwards a little bit, and also erase the stem if you want to.

    Duplicate your smaller set of leaves again, flip horizontally and move them to a different position – I moved mine underneath the large set of leaves.

    One more copy and you should get set!

    5. Merging and Finishing Up

    Well, we’re nearly finished here. Firstly, merge all of your leaves layers together, now that you have only one single layer left, go into Transform mode again and size the leaves down to about 15-30%.

    To bring out the detail in your leaves a little bit, apply Filter > Sharpen > Sharpen, then Edit > Fade Sharpen since it will be too strong. To finish off, I duplicated the whole lot once more and moved them underneath, I also added in a content-style box to show what it would look like. Enjoy!

    Share and Enjoy:
    • Digg
    • del.icio.us
    • Facebook
    • NewsVine
    • Reddit
    • StumbleUpon
    • YahooMyWeb
    • Google Bookmarks
    • Yahoo! Buzz
    • TwitThis
    • Live
    • LinkedIn
    • Pownce
    • MySpace

    Creating table’s in html

    Friday, December 21st, 2007

    I remember the days when i thought that tables are useless but they worth it

    Important terms

    Tr = Table Row

    Td = Table coloumn

    Syntax


    welcome something

    In this table it will create a table of width=”100%” and divide it amongst two columns in which both them will have a separate txt one will be welcome and other will be something

    Thanks
    krates

    Share and Enjoy:
    • Digg
    • del.icio.us
    • Facebook
    • NewsVine
    • Reddit
    • StumbleUpon
    • YahooMyWeb
    • Google Bookmarks
    • Yahoo! Buzz
    • TwitThis
    • Live
    • LinkedIn
    • Pownce
    • MySpace

    Connecting to a database

    Tuesday, December 18th, 2007

    Connecting to a database through php is not a tough task.

    First off all create a new sql database in phpmyadmin and see the privileges section in it for the user/pass by default it is

    Username == “root”

    Password == “”

    In php you need this and your host name it is always localhost

    Syntax:


    $host = "localhost"; //Host name
    $username = "root"; // Username
    $pass = ""; //Password
    $dbname = "useless"; //Database Name

    $connect = mysqli_connect ($host,$username,$pass,$dbname);
    if(! $connect)
    {
    echo “unable to connect to the database”;
    }
    else{
    echo “Connected to database”;
    }
    ?>
    The above script will connect you to the database note you must php 5
    because it uses mysqli functions

    Thanks
    krates

    Share and Enjoy:
    • Digg
    • del.icio.us
    • Facebook
    • NewsVine
    • Reddit
    • StumbleUpon
    • YahooMyWeb
    • Google Bookmarks
    • Yahoo! Buzz
    • TwitThis
    • Live
    • LinkedIn
    • Pownce
    • MySpace

    Using for each to loop through an array

    Sunday, December 16th, 2007

    Sometimes you need to loop through an for this the for each function is used for example.

    $grade = array(“first_name” => “First Name”,
    “middle_name” => “Middle Name”,
    “last_name” => “Last Name”,
    “phone” => “Phone”);

    foreach($grade as $field => $gard)
    {
    echo ”
    $gard The name of the array $field

    “;
    }
    ?>

    Notice the variable $grade arrays starting from first_name is given to $field and then the array value is given to label

    U can use this in many forms

    Thanks
    krates

    Share and Enjoy:
    • Digg
    • del.icio.us
    • Facebook
    • NewsVine
    • Reddit
    • StumbleUpon
    • YahooMyWeb
    • Google Bookmarks
    • Yahoo! Buzz
    • TwitThis
    • Live
    • LinkedIn
    • Pownce
    • MySpace

    Simple PHP navigation tutorial

    Friday, December 14th, 2007

    Html pages are boring. Everyone is using php navigations now, for example ?id=news etc., well its not all that complicated and since you are reading this I assume you would like to learn how to do it!

    Note:

    Your server must have php installed for this to work and your extensions should end in .php.

    And on to the tutorial:

    This is the basic code I use, you can copy it and put it on your page!

    Note
    This code would go in your main content area.

    <?php
    switch($id) {
    default:
    include(‘news.php’);
    break;
    case ‘about’ :
    include(‘about.html’);
    break;
    }
    ?>

    Thats it, however i will explain it in a bit more depth..

    default:
    include(‘news.php’);
    break;

    This is the main page you want to open when you load your website for most people its news and updates etc. This can be php or html or whatever.

    case ‘about’ :
    include(‘about.html’);
    break;

    This is the page you want to include next such as an about page etc. Keep adding the pages so you got all you need. Your code will look like something below:

    <?php
    switch($id) {
    default:
    include(‘news.php’);
    break;
    case ‘about’ :
    include(‘about.html’);
    break;
    case ‘tutorials’ :
    include(‘tutorials.php’);
    break;
    case ‘downloads’ :
    include(‘downloads.html’);
    break;
    case ‘templates’ :
    include(‘temps.html’);
    break;
    case ‘comming’ :
    include(‘soon.html’);
    break;
    }
    ?>

    Now if you are not completely lost yet this is what you do to link your pages, Change your links from <a href=”about.html”>About</a> to <a href=”?id=about”>About</a>

    Share and Enjoy:
    • Digg
    • del.icio.us
    • Facebook
    • NewsVine
    • Reddit
    • StumbleUpon
    • YahooMyWeb
    • Google Bookmarks
    • Yahoo! Buzz
    • TwitThis
    • Live
    • LinkedIn
    • Pownce
    • MySpace