I was curious if there is a to display on your page the most recently updated pages without the use of RSS. The page I run isn't a blog or a forum, its an internal company site. About 30 odd people have access and its mostly used for the use of linking to documents and meeting minutes and the like. Everything I have found so far on this subject either is about blogging, forums, or setting up an RSS feed. I think RSS would be a little over the top based on how many people have access to the site, so I'm looking for an alternative.
Long story short, I need a way to link just the most recent updated pages w/o an RSS, and the site I use isn't a blog of forum.
You could run a periodic scheduled task to scan the site's folder tree and collect a list of n pages with the most recent time stamp. That list could then be used to create a little page with a list of links to those n pages, which could be included on pages as needed with some server side include technique.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Thanks for the reply. Do you think it would be possible to use all PHP functions to check the get_last_mod for each page, or will I be forced to use a server task (unix= to me)?
PHP will work as a scripting language but I don't think you want to do this on demand as each page loads.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Well it won't be on the homepage. I have a javascript menu that will link to a recent updates page. On the page I will either have the PHP script directly on there, or have it include a seperate PHP files that would output the links. Or make it on the click of the menu button have it runt he script, load the page, then output the source, but thats alot of intertwined code. Eventually I want to be able to label each recent update with the PHP and then have a child menu that will echo each page. Actually thats what my boss wants, a dynamic menu link with recent page updates.
Give it a shot. I don't know how fast PHP is at doing file system scans, though, so you may still want to build that page in a background batch job at a suitable interval.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Bookmarks