Roundcube Community Forum

 

Simple Patch to Create Three Column Layout (0.5.3)

Started by Jaime_Pomales, July 16, 2011, 02:39:44 PM

Previous topic - Next topic

Jaime_Pomales

I mucked around with the templates/mail.html and mail.css files until I got a nice three column layout with sensible defaults.  The changes are pretty simple and it seems to work pretty well.  I think it's the smallest set of changes that one has to make in order to realign the default theme into three columns.

Edit: Fixed #mailcontframe to include a width: 100% when preview is turned off

[ATTACH=CONFIG]1694[/ATTACH]

justinhearn

#1
Hi. I'm having some trouble applying the patch and wonder if you could please post the complete mail.css and mail.html files? Thanks.

Oops - my mistake. Put the parameters in the right order and it worked:

patch mail.css mail.css.patch
patch mail.html mail.html.patch

Thanks very much for your work on this. I have been looking for this layout for our schools for some time. God bless. Justin

Jaime_Pomales

Cool, glad you got it working.

For anyone else having trouble you can apply the patches thusly:

Place the patches in the roundcube/skins/ directory and run:

patch -p0 < mail.css.patch
patch -p0 < mail.html.patch

And you're good to go.

I did it as a patch so that in the future I (we) can modify and keep abreast of just those things that changed.  Being able to see and track the differences within those two key files makes updating for new versions of Roundcube much easier.  I've been testing Roundcube for years, and only this year decided to make the switch from Squirrelmail.  I'll continue to issue update patches for this particular layout as the versions roll forward.  So stay tuned.

rcubefan

Is the user able to switch between 2 and 3 column layout at will, such as from preferences, after applying the patch?

Jaime_Pomales

No, it's meant to be a separate theme.  Just copy the default theme (renaming to 3-col-layout or similar), then apply the patch.  Of course you can switch back to the default theme from your preferences.

Jaime_Pomales

Actually scratch that.  I created this patch against the default directory under skins.  So here would be the procedure to end up with two skins (one default and one three col layout).

cp -a default default.bak
patch -p0 patch -p0 mv default three-column
mv default.bak default

And you are done.  You will have two directories under skins, one "default" and one patched "three-column"

bosse

awesome!

the patch works pretty well for me. Thanks a lot!
Would it be allowed to use the three column style code for another skin?
I would like to create a new three column theme in future and id like to use your code!

cheers bosse

Jaime_Pomales

Sure no problem.  I'll license it under the default license of roundcube (GPL) to keep it simple.  If it (default skin) becomes the basis of another skin, it too obviously needs to be GPL.  If it becomes the base for a for pay skin, of course source code must be provided.

Jaime_Pomales

With the 0.5.4 release, there are no changes to the default skin.  As such, these patches are good for 0.5.3 and 0.5.4 as they are.

Jaime_Pomales

#9
There were extensive changes to the default theme, a lot with regard to the new contacts manager.  As such, this theme no longer works.  So here is a new upload, this time, I decided to just wrap the whole thing up in a zip file.  I got quite a few questions about the patches, so I decided to make this easier and just wrap it all up in a turnkey skin.  Unzip it in your skins directory and you are good to go.

So without further ado, here is the three column roundcube based on the fresh shiny 0.6.

[ATTACH=CONFIG]1789[/ATTACH]