Results 1 to 4 of 4

Thread: Makeover for your File Directories!

  1. #1
    Coastercraze's Avatar
    Coastercraze is offline Net Builder Legend
    Join Date
    Jan 2009
    Location
    Under powerlines
    Posts
    499
    Blog Entries
    3
    Thanks
    94
    Thanked 59 Times in 48 Posts

    Wink Makeover for your File Directories!

    If you ever want to turn your directories into this:
    Index of /images/cats/

    Insert this code into your .htaccess (make one if you don't already have one)
    Code:
    Options +Indexes
    ReadmeName /footer.shtml
    HeaderName /header.shtml
    Next, create two files, footer.shtml and header.shtml

    In header.shtml put this:
    Code:
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <title>Index of <!--#echo var="REQUEST_URI"--></title>
    <style>
    * {
        color: #CCC;
    }
    body {
        clear: both;
        width: 90%;
        margin: 0 auto;
        background: #181818;
    }
    .tbody { background: none; }
    #hDiv {
        float: left;
        width: auto;
        height: auto;
        display: inline;
        margin: 10px 50px;
    }
    .l {
        float: left;
        width: 8px;
        height: 44px;
        background: url() top left no-repeat;
    }
    .r {
        float: left;
        width: 8px;
        height: 44px;
        background: url() top right no-repeat;
    }
    h1 {
        float: left;
        color: #CCC;
        width: auto;
        height: 42px;
        margin: 0px; padding: 0px;
        background-color: #555;
        border-top: 1px solid #305C9F;
        border-bottom: 1px solid #305C9F;
    }
    p {
        color: #AF5B29;
        font-size: 14px;
        line-height: 1.2em;
    }
    tr:nth-child(even) {
        background: #5069AD top left repeat-x;
    }
    tr:nth-child(odd) {
        background: #2F4066 top left repeat-x;
    }
    th {
        border: none;
        background: none;
    }
    hr {
        height: 30px;
        display: none;
    }
    a {
        color: #CCC;
    }
    a:hover, a:active {
        color: #FFF;
    }
    a:link, a:visited {
        color: #CCC;
    }
    table {
        width: 100%;
        background-color: #305C9F;
    }
    td {
        text-align: center;
    }
    </style>
    </head>
    <body>
    <div id="hDiv">
    <div class="l"> </div>
    <h1>www.yoursite.com<!--#echo var="REQUEST_URI"--></h1>
    <div class="r"> </div>
    </div><br /><br />
    As you can tell this is very customizable. Tons of different CSS options around here. Even and odd are the rows (1 is odd 2 is even etc) l and r are left and right sides

    In your footer.shtml put this code:
    Code:
    <address style="position:relative;left:5px;"><!--#config timefmt="%Y"-->&copy; Your Site YEAR &ndash; <!--#echo var="DATE_LOCAL"--></address>
    </body>
    </html>
    Upload these to your site's root (public_html) and go to a directory on your site and see how it lists the files!

    Preview here:
    Index of /images/cats/
    Webmaster Forums
    Host Mist | Shared | Reseller | VPS | Dedicated
    Arcade Master - Rule the arcade!

  2. Thanked by:

    5starpix (31 January, 2010), Aquarezz (2 February, 2010), bogart (31 January, 2010)

  3. #2
    5starpix's Avatar
    5starpix is offline Senior Net Builder
    Join Date
    Dec 2008
    Location
    Montreal, Quebec
    Posts
    1,710
    Blog Entries
    9
    Thanks
    158
    Thanked 227 Times in 164 Posts
    That's quite nice actually We can even edit the colors

  4. #3
    MikeDVB is offline Unknown Net Builder
    Join Date
    May 2009
    Posts
    36
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Interesting... but I've always found it better to turn off indexing. I guess you could do it on a directory by directory basis if you wanted the contents visible.
    Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
    LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
    Incremental R1Soft CDP Backups on all services! Proudly hosting over 3,800 domains!
    http://www.mddhosting.com/ - New and improved VPS plans!

  5. #4
    Kovich's Avatar
    Kovich is offline Community Guardian
    Join Date
    Jan 2009
    Location
    Philadelphia, Pennsylvania
    Posts
    1,797
    Blog Entries
    30
    Thanks
    453
    Thanked 420 Times in 279 Posts
    I have a very interesting idea for this. Thanks for the code!

Similar Threads

  1. [WTS] PR1 File Mirror Site - Upload to 15 File Hosts
    By ChaoscripT in forum Sites
    Replies: 0
    Last Post: 26 September, 2010, 10:53 AM
  2. Digital Point has had a makeover
    By Sbfc_ in forum Community Building
    Replies: 13
    Last Post: 4 June, 2010, 06:41 AM
  3. Site Makeover!
    By Kovich in forum Site Reviews
    Replies: 12
    Last Post: 1 February, 2010, 00:04 AM
  4. Guard Tunnel gets a makeover! Please Review!
    By Zash in forum Site Reviews
    Replies: 6
    Last Post: 3 January, 2010, 03:05 AM
  5. Need a makeover !!
    By Soulzripper in forum Web Proxies
    Replies: 1
    Last Post: 10 September, 2009, 21:20 PM

Tags for this Thread

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
  •