Question

I want to put an footer credit in my website template Like :- My Website Name Is it possible by any javascrip or php so that no one can edit or delete or no one can hide it by commenting it .if they do so , they should be redirected to my website.

Was it helpful?

Solution

Using javascript, this would be posibble, but the client could remove the javascript too:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function()
{
 if($("#mycredit").attr("href")!="http://www.keyyard.blogspot.com/")
 {
  window.location.href="link_to_your_site";
 }

});
//]]>
</script>

OTHER TIPS

If you are giving them the template code and markup, then no, there's no practical way to do this, as they have the code and markup at their disposal to change.

This is a legal issue rather than a technology issue. The license/contract should stipulate that the credit must remain.

Μy approach to the issue is shown to this [fiddle]1

        <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script>

        <script type="text/javascript">
        //<![CDATA[

    $(document).ready(function() {
    if ($('#footer-post').length == 1) 
// check if <a> exists in id="footer-post" and changes <a> address and class
      {
        $('#footer-post a').prop('href', 'http://synaxipalaiochoriou.blogspot.gr/').prop('class', 'footer-3').text('Σύναξη Νέων Παλαιοχωρίου');
      }

      if ($('#footer-post').length >= 1 && $('a.footer-3').length == 0) { 
// if link is erased it creates a new one in the same div
        $('<a>', {
          class: 'footer-3',
          text: 'Σύναξη Νέων Παλαιοχωρίου',
          href: 'http://synaxipalaiochoriou.blogspot.gr/',
        }).appendTo('#footer-post');
      }

      if ($('#footer-post').length == 0 && $('a.footer-3').length == 0) { 
// if div and link are erased it shows an alert and load yahoo
        alert('Link has been erased')
        window.location.href="https://gr.yahoo.com/";
      }
    });
        //]]>
        </script>

where:

<div id="footer-post">
<a class='footer-3' href="http://google.com">google</a>
</div>

last but not least, use "javascriptobfuscator.com" to obfuscate your script so that people do not tamper/erase it easily. The result of the script would be:

<script type="text/javascript">//<![CDATA[var _0x7f0e=["\x6C\x65\x6E\x67\x74\x68","\x23\x66\x6F\x6F\x74\x65\x72\x2D\x70\x6F\x73\x74","\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\x20\uFFFD\uFFFD\uFFFD\uFFFD\x20\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD","\x74\x65\x78\x74","\x63\x6C\x61\x73\x73","\x66\x6F\x6F\x74\x65\x72\x2D\x33","\x70\x72\x6F\x70","\x68\x72\x65\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x73\x79\x6E\x61\x78\x69\x70\x61\x6C\x61\x69\x6F\x63\x68\x6F\x72\x69\x6F\x75\x2E\x62\x6C\x6F\x67\x73\x70\x6F\x74\x2E\x67\x72\x2F","\x23\x66\x6F\x6F\x74\x65\x72\x2D\x70\x6F\x73\x74\x20\x61","\x61\x2E\x66\x6F\x6F\x74\x65\x72\x2D\x33","\x61\x70\x70\x65\x6E\x64\x54\x6F","\x3C\x61\x3E","\x4C\x69\x6E\x6B\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x65\x72\x61\x73\x65\x64","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x67\x6F\x6F\x67\x6C\x65\x2E\x67\x72\x2F","\x72\x65\x61\x64\x79"];$(document)[_0x7f0e[16]](function(){if($(_0x7f0e[1])[_0x7f0e[0]]== 1){$(_0x7f0e[9])[_0x7f0e[6]](_0x7f0e[7],_0x7f0e[8])[_0x7f0e[6]](_0x7f0e[4],_0x7f0e[5])[_0x7f0e[3]](_0x7f0e[2])};if($(_0x7f0e[1])[_0x7f0e[0]]>= 1&& $(_0x7f0e[10])[_0x7f0e[0]]== 0){$(_0x7f0e[12],{class:_0x7f0e[5],text:_0x7f0e[2],href:_0x7f0e[8]})[_0x7f0e[11]](_0x7f0e[1])};if($(_0x7f0e[1])[_0x7f0e[0]]== 0&& $(_0x7f0e[10])[_0x7f0e[0]]== 0){alert(_0x7f0e[13]);window[_0x7f0e[14]][_0x7f0e[7]]= _0x7f0e[15]}})//]]></script>

Hope this helps!

A not good way would be to call their site by a cronjob, analyzing it's footer and look out. To redirect them to your site, you have to make a php file on your theme, wich edits itsself. But this php could be removed and your only way to stop them is to sue them, but this only works, if your license is right.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top