Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 5 1 2 3 ... LastLast
Results 1 to 10 of 46
  1. #1
    Member
    Join Date
    Oct 2009
    Posts
    40
    Member #
    20210
    Okay some background information. Iīm taking a class which teaches us webdesign. Recently we recieved a task to make a website for whatever or whoever we want and I want to have some extra features, that our teacher didnīt teach us how to do, in the page to make a good impression. What we learned was basic CSS like : Custom link color, Different heading, adding images to boxes. Also we learned how to add flash movies, pictures and background image, aswell as make the background "unscrollable".

    Iīm only 17 so all tips īn tricks is appreciated

    Forgot to say that we use Dreamweaver cs3.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    Always use Google to find tutorials ...

    Example:
    http://www.google.com/search?hl=en&s...=f&oq=&aqi=g10

    Is the teacher having you upload your files to a website, or is everything
    done offline ... on the PC only?


  4. #3
    Member
    Join Date
    Oct 2009
    Posts
    40
    Member #
    20210
    First of all i must say i allways use tutorials, like when i use actionscript 3 or make flash animations, but my question was some cool stuff people have seen on a website which is relatively easy to do for a newb dreamweaver and hopefully say how it is done or link to a tutorial.8-)

    Not sure what you meant about online but we can publish the site if we want but it does not matter if it is online or offline

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    It does matter if it's offline or not.

    Offline means your teacher views your work on his/her PC without the files
    being uploaded to a webhost (server). Online means you've uploaded them
    so everyone on the internet can see it.

    If you want to do some cool PHP stuff, you'll need to have uploaded them (online).

    How about making your teacher "log-in" to your webpage in order to view it?
    That's easy to do.


  6. #5
    Member
    Join Date
    Oct 2009
    Posts
    40
    Member #
    20210
    Quote Originally Posted by mlseim
    It does matter if it's offline or not.

    Offline means your teacher views your work on his/her PC without the files
    being uploaded to a webhost (server). Online means you've uploaded them
    so everyone on the internet can see it.
    I know that What i mean't is it doesn't matter to the teacher.

    Log ing could be a cool feature, but i'd rather make a commenting option, is that hard?

  7. #6
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    Commenting option should really be a MySQL based system,
    which would be rather advanced for your situation.

    How about you have your teacher enter their name and it shows as Graffiti.

    Like this:
    http://www.catpin.com/graffiti

    EDIT:
    And you need to upload the "degrassi.ttf" (or your specified TTF file)
    into the same directory as the script. That's what it uses to generate the font.


    This is the "index.php" file:
    PHP Code:
    <html>
    <head><title>Name</title>
    </head>
    <body>
    <?php
    if (isset($_COOKIE["yourname"])){
    $name=$_COOKIE["yourname"];
    echo
    "<center><img src='graffiti.php?name=$name' alt='$name' title='$name' /></center>";
    }
    ?>
    <center>
    <form action="yourname.php" method="post">
    What's Your Name: <input type="text" name="yourname" value="" /><br />
    <input type="submit" name="submit" value="submit">
    </form>
    </center>
    </body>
    </html>

    This is the "yourname.php" file (for making the cookie):
    PHP Code:
    <?php
    $myname
    =$_POST['yourname'];
    setcookie("yourname"$mynametime()+604800);
    header ("location: index.php");
    ?>

    This is the "graffiti.php" file (for making the text image):
    PHP Code:
    <?php
    // Get Name
    $string=$_GET['name'];

    // Create a 300x100 image
    $im imagecreatetruecolor(700150);
    $white imagecolorallocate($im0xFF0xFF0xFF);
    $black imagecolorallocate($im0x000x000x00);

    // Make the background white
    imagefilledrectangle($im00699149$white);

    // Path to our ttf font file
    $font_file 'degrassi.ttf';

    // Draw Text
    imagefttext($im4805050$black$font_file$string);

    // Output image to the browser
    header('Content-Type: image/png');
    imagepng($im);
    imagedestroy($im);
    ?>


  8. #7
    Member
    Join Date
    Oct 2009
    Posts
    40
    Member #
    20210
    Quote Originally Posted by mlseim



    This is the "index.php" file:
    PHP Code:
    <html>
    <head><title>Name</title>
    </head>
    <body>
    <?php
    if (isset($_COOKIE["yourname"])){
    $name=$_COOKIE["yourname"];
    echo
    "<center><img src='graffiti.php?name=$name' alt='$name' title='$name' /></center>";
    }
    ?>
    <center>
    <form action="yourname.php" method="post">
    What's Your Name: <input type="text" name="yourname" value="" /><br />
    <input type="submit" name="submit" value="submit">
    </form>
    </center>
    </body>
    </html>
    Thats a pretty good idea, but could you explain what the first codeblock did?

  9. #8
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    You need a form where the person can enter their name.
    That form goes to the script that sets the cookie.

    So I just made the "index.php" script as a test page .. a place to enter the name.

    Once the cookie is set, you can use this part on ANY page you have that has a
    .php extension ... it looks for the cookie, and if it exists, it displays the graffiti.
    PHP Code:
    <?php 
    if (isset($_COOKIE["yourname"])){ 
    $name=$_COOKIE["yourname"]; 
    echo
    "<center><img src='graffiti.php?name=$name' alt='$name' title='$name' /></center>"

    ?>
    You don't really need to use a cookie. I used a cookie because it would be cool
    to remember the person's name. You could use any words you like just by doing this ...
    <img src='graffiti.php?name=Evenhum'>

    You can also set cookies using Javascript, so you really don't need to use that
    other PHP script to write a cookie. You might wonder why there is the "other script"
    to write the cookie? To set or write a cookie, you need at least one header sent,
    which is a page refresh ... that is what contains the cookie. I think it's easiest to have
    a separate script for handling cookies, as it takes care of that header without the
    user knowing it is happening.

    So the main idea is to convert a string to a "graphical font" using the PHP GD library.
    This is similar to "watermarking" an image with text. I like to use PNG type images with
    the graffiti thing, because PNG produces the best rendering of the font.

    You can find many different cool fonts by using Google. Look for the TTF (.ttf) type of
    files that they allow you to download (True-Type Font). Any TTF fonts you find can
    be used, and you can alter the size.

    In my example, I picked a font size of '48'
    imagefttext($im, 48, 0, 50, 50, $black, $font_file, $string);

    To learn more about PHP GD, use these pages:
    http://php.net/manual/en/function.imagefttext.php

    That particular one explains the "imagefttext" function and has examples.


    .


  10. #9
    Junior Member
    Join Date
    Jun 2009
    Posts
    3
    Member #
    19155
    You can also use free templates

  11. #10
    Member
    Join Date
    Oct 2009
    Posts
    40
    Member #
    20210
    Wow this forum is realy nice, thx for amazing feedback guys. I'll be sure to post some more question in the near future


Page 1 of 5 1 2 3 ... LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:13 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com