MyBB Tutorials

RIP Protection

Submitted by zGeek, , Thread ID: 3270

Thread Closed
27-04-2015, 01:28 PM
This post was last modified: 27-04-2015, 01:36 PM by zGeek
#1
Hello!

I guess this is my first thread here and I'm not sure if this content is supposed to be posted here.
But anyway, this is NOT my content.

This tutorial is a simple guide explaining how you can stop amateur rippers from ripping your theme.
First, download this plugin; http://mods.mybb.com/view/imei-page-optimizer
Next, open the plugin in your preferred text editor.

Add the following code before function imeiPageOptimizer_info()

Code:
function stringToHex($string) {
      $hexString = '';
      for ($i=0; $i < strlen($string); $i++) {
        $hexString .= '%' . bin2hex($string[$i]);
      }
      return $hexString;
}

Search for the following line of code;

Code:
$report="<!-- optimization: ".round(100- $after*100/$before,2)."% by imeiPageOptimize in $time Seconds -->";

and replace it with;


Code:
$before = '<!DOCTYPE html><head><meta charset="utf-8" /><script>document.write(decodeURIComponent("';
$after2 = '"));</script></head><body><noscript>Please enable JavaScript before you use our forum. :)</noscript></body></html>';
$ret = $before.stringToHex($ret).$after2;


And there you have it, at the cost of hindering users that browse without JavaScript, you've made it pretty difficult for the average pleb to rip your theme.

NBB is having issues displaying the thread. Not sure why because it changes the code after being posted.

And it doesn't allow me to use Hide.

Users browsing this thread: 2 Guest(s)