• Page 1 of 1
  • 1
Forum moderator: bigblog  
uCoz Community » General Information » First Steps with uCoz » Select All to BB Code [code] script (This will give you an option to select all on bbcodes .)
Select All to BB Code [code] script
AdminDan
Posts: 46
Reputation: 5

Message # 1 | 4:51 AM

Indispensable script for website owners who have a lot of scripts or what some other codes. This script selects all the content in the code and then you can just copy that is much more convenient than manually allocate a huge code.

Installation for all modules except the forum:

PU> Customize Design> File Catalog> Page materials and comments to him after this paste $ MESSAGE $.

Installation for forum:

PU> Customize Design> Forums> General view of a forum that is inserted after the $ BODY $.

Code:
Code
<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();}}
      // Замена Code на Выделить всё...
      codediv=document.getElementsByTagName('div');
      for(i=0;i<codediv.length;i++){
      if(codediv[i].className=="bbCodeBlock"){
      s=codediv[i].innerHTML;
      s=s.replace(/>Code</g,'>Код: <a href="#" onclick="selectCode(this);return false;">select all<\/a><').replace('<!--uzc-->','<!--uzc--><code>').replace('<!--\/uzc-->','<\/code><!--\/uzc-->');
      codediv[i].innerHTML=s;}}
      </script>

Visit and Register with our website now !![ Looking for Posters and up-loaders ]
http://www.tinymb.com
Post edited by AdminDan - Wednesday, 2013-03-20, 9:32 AM
Sunny
Posts: 9296
Reputation: 456

Message # 2 | 9:30 AM
AdminDan, is it a translation from Russian? By Google? Edit it into normal English.

Quote (AdminDan)
PU> Customize Design> File Catalog> Page materials and comments to him after ivstavlyaem $ MESSAGE $.

I'm not active on the forum anymore. Please contact other forum staff.
AdminDan
Posts: 46
Reputation: 5

Message # 3 | 9:32 AM
Sunny, Why were my other posts deleted and who did that ? It takes long to create one you know.
Visit and Register with our website now !![ Looking for Posters and up-loaders ]
http://www.tinymb.com
Sunny
Posts: 9296
Reputation: 456

Message # 4 | 9:36 AM
AdminDan, they weren't deleted, they were merged into one (by me) because they are actually about one and the same. And moved to another board - Custom Solutions.
I'm not active on the forum anymore. Please contact other forum staff.
AdminDan
Posts: 46
Reputation: 5

Message # 5 | 9:37 AM
Okay sure thanks I didn't know we had sections on here so I just added them on the main page give me access so that I can paste it in required forums. I hope all this helps others. I have lots more too.
Visit and Register with our website now !![ Looking for Posters and up-loaders ]
http://www.tinymb.com
uCoz Community » General Information » First Steps with uCoz » Select All to BB Code [code] script (This will give you an option to select all on bbcodes .)
  • Page 1 of 1
  • 1
Search: