Page 1 of 1

Some advance file manipulation

Posted: Fri Nov 20, 2009 5:29 pm
by Monotoko
Hello there :)

I have quite a problem here, at the moment, we have an theme editing system which is quite basic, it gets the entire file, and puts it into a text box, which allows you to edit the theme, you save, and your done.

I need something slightly more advance, but im unsure how to go about it.

Basically, i have identified each theme as having the following:
~Header
~Main
~Sidebar
~Footer

The main and sidebar can be in a differant order, depending on whether the sidebar is at the left or the right...

I would like to modulate the sidebar, because the things on it are usually about the same:
~Pages
~Departments
etc

now the modulating, i can handle, i just need to make several PHP files instead of one, but it also needs to be flexable, so the user should easily be able to change the order of the sidebar, to put anything they like at the top, next, etc

i would then also need to do the same with the main section...

Is there anything in PHP which would allow me to identify which parts are which, which are there and which arnt...then allow the user to modify there order?

The idea im leaning towards at the moment is use one big file, but when its being edited, break it down, then build the big file after the editing is completed, but i dont know how i would order that..

Re: Some advance file manipulation

Posted: Fri Nov 20, 2009 10:19 pm
by BlaineSch
You can either save them as multiple files or put something in their to identify the parts and explode it.