I found a script:
Source: http://bavotasan.com/2010/add-a-copyright-notice-to-copied-text/
I added it to: "Javascript codes management" and it doesn't work.
When I added it to: "Announcements" - it works fine.
Why? I don't want this script in announcements, because it creates an additional break on top of the page.
I also tried to add this script to "Templates" (overall_header, simple_header, overall_footer_begin, overall_footer_end) and it didn't work.
I use phpBB2 (subsilver) theme version of the forum.
Why this script works in "Announcements", but doesn't work in "Javascript codes management"?
SOLVED:
It still doesn't work in "Javascript codes management", but when I removed:
Source: http://bavotasan.com/2010/add-a-copyright-notice-to-copied-text/
- Code:
<script type="text/javascript">
function addLink() {
var body_element = document.getElementsByTagName('body')[0];
var selection;
selection = window.getSelection();
var pagelink = "<br /><br /> Read more at: <a href='"+document.location.href+"'>"+document.location.href+"</a><br />Copyright © c.bavota"; // change this if you want
var copytext = selection + pagelink;
var newdiv = document.createElement('div');
newdiv.style.position='absolute';
newdiv.style.left='-99999px';
body_element.appendChild(newdiv);
newdiv.innerHTML = copytext;
selection.selectAllChildren(newdiv);
window.setTimeout(function() {
body_element.removeChild(newdiv);
},0);
}
document.oncopy = addLink;
</script>
I added it to: "Javascript codes management" and it doesn't work.
When I added it to: "Announcements" - it works fine.
Why? I don't want this script in announcements, because it creates an additional break on top of the page.
I also tried to add this script to "Templates" (overall_header, simple_header, overall_footer_begin, overall_footer_end) and it didn't work.
I use phpBB2 (subsilver) theme version of the forum.
Why this script works in "Announcements", but doesn't work in "Javascript codes management"?
SOLVED:
It still doesn't work in "Javascript codes management", but when I removed:
- Code:
// change this if you want