Jump to content

Automaited Webpage Construction


Island
 Share

Recommended Posts

I am new to web site design and administration. I am pretty much teaching myself with a little help here and there from people I can ask questions of via IM.I am currently using Dreamweaver MX 2004. I am also attempting to utilize CSS. I have a large site to put up. I have managed to struggle through creating the main pages and so on. Now I am starting on what I refer to as the "content pages". I have a basic template but...I have a collection of information that I want to put on the web for free. I have between 3500 and 4000 MS Word Docs (.doc) that range from 1 one to 10 pages long with a variety of fonts and some graphics imbedded. The documents brake down into about 50 or 60 categories and as many sub categories. I will also need to add a lot more at a later date.What I really need to know is: Is there a way to "generate" web pages either automatically or semi automatically? This would take me forever to make page at a time and do the links by hand.I need something quick and easy but I am not sure that I want to go down the database route. I am hoping that one of you brains out there can tell me there is a tool or technique that will work from a webpage-template and a directory/file structure and auto create the pages. If not than at least something that is low in pain.Keep in mind that I am doing this on a budget and that I am not and don't really want to or have time to become a full time professional webmaster... I just want to share some information and add more as time goes by.Thanks,Island

Link to comment
Share on other sites

I think that's what Different CMS(Content Management System)s are used for. Only to share a lot of information without any more "detailed" needs for desingn, functionality and so on.If you do need to have your own design and functionality, you could use Server Side Scripting to select and include the content of specific HTML inside the current page by using a GET variable to select the proper content.Considering that you just want to share information, it might be better to go with the CMS solution though.

Link to comment
Share on other sites

OK, I worked this out by modifying a PHP counter file:this takes three files, one of which you should already have.the first, which you should have already, is the one that goes there. al you have to do is add this code for each link:

<form action="add_documents.php" method="post"><input type="hidden" name="file" value="content.txt"/><a href="javascript:submit()">the first file</a></form>

you can change the value of the hidden input to change the file.next, you have the file that recieves the data: (which you must name add_documents.php)

<?php// Open the file for reading$filename=$_POST["file"];$fp = fopen($filename, "r");// Get the contents$contents = fread($fp, 1024);// Close the filefclose($fp);// display contentsecho $contents;?>

this code does not need any editing, just put it inside your page where you want the content to show up.last of all, you must have the content file that corresponds with the filename in the first code snippet. if you want html tags inside the content, the file must have that.I'm sorry, I don't have a web host yet or I would post a link. :) let me know if it works. (it worked for me! :) )LGEdit: and if you want to name the file something else, change the form action.Edit2:forgot to say, you must have a PHP enabled server, and since PHP is a server-side scripting laguage, it will only work on a server, not just viewing on your computer.

Link to comment
Share on other sites

I'm thinking a CMS, if not you'll need to build a database, and 3500 to 4000 files will not be easy to organize... are you being paid for this work?

Link to comment
Share on other sites

No, I am not being paid for this -although I wish I were. The down side is that I'd be paying myself... This information is stuff that I have collected and written over the years. I don't intend to charge a fee of any type for it, althougth some friends keep telling me "to help with the costs put some affiliate links / ads on for something related to the information" er something like that. I don't expect to make anything on it though.I am open to just about any practical suggestion / solution to this task.The CMS idea sounds good and I am investigating that now. I was amazed to see so many free or low cost CMS systems on the Internet. I started with CNET, ZDNET and Google searches and went from there. I will download a hand full, see what they are like and post my findings here with a list of the products that I find. I figure that there are more than likely others that may benefit from this message thread too.I'll keep little goat's PHP information for later as it sounds like something that could be very much of use too. If this works easy enough I suspect that the number of files / pages that I post may expand rapidly. I have always been a bit of a information junkie. The 3500-4000 that I mentioned is just the tip of the proverbial iceberg. Thanks, Island

Link to comment
Share on other sites

Wow, you must really enjoy writing, not just information. That's awesome.I'd love to be know which CMS you choose, and why. You should write a comparison between some popular CMSs and give us the link.

Link to comment
Share on other sites

Use this script:It is every easy to use, you upload all you files to a folder.The insert this php, point to the folder with the files. and it will make the pages.It will make links to its else but change the data in the body:Links Script:

<?php// This would go in a nav bar or something...// Go to data$filename= "/location/to/folder/with/data/";// Open the folder$dir = opendir("$filename");// Read the folderwhile(false != ($file = readdir($dir))){// Find all files	if(($file != ".") and ($file != ".."))	{// make a link to every file!  $tempfile = explode('.', $file);  print "<a href='index.php?page=$tempfile[0]'>$tempfile[0]</a><br />";	}}?>

This would go in the body

<?php//This would go in the body of the document (where you want the text)...//Get the page you want to see$page = $_GET['page'];if($page == null){print "Please click a link to view a page<br />This is really the first page they will see, you should add the beginning page here.";}else{//you will need to put the document ext in for ext (2 lines down)!// Display the pageinclude "/location/to/folder/with/data/$page.ext";}?>

If you point to word documents You will get some junk at the start and end of the files being included.

Link to comment
Share on other sites

I wonder if some blogging software maybe an easier, more simplified approach to your problem.If your content is taking a relatively consistant form with the word doc as an attachment, I am not sure you really need as much flexibility as full blown CMS would give you.just my $0.02 - check out some blogging applications to see if they have enough functionality for you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...