Ok, I am sure this is really simple for all of you, but I have very little experience with php. I haven't sat down to learn php yet, but I will when I have more free time. In the meantime I have the following issue:
The site is http://astoryaday.fromyay.com/
I have all the stories in the /stories/ directory, all named 20110504.html, 201105005.html, etc. Every day I write another story, I name it following that pattern, and drop it into the /stories/ folder.
I only want the newest story displayed on the page. So I wrote a little script that is:
<?php
$files = glob("stories/*.html");
sort($files);
$newest = array_pop($files);
include($newest);
?>
Now, what I want to do, is in the footer, put an Archive that will look like this:
-2012
--January
---03
---02
---01
-2011
--December
---31
---30
And upon clicking on the dates, the story from that day will replace the story that is currently included.
Any help of how to get this done would be appreciated!
Thanks