Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    <?PHP> Guest

    Default Good Morning/Good Evening Script

    Hey all, I was bored So i thought i would do some tuts on some scripts.

    This One Is Called: Greeting
    What It Does: It gives your sites visitors an Alert Box When They Visit your site, saying an appropriate greeting e.g Good Morning If Its Morning
    On A Scale Of 1 To 5 How Difficult Is It To Use?:2
    What Is The Script Code?:
    <!-- START OF SCRIPT -->
    <!-- HOW TO INSTALL DAILY GREETING: 1. Copy the coding into the BODY of your HTML document -->
    <!-- STEP ONE: Paste this code into the BODY of your HTML document -->
    <BODY>
    <SCRIPT LANGUAGE="JavaScript"><!-- Beginvar Today=new Date();var ThisDay=Today.getDay();var ThisDate=Today.getDate();var ThisMonth=Today.getMonth()+1;var ThisYear=Today.getFullYear(); //included if you wish to insert the yearfunction DayTxt
    (DayNumber) {var Day=new Array();Day[0]="Sunday";Day[1]="Monday";Day[2]="Tuesday";Day[3]="Wednesday";Day[4]
    ="Thursday";Day[5]="Friday";Day[6]="Saturday";return Day[DayNumber];}var DayName=DayTxt(ThisDay);function MonthTxt (MonthNumber)
    {var Month=new Array();Month[1]="January";Month[2]="February";Month[3]="March";Month[4]="April";Month[5]="May";
    Month[6]="June";Month[7]="July";Month[8]="August";Month[9]="September";Month[10]="October";Month[11]="November";Month[12]="December";return Month[MonthNumber];}var MonthName=MonthTxt(ThisMonth);var d = new
    Date();var h = d.getHours();document.write("<TABLE BORDER=3 BGCOLOR=WHITE WIDTH=75 HEIGHT=85 align=left>"+"<TD>"+"<p align=center>"+"<font size=-2 >"+DayName+"<br>"+"<font color=orangered size=+3 >"+ThisDate+"</font>"+"<br>"+MonthName+"<br>"+"</b>"+"</font>"+"</p>"+"</TD>"+"</TR>"+"</TABLE>");if (h < 2) document.write("<P ALIGN=center>"+"<b>

    <!-Here are the editable greetings>
    "+"Good morning! Yes, it's way past midnight."+"</b>"+"</P>");else if (h < 3) document.write("<P ALIGN=center>"+"<b>"+"Good morning! Up early or working late?"+"</b>"+"</P>");else if (h < 7) document.write("<P ALIGN=center>"+"<b>"+"Good morning! Up bright and early!"+"</b>"+"</P>");<-!/////below are the greetings that you can edit-->else if (h < 12) document.write("<P ALIGN=center>"+"<b>"+"Good morning!"+"</b>"+"</P>");else if (h < 17) document.write("<P ALIGN=center>"+"<b>"+"Good afternoon!"+"</b>"+"</P>");else if (h < 23) document.write("<P ALIGN=center>"+"<b>"+"Good evening!"+"</b>"+"</P>");else document.write("<P ALIGN=center>"+"<b>"+"A late good evening! Not much left of it now."+"</b>"+"</P>");// End --></script><!-- END OF SCRIPT -->Need Any Help With The Script PM Me Or email me on [email protected]
    Last edited by <?PHP>; 24-06-2007 at 04:02 AM.

  2. #2
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    How does copy and pasteing a poorly written crapy script and writeing what its called, count as writeing a tutorial??

  3. #3
    <?PHP> Guest

    Default

    number 1, it aint a poorly written one
    number 2, Not everyone thinks its crappy,
    number 3, do u ever say anythin nice?

  4. #4
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    Quote Originally Posted by habfm.net View Post
    number 1, it aint a poorly written one
    number 2, Not everyone thinks its crappy,
    number 3, do u ever say anythin nice?
    Sorry but 01101101entor is way right.

    Next time use the code boxes and explain how its done


  5. #5
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Quote Originally Posted by habfm.net View Post
    number 1, it aint a poorly written one
    Yes it is, VERY poorly written, and that applies to both the code and this tutorial.
    number 2, Not everyone thinks its crappy,
    What people think is irrelevant, the fact remains it IS crappy.
    number 3, do u ever say anythin nice?
    Yes, occasional, but only when i actually have something nice to say. I prefer to give my honest opinion, positive or negative. Rather than blankly give a "10/10" to everything which carrys no meaning, like some sort of ******.
    If you want "nice" feed back actually do a bit or work and produce something that doesn't suck.

  6. #6
    Join Date
    Jul 2005
    Location
    -
    Posts
    2,995
    Tokens
    0

    Latest Awards:

    Default

    Code:
    <?php
    $q = ($date(H) < 12) ? "morning" : "afternoon";
    echo "Good $q!";
    ?>
    Just use that oh by the way yes i got it from techtuts forum because there my friends http://www.techtuts.com/forums/index...4&hl=afternoon

  7. #7
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Quote Originally Posted by Jamie. View Post
    Code:
    <?php
    $q = ($date(H) < 12) ? "morning" : "afternoon";
    echo "Good $q!";
    ?>
    Just use that oh by the way yes i got it from techtuts forum because there my friends http://www.techtuts.com/forums/index...4&hl=afternoon
    I may be wrong but i suspect the $ in front of the date function was added by a accident.

  8. #8
    Join Date
    Jul 2005
    Location
    -
    Posts
    2,995
    Tokens
    0

    Latest Awards:

    Default

    Ye sorry was posting in a rush

  9. #9
    Join Date
    Jan 2007
    Posts
    825
    Tokens
    0

    Default

    Yeah Becasue he hasn't defined $date (am i right?)
    That post was really sensible!

  10. #10
    Join Date
    Jul 2005
    Location
    -
    Posts
    2,995
    Tokens
    0

    Latest Awards:

    Default

    hehe not my php snippet just found on tt so if u read in there yes u will need to define shud of posted but im too tired to bother

Page 1 of 2 12 LastLast

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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