Imad Posted May 10, 2008 Share Posted May 10, 2008 Hi guys, I'm trying to create an experimental theme manager. All the themes have their own folder in the themes folder. How can I be able to have each directory opened and have their details shown? For example, let's say I added another theme to the themes folder, when I visit the page to view all the avialable themes, I want their details to be shown. Furthermore, I just want to know how I can get all the folders in the theme folder opened. Thanks in advanced. Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted May 10, 2008 Share Posted May 10, 2008 save the theme details in a mysql database Quote Link to comment Share on other sites More sharing options...
Imad Posted May 10, 2008 Author Share Posted May 10, 2008 save the theme details in a mysql database That would be a problem, since the directories need to be detected first, theirs no way I can store it in a database until the directories are detected first. Once the directories are detected, they need to be automatically opened to locate the info.php file and bring back the info in it. I'll play around to see what I can get. Kind Regards. Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted May 10, 2008 Share Posted May 10, 2008 why not use an uplaod form to insert the themes into the correct folder then on the upload form insert the details into the mysql database Quote Link to comment Share on other sites More sharing options...
Imad Posted May 10, 2008 Author Share Posted May 10, 2008 I could, but since each theme directory has an images directory, stylesheet, and others, they would need to zip it, then I need to have it extract the file which would be a longer process. I'm trying to do something like the Wordpress themes installation. Where you'd put a theme into the themes directory and visit the themes manager in the admin panel, and there it is with its details. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted May 10, 2008 Share Posted May 10, 2008 You can use the glob() function with a wild-card that matches the folder names or use the GLOB_ONLYDIR second parameter to get a list of folder names. Quote Link to comment Share on other sites More sharing options...
Imad Posted May 10, 2008 Author Share Posted May 10, 2008 Thanks for your help guys, I managed to create it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.