Current time: 11-22-2024, 11:16 PM Hello There, Guest! (LoginRegister)


Announcement
We have the biggest collection of MyBB Plugins here on the Net. We have currently 175+ MyBB Exclusive Plugins, 80+ MyBB Compatible MyCodes and 16+ MyBB 1.4.x Themes (Some are still under construction...) Thus, we provide you the largest MyBB Stuff on the net including tutorials. Stay with us, you will find out some more to come.
Now you can easily create your own buttons set for MyBB! Click here to have a look...
*** You cannot do your registration behind any Proxies anymore! ***
Welcome Guest[3.145.155.149], connected from
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add [Select All] into your quote, php
08-17-2010, 05:30 AM (This post was last modified: 08-17-2010 01:00 PM by exdiogene.)
Post: #1
Add [Select All] into your quote, php
First of all, you have to put this code into headerinclude:
PHP Code:[Highlight]
<script type="text/javascript">
function 
selectCode(a)
{
   var 
a.parentNode.parentNode.getElementsByTagName('CODE')[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> 

Next, go to ACP > Configuration > Languages > select your language > global.lang.php and search:
Quote:[Highlight] php_code
Then you add this code after the lang value of php_code:
<a href="#" onclick="selectCode(this); return false;">(SELECT ALL)</a>

Do the same thing with code.

I don't think we need a demo here, good luck.

< link removed >

Joey_Pham423's signature >>> Get All MyBBCodes.Com's Plugins From Here <<<
Visit this user's website Find all posts by this user
Quote this message in a reply
08-17-2010, 12:59 PM
Post: #2
RE: Add [Select All] into your quote, php
Thank you Joey_Pham423 for this nice tutorial, it will be quite instructive for our members. Smile

But you should have read the rules, mostly this one about the tutorials :

4. No links to external sites would be tolerated.

The rules for the tutorial section are here :

Serving the community through tutorial (Rules)

Your link was then removed... Wink

exdiogene's signature MyBBCodes.com administrator
Cool " It is not what you know that matters, it is what you do or do not do!"
Visit this user's website Find all posts by this user
Quote this message in a reply
0 member(s) viewed this thread in the last 365 days :
Post Reply 


Was This Thread Useful ?
Please Link To Us
URL
BBCode
HTML

Forum Jump:

 
New To Site ?
Some Useful Links
  • Help

  • You Might Need To Register

  • Forum Statistics

  • Mark All Forums Read

  • Forum Staff

  • Log Out
  • Contact Us

  • Mybbcodes

  • Return to Top

  • Return to Content

  • Lite (Archive) Mode

  • RSS Syndication
  • Powered By MyBB, © 2002-2024 MyBB Group.
    Golden Crown - Designed and Published by ghazal & exdiogene of MyBBCodes.
    Hosting provided by WWWHostingServer.com