2009-09-28, 11:11 PM
First of all, you need to add this code into headerinclude template:
Next you go to ACP > Configuration > Languages > English or the language that your board are using > global.lang.php and find:
then add this behind anything that already have in the box:
and do the same way for
=> Save it, then you're done.
Demo online: http://mybbvn.com/forum/thread-126.mybbvn
<script type="text/javascript">
function selectCode(a)
{
var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
if (window.getSelection)
{
var s = window.getSelection();
if (s.setBaseAndExtent)
{
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
}
else
{
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
}
else if (document.getSelection)
{
var s = document.getSelection();
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
else if (document.selection)
{
var r = document.body.createTextRange();
r.moveToElementText(e);
r.select();
}
}
</script>
Next you go to ACP > Configuration > Languages > English or the language that your board are using > global.lang.php and find:
Quote: php_code
then add this behind anything that already have in the box:
<a href="#" onclick="selectCode(this); return false;">(SELECT ALL)</a>
and do the same way for
Quote: code
=> Save it, then you're done.
Demo online: http://mybbvn.com/forum/thread-126.mybbvn