Encrypted Wordpress Themes

January 10th, 2009

I was checking out a Wordpress template for a client who wanted to use it for one of their sites. When I came to the footer.php file, I noticed that the entire file consisted of a block of text in the following format:

eval(gzinflate(str_rot13(base64_decode('FZrHEo...'))));

I suppose that template authors do this to protect the footer ‘Designed by’ references to their own site, which is fair enough. However, as would generally be the case, I wanted to see the unencrypted PHP code to ensure that nothing malicious was happening within it. Also, in this case, a significant portion of design code was contained within this encrypted code, and I wanted to modify the design a bit.

Decryption code for this type of stuff is common, and a google search will give you ample results.

One great online decoder I found is here: http://josh.thespiffylife.com/decrypt.php

Structured Blogging Wordpress Plugin

January 1st, 2009

I have just come across this neat Wordpress plugin called Structured Blogging, which I think is so cool that I needed to post about it.

removing www using .htaccess

November 19th, 2008

I was looking to change the way my personal website at simondalfonso.id.au is accessed. Currently, both http://www.simondalfonso.id.au and http://simondalfonso.id.au work separately. I wanted to change it so that the www version re-directs to the non-www version, in effect removing the www prefix (See here for some history on the topic).

The following piece of code added to a .htaccess file achieves this nicely:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Adding Extra Default Available Wordpress Widgets

October 26th, 2008

Today I was working on my band’s website, which is based on Wordpress. The site contains two different sidebars, 1 and 2. I encountered a problem when after I added the Search sidebar widget to sidebar 1, it was ‘used up’ and I could not add it to sidebar 2 also. After some brief searching and thinking, I realised what I could do.

Read the rest of this entry »

Customising Wordpress Comments

October 24th, 2008

I recently started working on a review site based on Wordpress. It was clear that the easiest way to achieve review functionality was to use the Wordpress comment system. Basically, items were added to the site as posts, and post comments would serve as reviews for the items.

Having made the decision to use the comment system, I needed to then add some extra fields to the comment form, which would accept pieces of information that were part of the reviews. I searched around briefly for some information on the web regarding how to modify the Wordpress comment system, but could not find much, hence I have written the following short account of how to add custom field to the Wordpress comment system.

Read the rest of this entry »