Results 1 to 3 of 3

Thread: Post all webdesign questions here

  1. #1
    Join Date
    Dec 2004
    Posts
    10

    Default Post all webdesign questions here

    I've been into webdesign for quite awhile now, so if anyone needs help I'll see if I can help you.

    I know:
    CSS
    PHP
    HTML
    SHTML
    JAVASCRIPT
    FTP
    etc.

    So if you have any questions that fall into any of the above categories, ask away!

  2. #2

    Default

    im learning php i have a few questions,
    To run php it has to be uploaded to the server, and you need to download a compiler, correct?

  3. #3
    Join Date
    Dec 2004
    Posts
    10

    Default

    There's a tutorial on this:
    PHP Tutorial - By Na2

    Ok, for you who get confused on PHP , i'll teach you here. To follow this tutorial, you better open up your Notepad.

    I. What's the advantage of doing your site with php ?

    By converting all your pages to PHP, you can :

    - change your layout easily
    - add extra navigations without adding link in every page
    - and much more

    Let's get started.

    Using php include is actually very simple ^-^. We'll convert a normal html div layer layout to php. Just make sure that your host support php. Remember, free host like

    geocities , angelfire, and soon usually don't support PHP. To use PHP , it doesn't necessary for it to be installed inside your computer. Make sure you have enough html

    skills to work with Php.

    In PHP, you'll have three main pages. They're "

    - top.txt : your MAIN picture and background and/or navigation

    - bot.txt : your navigation / footer

    - yourpage.php: the page when you'll add your content



    .: Step 1 :.

    Example:


    <html>

    <head>
    <title> Innocent </title>
    <link rel="stylesheet" type="text/css" href="css.css">
    </head>

    <body background="bg.JPG">




    [img]bg_picture.jpg[/img]</p>
    <div style="position: absolute; top: 283; left: 301; width: 359; text-align: justify; height: 484">

    <p class=head style="margin-top: 0; margin-bottom: 0; text-align:center">-+
    About +- </p>
    This is Na2 again making the fourth Chobits layout for you ^^. How do you think ? This layout turn veryyy pretty, right ? With all the glittery and swirly brushes ^^. This layout best used for any site's
    purpose. This layout use css , don't bother with it if you don't know what's that. Just upload everything
    to your server and replace these texts with your own words^^.
    . If there's any question about the layout just
    feel free to email me at<a href="mailto:[email protected]"> [email protected]
    </a>




    <p class=head style="margin-top: 0; margin-bottom: 0; text-align:center">-+
    extra +- </p>
    Well, i give you a button ... and a 60X60 avatar. And of course they're transparent

    [img]button.gif[/img] [img]avatar.gif[/img]



    <p class=head style="margin-top: 0; margin-bottom: 0; text-align:center">-+
    copyright and credits +- </p>
    Please do NOT move the credits below the navigation. I spend a lot of times to create this layout
    and what you need to do is just keep the credits section ^^.
    <div>
    <div style="position: absolute; top: -89; left: -241; width: 154; text-align: justify; height: 627">

    <p class= head style="margin-top: 0; margin-bottom: 0; text-align:center">-+
    sitey +- </p>

    your link here

    your link here

    your link here

    your link here

    your link here


    <p class= head style="margin-top: 0; margin-bottom: 0; text-align:center">-+
    misc +- </p>

    your link here

    your link here

    your link here

    your link here

    your link here


    <p class= head style="margin-top: 0; margin-bottom: 0; text-align:center">-+
    affiliates +- </p>
    <p align="left">

    your link here

    your link here

    your link here

    your link here

    your link here


    layout (c) kishuku

    image (c)
    anime project alliance gallery

    site (c) your name
    <div style="width: 154; height: 22">
    </div>
    </body>

    </html>

    .: Step2 :.

    Then we'll try to convert everything to PHP. The point on using PHP is to make it easier to navigate the site and changing layout. Let's divide the code into three section .

    .: Step 3:.

    Look at the code below. It's the FIRST part from the whole layout code. Copy and paste the code below to your Notepad.


    <html>

    <head>
    <title> Innocent </title>
    <link rel="stylesheet" type="text/css" href="css.css">
    </head>

    <body background="bg.JPG">




    [img]bg_picture.jpg[/img]</p>
    <div style="position: absolute; top: 283; left: 301; width: 359; text-align: justify; height: 484">




    And save it as "top.txt"



    .: Step 4:.

    Now , you're done with the top.txt . Every site HAS navigation bars , doesn't it? So look at the code below. It's the navigation code from the layout .

    Copy and paste the codes below to your notepad.



    <div>
    <div style="position: absolute; top: -89; left: -241; width: 154; text-align: justify; height: 627">

    <p class= head style="margin-top: 0; margin-bottom: 0; text-align:center">-+
    sitey +- </p>

    your link here

    your link here

    your link here

    your link here

    your link here


    <p class= head style="margin-top: 0; margin-bottom: 0; text-align:center">-+
    misc +- </p>

    your link here

    your link here

    your link here

    your link here

    your link here


    <p class= head style="margin-top: 0; margin-bottom: 0; text-align:center">-+
    affiliates +- </p>
    <p align="left">

    your link here

    your link here

    your link here

    your link here

    your link here


    layout (c) kishuku

    image (c)
    anime project alliance gallery

    site (c) your name
    <div style="width: 154; height: 22">
    </div>
    </body>

    </html>



    save this as "bot.txt"



    .: Step 5 :.

    Now you can add the content using php include



    <?php include ('top.txt'); ?>

    YOUR CONTENTS HERE

    <?php include ('bot.txt'); ?>



    for example, if i use the chobits layout and if you're still following the tutorial , the code will be like this :



    <?php include ('top.txt'); ?>

    <p class=head style="margin-top: 0; margin-bottom: 0; text-align:center">-+
    About +- </p>
    This is Na2 again making the fourth Chobits layout for you ^^. How do you think ? This layout turn veryyy pretty, right ? With all the glittery and swirly brushes ^^. This layout best used for any site's
    purpose. This layout use css , don't bother with it if you don't know what's that. Just upload everything
    to your server and replace these texts with your own words^^.
    . If there's any question about the layout just
    feel free to email me at<a href="mailto:[email protected]"> [email protected]
    </a>




    <p class=head style="margin-top: 0; margin-bottom: 0; text-align:center">-+
    extra +- </p>
    Well, i give you a button ... and a 60X60 avatar. And of course they're transparent

    [img]button.gif[/img] [img]avatar.gif[/img]



    <p class=head style="margin-top: 0; margin-bottom: 0; text-align:center">-+
    copyright and credits +- </p>
    Please do NOT move the credits below the navigation. I spend a lot of times to create this layout
    and what you need to do is just keep the credits section ^^.

    <?php include ('bot.txt'); ?>



    Save it as text.php or index2.php , and you're done !! Now, everytime you want to add more links, just open bot.txt and add your links there. If you want to change layout, just open top.txt edit everything. That's how php works. Not too hard, eh ?

    Note : If you have a site, better leave the index.html instead changing it to index.php . Why is that? Because when visitors type your URL (example www.kishuku.org) then they will automatically access the index.html , not index.php

    You do not need a compiler- insert the codes and as long as your host supports PHP you'll be fine.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •