Layout Module

Hi

As discussed in another post, I was developing a module to handle layout upload

Lately I have no more free time, so I’m posting here unfinished

The proposal is the following:

-I download of one these .zip layout from any free templates website and upload the whole .zip to the module (done)

-The module’s script removes any php / script or dangerous code (done)

-The next screen is a window in which you choose which areas are good for content (done)

-These areas will now contain a tag [content] as its content, that will be later, after save, replaced with actual php code (half done)

-It is then saved the .php file under /protected/views/layouts/user/{layout-id} and the images in /layouts/{layout-id} (done)

-It has a html / css editor to edit a layout ( after the edition it again removes any possible harmful code from it )(to be done)

-It also fix the css to point all images url to the right place (done)

But it’s unfinished like I said, with a lot of dependencies that I use in my base application, that may be useful for you

feel free to ask me anything, any doubt that you might have

hope you enjoy,

Cheers

** "application.views.layouts" must be writable

If interests you, here is a copy of it:

PS.: There’s method to use uploaded layouts:


$this->layout=LayoutModule::getLayoutAlias($id);

Thanks for sharing Gustavo. My Thumbs up for you.

Thanks for this great uploader code! :D

if i’d have time i’d love to take that in charge… really nice gustavo!

are you forgot about your comments!!!!