Creating new Virtualmin theme

I’ve already taken the framed theme code and copied it to work with it… I want to pull out as much of the logic as possible and have it referenced from other files within my theme that way I’ll have a kind of poor mans theme framework to use. Until of course the virtual min team finally pulls all the logic out and vm becomes theme able although I can certainly sympathize with how much work this is going to be. For now though I’ll start with a smaller goal if I need to really start migrating everything to separate logic and theme-ing then I’ll do that. Most of that is fairly benign just monotonous in nature. However I did want to consider adding some web 2.0 elements and of course degrade gracefully.

Stuff like box-shadow and border-radius perhaps other small tweaks to give the panel a little more eye candy and make it look like it belongs to my business rather than just being an add-on. Of course none of the copyrighting will change because I’m very proud to be a virtualmin user. It’s way better than cpanel the only thing that cpanel really has going for it is looks although I’m not going to necessarily be going with the whole icon grid thing either.

I’m thinking a sprucing up of the bordering throwing some box shadow on the left and right containers moving the buttons to be a part of their respective container instead of outside it. Perhaps creating icons for form buttons and making them look more like a part of the panel rather than a means to an end.

I’ll be doing this over the next few weeks I’ll remember to post my findings and samples as I get along. Already did some basic css re-writes in firebug and I think it’s going to work fine for what I want to do. I really have no interest in moving much of anything around except that the form buttons IMHO should be part of the container the form resides in as much as possible. Unless it’s a collapsing container then the buttons should have their own container that fits in with the theme not necessarily with a header just a simple div that carries same color as the other containers. Has the same bordering etc. Perhaps take the menu’s from being text based to a bigger font with some kind of background for each with selected states and so forth.

Well I’m almost through modifying it with one exception that being I don’t know how to change the login forms doctype I tried creating a theme_header function but I don’t know what I need in it as Virtualmin framed just uses the standard function and all I wanted to do was output a different doctype. Had it outputting a different doctype and then it removed all the tables from the theme. Changed index.cgi to have my new doctype and that works everywhere except the login form. And I still need to move the form buttons around but that should be some actual search and replace work. I just need to write a regex to find the buttons that appear outside their containers which their aren’t all that many.

Never mind got it finally I was replicating too much of the code, It was puzzling because I thought just replicating the function would do it. Then I had a look at the hook used to import custom header and went derp no reason to search for a theme header and I didn’t need the page capture call. I’m not exactly good at perl its odd because it’s very much like php (which is perl hypertext processor) but I digress eventually I hope to get a hold of all the subtle differences between the two. Although the gap isn’t nearly as big as say the differences between java and javascript.

Finished the theme, does usermin use a different set of theme files? or is it safe to copy over the same theme?


This really sounds like a Jamie or Joe question.

Perhaps this reference may be of assistance though:

Best Regards, Peter Knowles TPN Solutions

P: 604-782-9342