2008-11-05 posted in Wordpress and Blogging Tips

Most of the free Wordpress themes out there are having Creative Commons Attribute 2.0+ License. This means that you can modify the theme in anyway you want but you have to attribute the work in the manner specified by the author.

If you download the free WP themes from other sites using this type of license, you’ll notice that most of them have the footer section encrypted.

Many of you would like the freedom to change how the footer looks. With an encrypted footer, you can’t change things like adding a “Contact” link or an RSS button. You might also want to check whether there is no malicious code in the encryption.

The following is the screenshot of how the encrypted footer looks like:

This post shows you how to decrypt the footer encryption. The good thing is you DON’T need any decoding software nor programming skill in order to do that.

Sounds simple. Yes it is! Please follow the few steps below to remove the footer encryption:

Step 1
Open index.php
Find the include code for the footer. Normally, the footer include code shows like this:

<?php get_footer(); ?>

Step 2
Add this comment code on the top and bottom of the footer code:

<!--Footer code starts here-->

<?php get_footer(); ?>

<!--Footer code ends here-->

Save the file and upload it to the server.

Step 3
Load the theme in a browser. View the source code by clicking
View -> Source (If you view in IE) or
Ctrl + U (If you view in Firefox)

Step 4
The source code in between <!--Footer code starts here--> and <!--Footer code ends here--> is the source code for the footer.

Now, open footer.php and replace the encrypted code with the actual source code.

You can then start to modify the footer in anyway you want.

No matter what you modify, please make sure that you give the credits back to the author!

Author
This article is originally written by Brian L. You are free to redistribute this article but please link back to this page with this title: How to remove footer encryption?

Like this post? Please help share it via the following social sites. Your share keep us creating more useful posts.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
19 Responses
  1. Sam says:

    Thanks … you made my day !

  2. wordpress says:

    thanks but i wanna ask: do you get the rights from god to remove the links? did you create the themes? no no no no.

    • Brian says:

      This article is meant to explain ways to decrypt the footer ENCRYPTION. It is by no means encouraging people to remove the footer LINKS. As what the last sentence of this article says: “No matter what you modify, please make sure that you give the credits back to the author!”

  3. dennis says:

    Damn thank you so much, i really needed this!

  4. allan says:

    that was easy, its like removing windows activation found at my site. Thanks for that

  5. Grateful says:

    I ALWAYS include a link back to the designer. I feel it’s a small price to pay for their work but I really do want to use that real estate for my RSS and legal pages. THANK YOU you so much for this Brian!

  6. Steve says:

    This article is probably useful for most purposes, but it’s not really the same as “decrypting”. You’re just viewing the HTML output of the PHP code and replacing the PHP code with that. If you want to get the original PHP code, there’s another way. Technically, this code isn’t “encrypted”, it’s just compressed using the “deflate” algorithm and then encoded in a different character set (base-64). There are ways to actually encrypt PHP code, but this isn’t one of them. You can compress your own code this way by pasting your code into something like this:

    Keep in mind for the code samples: you need to replace Wordpress’ “smart” quotes with regular single and double quotes, or the code won’t run.

    echo base64_encode(gzdeflate('some code here'));

    That will output the encoded, compressed code, like this:

    K87PTVVIzk9JVchILUoFAA==

    To get the original code back, obviously you just go the other way (change character set, decompress):

    echo gzinflate(base64_decode('K87PTVVIzk9JVchILUoFAA=='));

    Here is a PHP script to do the unpacking for you. Save this script as a new PHP file and run it. You’ll see a box to paste the original code, which should be the entire contents of your file. e.g., paste all of this:

    <?php

    eval(gzinflate(base64_decode('K87PTVVIzk9JVchILUoFAA==')));

    ?>

    This is the script:

    <?php

    $orig = $unpack = '';

    if (isset($_POST['original']))
    {
    $orig = $_POST['original'];
    $code = trim(str_replace(array(”), ”, $orig));
    while (strtolower(substr($code, 0, 4)) == ‘eval’)
    {
    $code = str_replace(’eval’, ‘echo’, $code);
    ob_start();
    eval($code);
    $code = ob_get_contents();
    ob_end_clean();
    }

    $unpack = $code;
    }

    ?>
    <html>
    <body>
    <form method=”post”>
    Original:
    <textarea name=”original” rows=”10″ cols=”80″></textarea>
    <br><br><input type=”submit” value=”Unpack”>
    <br><br>Unpacked:
    <textarea name=”unpacked” rows=”10″ cols=”80″></textarea>
    </form>
    </body>
    </html>

  7. Steve says:

    It looks like one of the lines in the script above didn’t come through correctly. The line that uses trim should be removing the PHP tags as well.

    $code = trim(str_replace(array(”), ”, $orig));

    Hopefully that code makes it through the WP filter correctly. Remember to replace smart quotes with regular quotes (all quotes in the above line are single quotes).

  8. Steve says:

    I don’t think it’s going to want to write what the code is (is there a way to disable filters when I post a comment)? The point of that line is to replace the start and end PHP tags, and trim the result. One more try:

    $code = trim(str_replace(array(”), “”, $orig));

  9. Steve says:

    If the author of this article wants to send me an email I’ll be happy to provide the original code, but it looks like WordPress doesn’t want to keep what I type.

  10. Brian says:

    Here is the original code from Steve, thanks for sharing :D

    < ?php
    
    $orig = $unpack = '';
    
    if (isset($_POST['original']))
    {
     $orig = $_POST['original'];
     $code = trim(preg_replace(array(
      '/<\?php/mi',
      '/\?>/m',
      '/^\s*#.*$/m',
      '#^\s*//.*$#m',
      '#/\*.*?\*/#ms'
     ),
     '', $orig));
    
     if (strpos($code, 'eval') !== false)
     {
      $code = str_replace('eval', 'echo', $code);
      ob_start();
      eval($code);
      $code = ob_get_contents();
      ob_end_clean();
     }
    
     $unpack = str_replace(array(' ', "\n"), array(' ', ''), htmlentities($code));
    }
    
    ?>
    <html>
    <body>
    <form method="post">
    Original:
    <textarea name="original" rows="10" cols="80"><?php echo $orig; ?></textarea>
    <br><br><input type="submit" value="Unpack">
    <br><br>Unpacked:
    <div style="width: 800px; height: 300px; overflow: auto; border: 1px solid black; font-family: monospace;"><?php echo $unpack; ?></div>
    </form>
    </body>
    </html>
    
  11. Linda says:

    Excellent! That is the most coherent explanation of removing the encryption. I have been working on this for hours!

  12. Shravan says:

    Thanx. That really helped a lot.

  13. Awesome themes!

    I appreciate..

    • Brian says:

      Hi, please don’t remove my footer link ;(

      • Nikhil says:

        I just done as u said and replace the footer with the new code from the firefox browser but after doing that my footer is not displaying … can u help me pls !! WHAT I NEED TO DO NOW TO EDIT THE FOOTER AND TO VIEW THAT … go and view my blog getmag.co.cc

        • Brian says:

          Hi, there is something wrong with your footer. You place the </div> wrong place, and miss the <div style="clear: both;"></div>

          Btw, this theme seems to be released by ericulous.com and not a FREE theme. Do you have the rights to use and modify it? 8O

  14. Mike says:

    Hey, this worked like a charm and I just want to thank you :)

  15. scott says:

    You are awesome… great post!!!!!!!!!!!!!!!!!!!!!!!!

Please read if you are submitting Wordpress theme issues:
  • I will address functionality issues pertaining to the Wordpress themes. For other issues, I'll make your comments live and will address them whenever I have time while I also hope that other users can solve for you while waiting for my reply.
  • However, if you are kind enough to make a small donation, I'll give the first priority to resolve any of your issues. Simply donate to my Paypal via wpsubmit @ templatelite.com and specify your comment ID.
For the full detail of how I manage my theme support, click here.
Your comment will be moderated before it goes live.
Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>