Creating a new Theme for Virtualmin.


I was thinking of changing the Virtualmin Main Page for server owners.

What i was thinking was to replace the buttons like creat mail alias / Edit Mail users etc etc with some nice images and move it on the top of the page so that its easily accesible. Any suggestion / Ideas what file i should mess around with and how i can make it into a theme ?

Hey Faisal,Sounds like some good ideas. Unfortunately, buttons can’t easily be moved without changing the actual module layout code for that page–though they can be made to look different using CSS.But to answer your question (just in case you have other ideas for modifications that [em]can[/em] be themed easily), start by copying a theme you like. Our default theme is “virtualmin-nuvola”, so you’d:cd /usr/libexec/webmincp -a virtualmin-nuvola my-new-themeAnd then modify the name of the theme:cd my-new-themevi theme.infoThe first thing to change is:desc=Virtualmin, Inc. Nuvola Themebrand=<img src=“images/virtualminlogo.png” border=0 alt=“”></img>brand_url= can just delete the brand_ stuff, or replace it with your own. The desc field is the name of the theme as displayed in the dropdown in the theme selection page.Now, you can tweak as much or as little as you like. Replacing icons can be done by dropping the appropriate image into the module-name/images/icon-name.gif file. HTML can be modified by editing the, CSS in the style.css file, the Webmin index page in index.cgi, and the login page in session_login.cgi.It’s worth noting that some of the older modules in Webmin have not been converted to using the ui_ functions, and so themes won’t have control over the HTML elements in those modules. Jamie’s been recoding to ui_ functions whenever he spends time with an old module, so every release brings more theme-ability. Of course, if there’s a module you really want theme-control over, I’ll be happy to help point you in the right direction on converting it to ui_ usage rather than the old HTML-inline behavior. (You probably won’t need to do this in most of the Virtualmin-related modules, though.)In the not too distant future, the core Virtualmin modules will get some attention by me to make them fully CSS controllable, so that arbitrary element positioning will be possible in themes. This is just the beginning of theme-related work I’ll be tackling once I’ve gotten the Early Adopter period wrapped up and a stable platform-neutral system to work with. The current Virtualmin Nuvola theme, as nice as it is (primarily due to David Vignoni’s gorgeous icons), is only the beginning!

Was there ever any themes created for Virtualmin Pro?

Hey Johnny,

The second generation of the Nuvola theme has been around for quite some time in the form of the Virtualmin Framed Theme.

I’m now in the midst of the third re-write, which will take us further towards best practices in most UI areas, increase the speed of the UI through AJAX techniques, and make it look nicer and easier to customize. This will include some core Webmin work to make generating menus, like the left-menu in the Virtualmin framed theme, a standard UI function rather than a custom bit in the theme. That’ll hopefully encourage folks to dive in and make new versions of the Virtualmin themes…right now, there’s an awful lot of code in the theme, where it should really be nearly all GUI layout.

So, to answer your question: Nothing new since the Virtualmin Framed theme. But I’m working hard on the next generation version.

Hi there
I am interesting in modify the theme layout and button etc, I have trouble finding it as you said it located in /usr/libexec/webmincp?

I got the latest version of Virtualmin and Ubuntu Server 8.04 LTS and would like to change the theme to suit my taste.

Kind Regards

Well, two problems… the post that mentioned that path was made way back in 2005, and things are also a bit different on Ubuntu :wink:

Take a peek in /usr/share/webmin/virtual-server-theme/, the files in there should do the trick for you.