Getting Folders in A Directory |
[eluser]Matt Egan[/eluser]
I'm not sure this is possible with one of Codeigniter's built in File helper, but correct me if I'm wrong... If I could extend the file helper, that'd be cool too.. So, I'm coming along really really well on my blog platform, (Working name, Codepress), and I'm trying to implement a simple theming system, for now, I know for a fact that my html has plenty of handles for the blog to be styled a lot of different ways. So right now, I'm just interested in having a user created css file that can be loaded. In my config table one of the entries is a theme name, for right now, I want that theme name to be the name of the folder that the .css file is stored in. This means the name of the theme is the same as the folder name. This means that I can load my theme simpily by... Code: @import url(<?php echo base_url(); ?>content/themes/<?php echo $this->Blogmodel->get_config('theme_folder', false); ?>/styles.css); Ok, lets get down to what I want to do. Somehow, though php, I need to get the name of all the folders in my "themes" directory, so when I update the config table, I can just dump the name of the selected folder in the drop-down into the table. I'm thinking it may just be easier just to have there be a text file in each theme folder storing theme data (name, etc.). I think this would allow names with spaces and allow for other things to be displayed about the theme. Thoughts? Thanks for your help guys. Oh, btw, you can find a demo here. It was the product of time in between my classes as a high school freshmen (I'm only 14 ![]() |
Messages In This Thread |
Getting Folders in A Directory - by El Forum - 03-23-2009, 07:05 PM
Getting Folders in A Directory - by El Forum - 03-23-2009, 07:23 PM
Getting Folders in A Directory - by El Forum - 03-23-2009, 07:27 PM
Getting Folders in A Directory - by El Forum - 03-23-2009, 07:28 PM
Getting Folders in A Directory - by El Forum - 03-23-2009, 07:59 PM
Getting Folders in A Directory - by El Forum - 03-23-2009, 08:06 PM
Getting Folders in A Directory - by El Forum - 03-24-2009, 06:47 PM
Getting Folders in A Directory - by El Forum - 03-24-2009, 07:02 PM
|