treehouse : what would you like to learn today?
Web Design Web Development iOS Development

how can i protect my template from thiefs ...?

  • i designed many template any themes for wordpress and i want to distribute it with my rules , so i need to protect it from theifs ,,

    i need to make a template working on specified sites thats buying it from me ..

    how can i do that ...
  • You would need to license your themes. Try http://creativecommons.org/
  • A good thief doesn't care anything about licenses. ;)

    I'd say you can't fully protect your code, since it's all so open source. But your actual templates are not visible on the web anyways -- only the processed versions of it, after they have been parsed. So basically, only the resulting HTML code is visible, and not the source .PHP templates.

    I think...?
  • If someone chooses to ignore the licencing rules they are obviously subject to penalties if he has the resources to both track them down and enforce any judgement.

    Frankly, it seems to me that he'd be better off selling them through someone like Themeforest or the like. At least he'd be assured of getting paid.

    I don't there is anything you can code that would stop them using an unlicensed copy though.
  • @Paulie_D summarized it well.
  • my idea that i working on it now is to make a code that will ba generated from a program that i made , then when any clients apply for a template the program generate a code on somewhere in some files that will be confirmed by another function i added it on the template files ..

    the generated code include :

    - client site .
    - starting date ,
    - id number , he can get it by us ..





    but also it is not fully protected ...



    my friend suggest me to apply a trick with generating code, by replacing the most comment function i used in a code ...



    like :


    function encode($file)
    {
    $func = array(
    'fopen',
    'class',
    'echo',
    'if',
    'else',
    'elseif',
    'for',
    'while',
    'foreach',
    'function',
    'include',
    'print',
    'eval',
    'file_get_contents',
    );


    $enc = array(
    '#30#',
    '#31#',
    '#32#',
    '#33#',
    '#34#',
    '#35#',
    '#36#',
    '#37#',
    '#38#',
    '#39#',
    '#40#',
    '#41#',
    '#42#',
    '#43#',
    );


    $str = array(
    ';',
    '"',
    '\'',
    '==',
    '=',
    '===',
    '>',
    '>=',
    '<=',
    '!',
    '!=',
    'and',
    'or',
    'xor',


    '||',
    '&&',
    '{',
    '}',

    );


    $str2 = array(
    '(ح)',
    '(ا)',
    '(ز)',
    '(م)',
    '(ع)',
    '(ل)',
    '(ي)',
    '#100#',
    '#101#',
    '#102#',
    '#103#',
    '#104#',
    '#mcvh#',
    '#ZZZ#',
    '^>>^',
    '~<<~',
    '>?":',
    'dfd :?>',

    );


    $out =preg_replace('/\<\?|\<\?php|\?\>/',NULL,file_get_contents($file)) ;
    $out =str_replace($func,$enc,$out ) ;
    $out =str_replace($str,$str2,$out) ;
    $out =preg_replace('#\$([a-zA-Z0-9]+)#',"@$1@",$out) ;

    $op=fopen("$file",w);
    fwrite($op,$out);
    fclose($op);
    }


    then call :


    encode("file path");
  • Not a good idea in my opinion. I mean that in the least offensive way possible.

    What you are trying to do is absolutely justifiable and good, but unfortunately thieves will always steal it if they want it enough.

    You will end up making it harder to maintain for yourself and others.

    Just do your best to create beautiful themes and pay the bills ;)
  • In the Sitepoint book 'Build Your own Wicked Wordpress Themes', Jeffrey Way -- who ran ThemeForest for two years -- says: "Piracy is simply a cost that must be factored into the equation...While it does help to send takedown notices to sites like RapidShare, you'll never win this battle." There's more, which basically boils down to: if you want people to pay, you need to offer outstanding documentation and support that they won't get with a pirated version.