I am trying to add a powered by link in footer in my own website that i developed. i tried a jquery method to check that this this link exist in footer or not.
In many open source template like wordpress, PHPBB Forum and MyBB Forum there is a link given in footer that we can't remove. actually i want to implement some thing like wordpress powered by link. if someone using my website script and he try to remove that link then website script shouldn't work properly.
I tried:
<strong>Powered By</strong><a id="poweredby" href="www.mysite.com">My Site Name</a>
<script>
var txt = $("#poweredby").text();
if(txt !="My Site Name" || $("#poweredby") == undefined){
$("body").css("display","none");
}
</script>
above code can easily change or remove. is there any way to protect our template from copying?
Everybody who can view your site or template can take it and change it. Besides to prohibit the use of your template there is only the way of obfuscation.
This will increase the effort one have make in order to work with you template.
Read the answer to tools for obfuscating html and css.