top



Hello, Guys Smile

Is it possible to do that in phpBB3 forum. if it is then i need the code if any one can help.

Many Thanks Smile

Do u still want this? (:

@Gangstar: Let's just give a solution here. Maybe someone else might want it. Smile
That would save some trouble.

I wouldn't mind it Wink

Put this in the announcements

Code:
<script type="text/javascript">function selectCode(a)
{
  // Get ID of code block
  var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
 
  // Not IE
  if (window.getSelection)
  {
      var s = window.getSelection();
      // Safari
      if (s.setBaseAndExtent)
      {
        s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
      }
      // Firefox and Opera
      else
      {
        // workaround for bug # 42885
        if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) == '<BR>')
        {
            e.innerHTML = e.innerHTML + ' ';
        }
 
        var r = document.createRange();
        r.selectNodeContents(e);
        s.removeAllRanges();
        s.addRange(r);
      }
  }
  // Some older browsers
  else if (document.getSelection)
  {
      var s = document.getSelection();
      var r = document.createRange();
      r.selectNodeContents(e);
      s.removeAllRanges();
      s.addRange(r);
  }
  // IE
  else if (document.selection)
  {
      var r = document.body.createTextRange();
      r.moveToElementText(e);
      r.select();
  }
}
if(text){}else{ var text = 'Selecionar todos';}
jQuery(document).ready(function(){
  jQuery("dl.codebox dt").not("dl.spoiler > dt").html('Code: <a href="#" onclick="selectCode(this); return false;" title="Select all the content" class="code-a">Select All</a>');
});
</script>

Gangstar15 wrote:Do u still want this? (:

Yes Happy

Then did u tried the code i posted above?

Yep but didn't work.

It should (:
http://test1-liqued-coding.forumotion.com/t2-test-test-test

Try put it in the top of the announcements (:

I tried it myself too, it doesn't work together with my phpBB3 codebox customization scripts. Do you have any javascripts connected to dl.codebox, .code or anything along that road?

As i said.. try put it in the top of your announcements (: and make the in shows in all pages (: