Web Analytics Made Easy -
StatCounter Please help - CSS MOTD - CodingForum

Announcement

Collapse
No announcement yet.

Please help - CSS MOTD

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Please help - CSS MOTD

    Ok, here is my huge post to get all of my many problems sorted in one post without keeping to come back and bug you. Here is my current attempt:



    Firstly, the white / grey gradient bar has a grey line at the bottom. This is because the actual image is 20px high but on my site for some reason it is something like 24 px and so the single grey line at the bottom is being repeated to fill up the extra 4 px. It wasnt doing this before but i must of changed something to make it do this (and yes, the images on that bar are only 20px high too).

    Secondly, there is a big gap between the bottom of the the grey / white gradient bar and the top of the latest posts block, can you tell me what is causing this and how i would go about getting rid of it.

    Thirdly, regarding the images and their separation:

    I have a page which i am expecting to be viewed in a window of different sizes (it will be an ingame motd and different res = different window viewing size). I have 5 images in a line and i am looking for the images to have an equal spacing which varies depending on how large the window it is being viewed in. At the moment it is center aligned but it looks bad because there is a big gap on both sides, it would be better if it went the whole way across the window with spacing inbetween the images so that it goes the full way across what ever the window size its being viewed in. (_ equals a space)

    Small Window:
    [image1][image2][image3][image4]

    Larger Window:
    [image1]__[image2]__[image3]__[image4]

    Large Window:
    [image1]____[image2]____[image3]____[image4]
    i hope that makes sense. Can you tell me how to do this please?

    This is my code as it currently stands:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    
    <html>
    
    <head>
    <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
    <title>MOTD</title>
    <style type="text/css" media="screen"><!--
    body 
    {
    color: white;
    background-image:url('http://www.hiven.net/files/background.jpg')
    }
    
    #content 
    {
    font-family: Verdana, Geneva, Arial, sans-serif;
    background-color: #FFFFFF;
    display: table-cell;
    visibility: visible;
    position: absolute;
    border-width: 1px;
    border-color: black;
    
    }
    
    #content2 
    {
    font-family: Verdana, Geneva, Arial, sans-serif;
    position: absolute;
    color: black;
    
    }
    
    .bodytext 
    {
    font-size: 10px;
    color: #000000
    }
    
    .headline 
    {
    font-weight: bold;
    font-size: 24px
    }
    
    a:link, a:visited 
    {
    color: #000000;
    text-decoration: none
    }
    
    a:hover 
    {
    color: red;
    text-decoration: none
    }
    
    .captions 
    {
    color: white;
    font-size: 10px;
    line-height: 14px;
    font-family: Verdana, Geneva, Arial, sans-serif;
    text-align: left
    }
    
    #header    { background: #000000 url(http://www.hiven.net/forums/images/g...dient_tcat.gif) position: absolute;
                 height: 25px }
    
    #header2    { background: #000000 url(http://www.hiven.net/files/header2.gif) position: absolute;
                 height: 18px }
    </style>
    </head>
    <body>
    <div id="header"><img src="http://www.hiven.net/files/motdhg.gif" /></div>
    <div id="header2"><a href="http://www.hiven.net/files/motd2.php"><img src="http://www.hiven.net/files/home.gif" border="0"></a>
    <a href="http://www.hiven.net/files/stats.php"><img src="http://www.hiven.net/files/stats.gif" border="0"></a><a href="http://www.hiven.net/files/ranks.php"><img src="http://www.hiven.net/files/ranks.gif" border="0"></a><a href="http://www.hiven.net/files/music.php"><img src="http://www.hiven.net/files/music.gif" border="0"></a><a href="http://www.hiven.net/files/rules.php"><img src="http://www.hiven.net/files/rules.gif" border="0"></a><a href="http://www.hiven.net/files/apply.php"><img src="http://www.hiven.net/files/apply.gif" border="0"></a></div><div id="content2"></div>
    <br />
    <br />
    <div id="content">
    <div class="bodytext">
    <B><center>LATEST POSTS</center></B>
    <?php
    $db_host = "****"; // Change this if your MySQL database host is different.
    $db_name = "****"; // Change this to the name of your database.
    $db_user = "*****"; // Change this to your database username.
    $db_pw = "******"; // Change this to your database password.
    $db_prefix = "***"; //Change this to the prefix of the forum database.
    
    $forum_url = "http://www.hiven.net/forums"; // Change this to reflect to your forum's URL.
    $limit = "10"; // Number of posts displayed.
    $txtlimit = "22"; // This is the character limit.
    
    // Connecting to your database
    mysql_connect($db_host, $db_user, $db_pw) 
    OR die ("Cannot connect to your database"); 
    mysql_select_db($db_name) OR die("Cannot connect to your database"); 
    
    if ($limit) {
    	$limited = "LIMIT $limit";
    }
    
    $thread_sql = mysql_query("select threadid,title,lastpost,firstpostid from $db_prefix thread where visible=1 $wheresql and open=1 $forumid order by lastpost desc $limited");
    
    while($thread_get = mysql_fetch_array($thread_sql))
    	{
    		$lastpost = $thread_get['lastpost'];
    		$tid = $thread_get['threadid'];
    		$psql = mysql_query("SELECT postid from $db_prefix post where threadid=$tid order by postid desc");
    		$getp = mysql_fetch_array($psql);
    		$pid = $getp['postid'];
    		$title = $thread_get['title'];
    		$title = substr($title,0,$txtlimit);
    		
    			echo "<li class=\"item\"><a href=\"$forum_url/showthread.php?p=$pid#post$pid\"><span>$title</span></a></li>";
    	}
    ?>
    </div>
    </div>
    </body>
    </html>
    The page in question is: http://www.hiven.net/files/motd2.php

    James
    Last edited by spadez; Oct 6, 2006, 07:37 PM.

  • #2
    Don't beg. It only makes you look silly. Please use code tags not quote tags to post code. Fix your post. As for your problem obviously we can't read php if its still on the server. Post a link to the page in question.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

    Comment


    • #3
      Fixed.

      Comment


      • #4
        Okay change your current doctype
        to this doctype
        Code:
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
        You need the full doctype or you will never get the results you want.

        You also need to fix your coding errors.
        ||||If you are getting paid to do a job, don't ask for help on it!||||

        Comment


        • #5
          Ok, i have fixed all of the errors i understand, im new to this and i dont know what i am meant to do with the other 11 (taken out 6 errors, 11 remaining, which is basically the same error over and over again). I had to fix the gardients but everything is working now. I will work on finding out how to fix my other errors, can you possibly help me with any of my questions in the first post?

          James
          Last edited by spadez; Oct 7, 2006, 05:17 AM.

          Comment


          • #6
            In your code you have two <br> tags after your menu which is causing that space. Try this
            PHP Code:
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
            <html>
            <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <title>MOTD</title>
            <style type="text/css" media="screen">
            <!--
            html, body {
            color: white;
            background-image:url(files/background.jpg);
            margin:0;
            padding:0;
            font-size: 10px;
            color: #000000;
            font-family:Verdana, Arial, Helvetica, sans-serif;
            }
            a img {
            border:0;
            }
            #container {
            min-width:370px;
            }
            .headline 
            {
            font-weight: bold;
            font-size: 24px
            }
            a:link, a:visited {
            color: #000000;
            text-decoration: none
            }
            a:hover {
            color: red;
            text-decoration: none
            }
            .captions {
            color: #FFF;
            line-height: 14px;
            }
            #header {
            background: #000000 url(forums/images/gradients/gradient_tcat.gif);
            height: 25px;
            line-height:0px;
            font-size:0;
            }
            #horinav {
            background: #000000 url(files/header2.gif);
            height: 18px;
            line-height:0px;
            font-size:0;
            margin:0 0 10px 0;
            padding:0;
            list-style:none;
            height:20px;
            }
            #horinav li {
            float:left;
            }
            #news {
            background:#FFF;
            color:#000;
            width:150px;
            float:left;
            }
            * html #news {
            margin-right:-3px;
            }
            #news h1 {
            font-size:12px;
            margin:0;
            padding:0;
            text-align:center;
            }
            #news ul {
            margin:0;
            padding:20px;
            }
            #content {
            margin-left:160px;
            background:#FFF;
            }
            * html #content {
            margin-left:157px;
            height:1%;
            }
            #content p {
            margin:0;
            padding:10px;
            text-align:justify;
            }
            .clear {
            clear:both;
            font-size:0;
            line-height:0px;
            }
            </style>
            </head>
            <body>
            <div id="container">
            <div id="header"><img src="files/motdhg.gif" alt=""></div>
            <ul id="horinav">
                <li><a href="files/motd2.php"><img src="files/home.gif" alt=""></a></li>
                <li><a href="files/stats.php"><img src="files/stats.gif" alt=""></a></li>
                <li><a href="files/ranks.php"><img src="files/ranks.gif" alt=""></a></li>
                <li><a href="files/music.php"><img src="files/music.gif" alt=""></a></li>
                <li><a href="files/rules.php"><img src="files/rules.gif" alt=""></a></li>
                <li><a href="files/apply.php"><img src="files/apply.gif" alt=""></a></li>
            </ul>
            <div id="news">
                <h1>LATEST POSTS</h1>
                <ul>
            <?php
            $db_host 
            "****"// Change this if your MySQL database host is different.
            $db_name "****"// Change this to the name of your database.
            $db_user "*****"// Change this to your database username.
            $db_pw "******"// Change this to your database password.
            $db_prefix "***"//Change this to the prefix of the forum database.

            $forum_url "forums"// Change this to reflect to your forum's URL.
            $limit "10"// Number of posts displayed.
            $txtlimit "22"// This is the character limit.

            // Connecting to your database
            mysql_connect($db_host$db_user$db_pw
            OR die (
            "Cannot connect to your database"); 
            mysql_select_db($db_name) OR die("Cannot connect to your database"); 

            if (
            $limit) {
                
            $limited "LIMIT $limit";
            }

            $thread_sql mysql_query("select threadid,title,lastpost,firstpostid from $db_prefix thread where visible=1 $wheresql and open=1 $forumid order by lastpost desc $limited");

            while(
            $thread_get mysql_fetch_array($thread_sql))
                {
                    
            $lastpost $thread_get['lastpost'];
                    
            $tid $thread_get['threadid'];
                    
            $psql mysql_query("SELECT postid from $db_prefix post where threadid=$tid order by postid desc");
                    
            $getp mysql_fetch_array($psql);
                    
            $pid $getp['postid'];
                    
            $title $thread_get['title'];
                    
            $title substr($title,0,$txtlimit);
                    
                    echo 
            "<li class=\"item\"><a href=\"$forum_url/showthread.php?p=$pid#post$pid\"><span>$title</span></a></li>";
                }
            ?>
                </ul>
            </div>
            <div id="content">
                <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis a sem. Fusce quam. Cras in tellus. Pellentesque justo. Morbi a erat non nibh euismod nonummy. Donec convallis, purus cursus interdum rhoncus, tellus dolor pharetra est, eget semper eros sem id arcu. Aenean et erat eu metus pellentesque vehicula. Duis varius. Nullam rhoncus placerat lectus. In nec nulla. Morbi metus. Vestibulum magna. Nulla at mauris. Fusce tortor. Donec ullamcorper, elit eget dapibus pharetra, erat purus imperdiet nibh, suscipit interdum nisi nisl et odio. Ut urna. Curabitur in pede. Maecenas mauris neque, pharetra quis, faucibus sed, adipiscing vitae, purus. </p>
                <p> Sed in pede ac eros bibendum tempor. Integer elementum elementum turpis. Donec sodales. Quisque molestie semper tortor. Maecenas felis lectus, aliquam quis, eleifend in, tincidunt et, massa. Aenean porttitor aliquam enim. Maecenas convallis. Suspendisse laoreet dignissim odio. Vivamus eu ipsum. Nam pharetra neque non augue. Morbi et ipsum vel odio feugiat ornare. Maecenas ultrices dui. Duis nunc lacus, volutpat ut, eleifend porta, tempor eget, purus. Sed faucibus imperdiet elit. </p>
                <p> Integer sed mi et turpis accumsan auctor. Aenean elementum erat rutrum lorem. Phasellus ac velit ut neque pulvinar imperdiet. Pellentesque tortor ligula, molestie id, eleifend non, pellentesque a, sapien. Curabitur eu velit. Vivamus vel neque tincidunt elit scelerisque commodo. Sed dolor dolor, dignissim at, eleifend tincidunt, accumsan id, diam. Praesent dictum. Aliquam vulputate tellus nec orci. Etiam scelerisque turpis sit amet diam. Vestibulum nisi nulla, ultricies nec, ultrices et, aliquet id, elit. Aenean dapibus dolor sit amet pede. Phasellus eleifend dolor id augue. Fusce quis diam. Praesent ligula velit, convallis sed, eleifend id, luctus dictum, justo. Donec tempor. </p>
            </div>
            <div class="clear">&nbsp;</div>
            </div>
            </body>
            </html>
            Last edited by _Aerospace_Eng_; Oct 7, 2006, 11:45 AM.
            ||||If you are getting paid to do a job, don't ask for help on it!||||

            Comment


            • #7
              Great, thats fixed now. Are you able to help me with my last one? Since there are 5 images am i able to do them at 20% each along? If so, how?

              James

              Comment


              • #8
                Sighs, I gave you perfectly valid code. Now your code is a mess. Its far from being valid. Fix your code.
                ||||If you are getting paid to do a job, don't ask for help on it!||||

                Comment


                • #9
                  O wow you fixed my code, thank you so much, im sorry i didnt realise!

                  Here is my code now:

                  Code:
                  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
                  <html>
                  <head>
                  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                  <title>MOTD</title>
                  <style type="text/css" media="screen">
                  <!--
                  html, body {
                  color: white;
                  background-image:url(files/background.jpg);
                  margin:0;
                  padding:0;
                  font-size: 10px;
                  color: #000000;
                  font-family:Verdana, Arial, Helvetica, sans-serif;
                  }
                  a img {
                  border:0;
                  }
                  #container {
                  min-width:370px;
                  }
                  .headline 
                  {
                  font-weight: bold;
                  font-size: 24px
                  }
                  a:link, a:visited {
                  color: #000000;
                  text-decoration: none
                  }
                  a:hover {
                  color: red;
                  text-decoration: none
                  }
                  .captions {
                  color: #FFF;
                  line-height: 14px;
                  }
                  #header {
                  background: #000000 url(forums/images/gradients/gradient_tcat.gif);
                  height: 25px;
                  line-height:0px;
                  font-size:0;
                  }
                  #horinav {
                  background: #000000 url(files/header2.gif);
                  height: 18px;
                  line-height:0px;
                  font-size:0;
                  margin:0 0 10px 0;
                  padding:0;
                  list-style:none;
                  height:20px;
                  }
                  #horinav li {
                  float:left;
                  }
                  #news {
                  background:#FFF;
                  color:#000;
                  width:150px;
                  float:left;
                  }
                  * html #news {
                  margin-right:-3px;
                  }
                  #news h1 {
                  font-size:10px;
                  margin:0;
                  padding:0;
                  text-align:center;
                  }
                  #news ul {
                  margin:0;
                  padding:20px;
                  }
                  #content {
                  margin-left:160px;
                  background:#FFF;
                  }
                  * html #content {
                  margin-left:157px;
                  height:1%;
                  }
                  #content p {
                  margin:0;
                  padding:10px;
                  text-align:justify;
                  }
                  .clear {
                  clear:both;
                  font-size:0;
                  line-height:0px;
                  }
                  </style>
                  </head>
                  <body>
                  <div id="container">
                  <div id="header"><img src="motdhg.gif" alt=""></div>
                  <ul id="horinav">
                      <li><a href="motd2.php"><img src="home.gif" alt=""></a></li>
                      <li><a href="stats.php"><img src="stats.gif" alt=""></a></li>
                      <li><a href="ranks.php"><img src="ranks.gif" alt=""></a></li>
                      <li><a href="music.php"><img src="music.gif" alt=""></a></li>
                      <li><a href="rules.php"><img src="rules.gif" alt=""></a></li>
                      <li><a href="apply.php"><img src="apply.gif" alt=""></a></li>
                  </ul>
                  <div id="news">
                      <h1>LATEST POSTS</h1>
                      <ul>
                  <?php>
                  $db_host = "**"; // Change this if your MySQL database host is different.
                  $db_name = "**"; // Change this to the name of your database.
                  $db_user = "***"; // Change this to your database username.
                  $db_pw = "**"; // Change this to your database password.
                  $db_prefix = "**"; //Change this to the prefix of the forum database.
                  
                  $forum_url = "http://www.hiven.net/forums"; // Change this to reflect to your forum's URL.
                  $limit = "10"; // Number of posts displayed.
                  $txtlimit = "22"; // This is the character limit.
                  
                  
                  // Connecting to your database
                  mysql_connect($db_host, $db_user, $db_pw) 
                  OR die ("Cannot connect to your database"); 
                  mysql_select_db($db_name) OR die("Cannot connect to your database"); 
                  
                  if ($limit) {
                      $limited = "LIMIT $limit";
                  }
                  
                  $thread_sql = mysql_query("select threadid,title,lastpost,firstpostid from $db_prefix thread where visible=1 $wheresql and open=1 $forumid order by lastpost desc $limited");
                  
                  while($thread_get = mysql_fetch_array($thread_sql))
                      {
                          $lastpost = $thread_get['lastpost'];
                          $tid = $thread_get['threadid'];
                          $psql = mysql_query("SELECT postid from $db_prefix post where threadid=$tid order by postid desc");
                          $getp = mysql_fetch_array($psql);
                          $pid = $getp['postid'];
                          $title = $thread_get['title'];
                          $title = substr($title,0,$txtlimit);
                          
                          echo "<li class=\"item\"><a href=\"$forum_url/showthread.php?p=$pid#post$pid\"><span>$title</span></a></li>";
                      }
                  ?>
                      </ul>
                  </div>
                  <div id="content">
                      <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis a sem. Fusce quam. Cras in tellus. Pellentesque justo. Morbi a erat non nibh euismod nonummy. Donec convallis, purus cursus interdum rhoncus, tellus dolor pharetra est, eget semper eros sem id arcu. Aenean et erat eu metus pellentesque vehicula. Duis varius. Nullam rhoncus placerat lectus. In nec nulla. Morbi metus. Vestibulum magna. Nulla at mauris. Fusce tortor. Donec ullamcorper, elit eget dapibus pharetra, erat purus imperdiet nibh, suscipit interdum nisi nisl et odio. Ut urna. Curabitur in pede. Maecenas mauris neque, pharetra quis, faucibus sed, adipiscing vitae, purus. </p>
                      <p> Sed in pede ac eros bibendum tempor. Integer elementum elementum turpis. Donec sodales. Quisque molestie semper tortor. Maecenas felis lectus, aliquam quis, eleifend in, tincidunt et, massa. Aenean porttitor aliquam enim. Maecenas convallis. Suspendisse laoreet dignissim odio. Vivamus eu ipsum. Nam pharetra neque non augue. Morbi et ipsum vel odio feugiat ornare. Maecenas ultrices dui. Duis nunc lacus, volutpat ut, eleifend porta, tempor eget, purus. Sed faucibus imperdiet elit. </p>
                      <p> Integer sed mi et turpis accumsan auctor. Aenean elementum erat rutrum lorem. Phasellus ac velit ut neque pulvinar imperdiet. Pellentesque tortor ligula, molestie id, eleifend non, pellentesque a, sapien. Curabitur eu velit. Vivamus vel neque tincidunt elit scelerisque commodo. Sed dolor dolor, dignissim at, eleifend tincidunt, accumsan id, diam. Praesent dictum. Aliquam vulputate tellus nec orci. Etiam scelerisque turpis sit amet diam. Vestibulum nisi nulla, ultricies nec, ultrices et, aliquet id, elit. Aenean dapibus dolor sit amet pede. Phasellus eleifend dolor id augue. Fusce quis diam. Praesent ligula velit, convallis sed, eleifend id, luctus dictum, justo. Donec tempor. </p>
                  </div>
                  <div class="clear">&nbsp;</div>
                  </div>
                  </body>
                  </html>
                  Which gives this result:

                  http://www.hiven.net/files/motd4.php

                  The code has however removed the repeating red and white gradient along the x axis. I just used the code repeat-x before and it worked however when i put it under the header style settings it didnt change anything. How can i get the red gradient to go all the way along on the x axis on the top row and the white gradient to go all the way along the x axis on the second row down.

                  Thank you for your support! It is much appreciated.
                  Last edited by spadez; Oct 7, 2006, 08:37 PM.

                  Comment


                  • #10
                    Try this
                    PHP Code:
                    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
                    <html>
                    <head>
                    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                    <title>MOTD</title>
                    <style type="text/css" media="screen">
                    html, body {
                    color: white;
                    background-image:url(/files/background.jpg);
                    margin:0;
                    padding:0;
                    font-size: 10px;
                    color: #000000;
                    font-family:Verdana, Arial, Helvetica, sans-serif;
                    }
                    a img {
                    border:0;
                    }
                    #outer {
                    min-width:400px;
                    }
                    .headline 
                    {
                    font-weight: bold;
                    font-size: 24px
                    }
                    a:link, a:visited {
                    color: #000000;
                    text-decoration: none
                    }
                    a:hover {
                    color: red;
                    text-decoration: none
                    }
                    .captions {
                    color: #FFF;
                    line-height: 14px;
                    }
                    #header {
                    background: #000000 url(/forums/images/gradients/gradient_tcat.gif);
                    height: 25px;
                    line-height:0px;
                    font-size:0;
                    repeat-x;
                    }
                    #horinav {
                    background: #000000 url(/files/header2.gif);
                    height: 18px;
                    line-height:0px;
                    font-size:0;
                    margin:0 0 10px 0;
                    padding:0;
                    list-style:none;
                    height:20px;
                    }
                    #horinav li {
                    float:left;
                    width:16.5%;
                    text-align:center;
                    }
                    #news {
                    background:#FFF;
                    color:#000;
                    width:150px;
                    float:left;
                    }
                    #news h1 {
                    font-size:10px;
                    margin:0;
                    padding:0;
                    text-align:center;
                    }
                    #news ul {
                    margin:0;
                    padding:20px;
                    }
                    #content {
                    margin-left:160px;
                    background:#FFF;
                    }
                    #content p {
                    margin:0;
                    padding:10px;
                    text-align:justify;
                    }
                    .clear {
                    clear:both;
                    font-size:0;
                    line-height:0px;
                    }
                    </style>
                    <!--[if lte IE 6]>
                    <style type="text/css">
                    #inner {
                    padding-left:400px;
                    float:left;
                    }
                    #minwidth {
                    margin-left:-400px;
                    }
                    #container {
                    position:relative;
                    width:100%;
                    }
                    #news {
                    margin-right:-3px;
                    }
                    #content {
                    margin-left:157px;
                    height:1%;
                    }
                    </style>
                    <![endif]-->
                    </head>
                    <body>
                    <div id="outer">
                        <div id="inner">
                            <div id="minwidth">
                                <div id="container">
                                    <div id="header"><img src="/files/motdhg.gif" alt=""></div>
                                    <ul id="horinav">
                                        <li><a href="motd2.php"><img src="/files/home.gif" alt=""></a></li>
                                        <li><a href="stats.php"><img src="/files/stats.gif" alt=""></a></li>
                                        <li><a href="ranks.php"><img src="/files/ranks.gif" alt=""></a></li>
                                        <li><a href="music.php"><img src="/files/music.gif" alt=""></a></li>
                                        <li><a href="rules.php"><img src="/files/rules.gif" alt=""></a></li>
                                        <li><a href="apply.php"><img src="/files/apply.gif" alt=""></a></li>
                                    </ul>
                                    <div id="news">
                                        <h1>LATEST POSTS</h1>
                                        <ul>
                    <?php
                    $db_host 
                    "****"// Change this if your MySQL database host is different.
                    $db_name "****"// Change this to the name of your database.
                    $db_user "*****"// Change this to your database username.
                    $db_pw "******"// Change this to your database password.
                    $db_prefix "***"//Change this to the prefix of the forum database.

                    $forum_url "http://www.hiven.net/forums"// Change this to reflect to your forum's URL.
                    $limit "10"// Number of posts displayed.
                    $txtlimit "22"// This is the character limit.

                    // Connecting to your database
                    mysql_connect($db_host$db_user$db_pw
                    OR die (
                    "Cannot connect to your database"); 
                    mysql_select_db($db_name) OR die("Cannot connect to your database"); 

                    if (
                    $limit) {
                        
                    $limited "LIMIT $limit";
                    }

                    $thread_sql mysql_query("select threadid,title,lastpost,firstpostid from $db_prefix thread where visible=1 $wheresql and open=1 $forumid order by lastpost desc $limited");

                    while(
                    $thread_get mysql_fetch_array($thread_sql))
                        {
                            
                    $lastpost $thread_get['lastpost'];
                            
                    $tid $thread_get['threadid'];
                            
                    $psql mysql_query("SELECT postid from $db_prefix post where threadid=$tid order by postid desc");
                            
                    $getp mysql_fetch_array($psql);
                            
                    $pid $getp['postid'];
                            
                    $title $thread_get['title'];
                            
                    $title substr($title,0,$txtlimit);
                            
                                        echo 
                    "<li class=\"item\"><a href=\"/forums/showthread.php?p=$pid#post$pid\">$title</a></li>\n";
                        }
                    ?>                    
                                    </ul>
                                    </div>
                                    <div id="content">
                                        <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis a sem. Fusce quam. Cras in tellus. Pellentesque justo. Morbi a erat non nibh euismod nonummy. Donec convallis, purus cursus interdum rhoncus, tellus dolor pharetra est, eget semper eros sem id arcu. Aenean et erat eu metus pellentesque vehicula. Duis varius. Nullam rhoncus placerat lectus. In nec nulla. Morbi metus. Vestibulum magna. Nulla at mauris. Fusce tortor. Donec ullamcorper, elit eget dapibus pharetra, erat purus imperdiet nibh, suscipit interdum nisi nisl et odio. Ut urna. Curabitur in pede. Maecenas mauris neque, pharetra quis, faucibus sed, adipiscing vitae, purus. </p>
                                        <p> Sed in pede ac eros bibendum tempor. Integer elementum elementum turpis. Donec sodales. Quisque molestie semper tortor. Maecenas felis lectus, aliquam quis, eleifend in, tincidunt et, massa. Aenean porttitor aliquam enim. Maecenas convallis. Suspendisse laoreet dignissim odio. Vivamus eu ipsum. Nam pharetra neque non augue. Morbi et ipsum vel odio feugiat ornare. Maecenas ultrices dui. Duis nunc lacus, volutpat ut, eleifend porta, tempor eget, purus. Sed faucibus imperdiet elit. </p>
                                        <p> Integer sed mi et turpis accumsan auctor. Aenean elementum erat rutrum lorem. Phasellus ac velit ut neque pulvinar imperdiet. Pellentesque tortor ligula, molestie id, eleifend non, pellentesque a, sapien. Curabitur eu velit. Vivamus vel neque tincidunt elit scelerisque commodo. Sed dolor dolor, dignissim at, eleifend tincidunt, accumsan id, diam. Praesent dictum. Aliquam vulputate tellus nec orci. Etiam scelerisque turpis sit amet diam. Vestibulum nisi nulla, ultricies nec, ultrices et, aliquet id, elit. Aenean dapibus dolor sit amet pede. Phasellus eleifend dolor id augue. Fusce quis diam. Praesent ligula velit, convallis sed, eleifend id, luctus dictum, justo. Donec tempor. </p>
                                    </div>
                                    <div class="clear">&nbsp;</div>
                                </div>
                            </div>
                        </div>
                    </div>
                    </body>
                    </html>
                    ||||If you are getting paid to do a job, don't ask for help on it!||||

                    Comment

                    Working...
                    X