Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Trying to list directory contents with nice design
Old 05-20-2010, 09:04 PM Trying to list directory contents with nice design
Average Talker

Posts: 21
Name: Andrew
Trades: 0
Hi,
I have about 20GB worth of pdfs that I want to put on a site for my own personal use. I'd like to ideally read them in-browser (via google pdf reader or similar), but it is not necessary.
My challenge is actually getting all the books online without manually building each page (which is what I've done so far to put the mockup together).
Can I do some sort of opendirectory thing, but with a nice shell around it to avoid the crappy ugliness of a typical open directory?
Here's the current page:

I'd like to keep the same sort of design, but automate the building of each link.
I have no programming experience but I do have enough CSS and HTML knowledge to get a decent site up and running.
Thanks.
phobos2deimos is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-25-2010, 10:30 PM Re: Trying to list directory contents with nice design
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
I'd do it with PHP. Actually, I'm pretty sure that's the only option, but - since it looks like you have PHP up-and-running on your server, just insert some PHP code like this anywhere you want on the page:

PHP Code:
<?php
//The path to the directory you want to parse
$path 'books/';

$dir_handle opendir($path) or die("ERROR LISTING BOOKS");

//Loop
while (false !== ($file readdir($dir_handle))) {
   echo 
'<p>HTML FORMATTING! '.$file.'</p>';
}

closedir($dir_handle);
?>
That should work, just for listing the files. Of course, it'll just give you the barebones names of the files, not the nice looking name of the book or the author. There are ways to do that, but it gets a little complicated.
__________________
if($stevej == "helpful") { $talkupation += $user_power; }
stevej is offline
Reply With Quote
View Public Profile
 
Old 05-26-2010, 03:20 AM Re: Trying to list directory contents with nice design
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Be sure to monitor your bandwidth use, 20GB is alot of transfer.

Off topic, nice screenname, eve-online player? Just curious.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 06-18-2010, 07:30 PM Re: Trying to list directory contents with nice design
Average Talker

Posts: 21
Name: Andrew
Trades: 0
Thanks guys I'll try that.
My screen actually refers to the original Doom, as it takes place on Deimos.
phobos2deimos is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Trying to list directory contents with nice design
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.49844 seconds with 12 queries