View Full Version : PHP code for navigation
James Glasheen
12th Oct 2004, 11:57 am
Hi David, you mentioned the php code that identifies a new file in your folder on a web server and automatically adds it to the navigation of the site.
Can I have a look at it please.
Can you control where in the navigation the new file sits base on an alphabetic structure or more random one? Also can you built a timer into it to enable a sign off process to be closed before the public see it?
Thank you in advance
David
12th Oct 2004, 08:43 pm
James - there are a number of good free PHP directory listing scripts out there. I used a very simple one called Lophty indexer (http://dev.lophty.com/indexer/). I modified it a bit so that it looked just the way I wanted it. You can see it in action on the Bentley School site here (http://www.bentleyschool.co.uk/information/letters.php).
You should also check out snif (http://www.bitfolge.de/snif-en.html) (simple and nice index file) and DigiOz Directory Indexer (http://www.digioz.com/indexer/index.php). They both offer more features than Lophty - sorting files by date, size or alpha.
As for a time delay - well you could hack one of the above scripts so that it only showed the file when the time reaches x hours/days after the file modified time. I'm not aware of anything that will do this "off the peg". Why do you need to do that anyway?
Later...
here's another directory listing script (http://evoluted.net/archives/000031.php) I just came across. Looks good. And another called Total Index (http://www.sweetphp.com/nuke/modules.php?name=Script_Preview&script=3) - this may be the best of the bunch in terms of flexibility/functionality but the interface needs a bit of work.
James Glasheen
14th Oct 2004, 12:31 pm
Thanks David, I'll have a look at these. You'll probably see them on the TWKK site soon.
I've noticed you haven't accredited the owner of the code. Bit naughtly isn't it!
David
14th Oct 2004, 06:40 pm
Originally posted by James Glasheen@Oct 14 2004, 12:31 pm
I've noticed you haven't accredited the owner of the code. Bit naughtly isn't it!
Well I thought hard about that and came to the conclusion that it would look too distracting on the page so I made a point of hightlighting the credit in the code. I know that's not the same but this particular script didn't have a displayed credit anyway. I don't feel too bad about it - I always include credits when they are asked for.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.