Ubuntu 11.04 Colour Scheme

Once again the problem of an ugly colour scheme returned. Instead of a sleek looking theme, I got the root theme which looks like it came out of Windows 10 years ago.

A Google search with the keywords “virtualbox ubuntu 11.04 ugly theme” led me to a Ubuntu forums thread with a link to the Virtualbox forums.

Here’s the solution which worked.

Open a terminal window, go to your home folder (don't forget that) and type:

sudo gedit .gtkrc-2.0 (DO NOT forget the dot in the beginning of the filename)
Type your password and when gedit opens copy/paste the following two entries in that new file.

include "/usr/share/themes/Ambiance/gtk-2.0/gtkrc"
gtk-icon-theme-name = "ubuntu-mono-dark"

The second line will fix the icons in Nautilus.
Save the file, close gedit and restart your VM and...
Advertisements

Custom Sermon Upload Interface

The main content of the sermon custom post type is the link to the MP3 file. When the post is displayed on the main webpage, it also uses an audio player plugin to get a cool flash based player right in the post itself. This is done from the backend with a shortcode. Other than the actual link to the uploaded MP3 file, the content should be identical.

Of course, this is best done by getting rid of the default editor, which leaves plenty of room for user error. I replaced the whole thing with a couple of meta boxes. However, editor support for the post is still needed. The trick is to use CSS to hide the editor interface, not to remove support for it entirely. I’ve explained this in a previous post titled “Hiding the Editor“.

The main interface now consists of just 2 meta boxes, one for the scripture text and the other for file upload. How to create a file upload meta box was explained in my previous post on Newsletter Creation.

All the user has to do now is to fill in all the boxes correctly and check the correct taxonomy items. The save() function from the meta box class will handle all the file processing and automatically generate the correct post content to get the desired output.

Since the same code handles both the sermons and the newsletters for both the English and the Chinese sites, it has to differentiate them all by the filename. Sermons get the audio shortcode and link in the post content, while newsletters are added by attaching them to the post. The theme files will then handle the display of newsletters. Although they can both be done by putting the data in post content, I hadn’t figured out how to hide the editor when I did newsletters, so I had to remove editor support and work around it by using the theme to display the metadata properly. This would have been unlikely to work for the audio plugin which uses a shortcode.

There is now a simple interface for adding both sermons and newsletter post types!