Back to vBulletin 3.7 Template Modifications

One Touch Select ALL: CODE, PHP, HTMML
Mod Version: 1.01, by ry215

This modification is in the archives.
vB Version: 3.7.x Rating: (4 votes - 5.00 average) Installs: 50
Released: 06 Mar 2008 Last Update: Never Downloads: 2
Not Supported Template Edits  

This is small hack used Script selectCode.

Install:
1. Open Temp: headinclude
Add below:
PHP Code:
<script type="text/javascript">
function 
selectCode(a)
{
   var 
a.parentNode.parentNode.getElementsByTagName('PRE')[0];
   if (
window.getSelection)
   {
      var 
window.getSelection();
       if (
s.setBaseAndExtent)
      {
         
s.setBaseAndExtent(e0ee.innerText.length 1);
      }
      else
      {
         var 
document.createRange();
         
r.selectNodeContents(e);
         
s.removeAllRanges();
         
s.addRange(r);
      }
   }
   else if (
document.getSelection)
   {
      var 
document.getSelection();
      var 
document.createRange();
      
r.selectNodeContents(e);
      
s.removeAllRanges();
      
s.addRange(r);
   }
   else if (
document.selection)
   {
      var 
document.body.createTextRange();
      
r.moveToElementText(e);
      
r.select();
   }
}
</
script

2. Open bbcode_code:
find:
PHP Code:
$vbphrase[code]: 
Add below:
PHP Code:
<a href="#" onclick="selectCode(this); return false;"><input type="button" value="Select All" /></a
3. Open bbcode_html:
find:
PHP Code:
$vbphrase[html_code]: 
Add below:
PHP Code:
<a href="#" onclick="selectCode(this); return false;"><input type="button" value="Select All" /></a
4. Open bbcode_php:
find:
PHP Code:
$vbphrase[php_code]: 
Add below:
PHP Code:
<a href="#" onclick="selectCode(this); return false;"><input type="button" value="Select All" /></a
Next find:
PHP Code:
$code 
Replace with:
PHP Code:
<pre>$code</pre
That´s all.

Hope u like!

Download

No files for download.

Screenshots

Click image for larger version
Name:	select_1.jpg
Views:	1195
Size:	22.9 KB
ID:	76817   Click image for larger version
Name:	select_2.jpg
Views:	620
Size:	26.9 KB
ID:	84120  


vblts.ru supports vBulletin®, 2022-2024