-
-
CommentAuthorgnome
- CommentTimeMay 17th 2008 edited by gnome on the 17th May 2008 at 23:55:16 EDT
I have been working on a CMS for quite a while, with some pretty low goals:- Allow the entire site's layout to be changed with a single file being edited
- Build the entire CMS in a single index.php file
- Have the CMS know how to build up links with directory listings
-
-
- CommentAuthorfernbap
- CommentTimeMay 17th 2008
What i can tell you is about my own CMS, LightNEasy.
It is driven by a single XHTML and CSS file, where you input some markers to tell the CMS where to output the contents.
LightNEasy has also some built-in modules, like a gallery, a news module, links and downloads. All modules output format comes from a single general css file.
You change the entire site layout by changing the html/css file.
Taking into account making a light and SE friendly website, each of the pages create a php file, with the page name, that relies on a small runtime module to fetch the contents and insert them in the layout.
Perhaps you can get some ideas from it.
Btw, i started making it under the "single file CMS" concept. That concept proved wrong, and LightNEasy is no longer a "single file CMS". -
- CommentAuthordedide
- CommentTimeMay 17th 2008 edited by dedide on the 17th May 2008 at 23:15:18 EDT
fernbap,
I love your CMS - bakies to you
-
- CommentAuthorfernbap
- CommentTimeMay 17th 2008
Thank you
Nice to know my work is appreciated -
-
CommentAuthorgnome
- CommentTimeMay 18th 2008
fernbap: Do you know how fast or slow a site will run if each pageload involves 1 to 5 directory listing calls? -
-
- CommentAuthorfernbap
- CommentTimeMay 18th 2008
it's rather fast. Besides, the webserver has its own cache, so it can be virtually instantaneous.
I found this great little function that i'm using, and that performs everything you will ever need, including returning sorted directory listings: preg_find(). I just include it and call it whenever i need. -
- CommentAuthorpgregg
- CommentTimeMay 19th 2008
Thanks to fernbap for the reference.
The following page might also be of user - explains, with examples, how to use preg_find() - http://www.pgregg.com/forums/viewtopic.php?tid=73
Speedwise, reading directory contents is fairly expensive, especially on larger directories, and if you are going recursive. If that is the case, I'd recommend using serialize() on the result and caching the result of the preg_find for 5-60 minutes (choose your own acceptable update rate), and depending on the age of your cache file, read or refresh as necessary.
Regards,
PG -
-
CommentAuthorgnome
- CommentTimeMay 19th 2008
Okay. I'll work on that. Thanks! -
1 to 8 of 8
