Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
One Touch Select ALL: CODE, PHP, HTMML Details »»
One Touch Select ALL: CODE, PHP, HTMML
Version: 1.01, by ry215 ry215 is offline
Developer Last Online: May 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.7.x Rating:
Released: 03-05-2008 Last Update: Never Installs: 50
Template Edits
 
No support by the author.

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!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 10-04-2008, 12:05 AM
djrapid.com djrapid.com is offline
 
Join Date: May 2008
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great
Reply With Quote
  #23  
Old 02-28-2009, 10:04 AM
IIAnDoII IIAnDoII is offline
 
Join Date: Jul 2008
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks and nice mod
Reply With Quote
  #24  
Old 02-28-2009, 10:27 AM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it also possible to copy the code to the clipboard?
Reply With Quote
  #25  
Old 03-03-2009, 03:25 AM
The4um's Avatar
The4um The4um is offline
 
Join Date: Nov 2008
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works very well
Reply With Quote
  #26  
Old 03-13-2009, 04:44 AM
dandanch dandanch is offline
 
Join Date: Nov 2008
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It doesn't work with multiple code boxes in the same thread.does any one have a fix for that ?
Reply With Quote
  #27  
Old 08-01-2009, 10:42 AM
Pessimist's Avatar
Pessimist Pessimist is offline
 
Join Date: Aug 2006
Location: Europa
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would make so for PHP (this fixed spaces issue):
4. ...
Find:
PHP Code:
        <code style="white-space:nowrap">
                <!-- 
php buffer start -->$code<!-- php buffer end -->
        </
code
Replace with:
PHP Code:
        <pre style="margin: 0px;"><code style="white-space:nowrap"><!-- php buffer start -->$code<!-- php buffer end --></code></pre
Reply With Quote
  #28  
Old 09-24-2009, 02:43 PM
itsheinz itsheinz is offline
 
Join Date: Feb 2009
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great one im using it now
Reply With Quote
  #29  
Old 09-29-2009, 10:32 PM
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Posts: 878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ry215 can create and one button with deselect all....?
Reply With Quote
  #30  
Old 12-13-2009, 04:03 PM
ravenfaust ravenfaust is offline
 
Join Date: Aug 2009
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you get this to work in 3.8 please?
Reply With Quote
  #31  
Old 12-15-2009, 06:39 AM
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Posts: 878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ravenfaust View Post
can you get this to work in 3.8 please?
It is work fine for 3.8.1 Version....
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08766 seconds
  • Memory Usage 2,332KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (11)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete