Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
"select all" feature for BB Code : CODE/HTML/PHP Details »
"select all" feature for BB Code : CODE/HTML/PHP
Mod Version: 1.00, by BCP Hung (Coder/Designer) BCP Hung is offline
Developer Last Online: Jan 2019 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (4 votes - 5.00 average) Installs: 26
Released: 10 Jun 2011 Last Update: Never Downloads: 0
Not Supported Template Edits Code Changes Translations  

About this modification :
This mods template allows you added to the BB Code CODE / HTML / PHP function selects all the content in it with a simple button.
Install :
  1. Insert javascript code into headinclude template
    AdminCP -> Styles & Templates -> Style Manager -> Edit Templates -> headinclude
    Copy and paste following js code to bottom of headinclude template :

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  2. Insert new code to bbcode template
    ... -> Edit Templates -> BB Code Layout Templates -> bbcode_code
    Find :

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    Change :

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  3. Insert new code to bbcode_html template (same bbcode_code)
    ... -> Edit Templates -> BB Code Layout Templates -> bbcode_html
    Find :

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    Change :

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  4. Insert new code to bbcode_php template (same bbcode_code)
    ... -> Edit Templates -> BB Code Layout Templates -> bbcode_php
    Find :

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    Change :

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  5. (Optional) Add new phrase : If you don't want to do this step, please look at "Notes" !
    AdminCP -> Languages & Phrases -> Phrase Manager -> [Add New Phrase]
    • Phrase Type : GLOBAL
    • Product : vBulletin
    • Varname : select_code
    • Text : select all
Notes :
If you don't want to create new phrase (step 5), you can search for : {vb:rawphrase select_code} and replace with select all
Next version : add new feature "copy to clipboard".

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Mini Mods Use"HTML" code for ADMIN semauae vBulletin 3.7 Add-ons 10 02 Nov 2008 21:09

  #16  
Old 05 Feb 2014, 14:14
ramesh_umk3's Avatar
ramesh_umk3 ramesh_umk3 is offline
 
Join Date: Jul 2010
Real name: Wiston Book
it will work as i am running vbulletin 4.2.2

leave ....and.....

replace only starting and ending code which he mentioned

Regards,
Reply With Quote
  #17  
Old 06 Jun 2016, 09:17
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Thanks it is work with 4.1.7

Last edited by RedHacker; 06 Jun 2016 at 15:07.
Reply With Quote
  #18  
Old 15 Jun 2016, 12:09
john7911 john7911 is offline
 
Join Date: Feb 2013
Hi,
It does not work on my forum 4.2.3
Can somme one tell me where is the problem?
Thank you



-----------------------------------
It's ok I found the problem I forgot a < in the beginning of the code

Last edited by john7911; 15 Jun 2016 at 12:27.
Reply With Quote
  #19  
Old 05 May 2017, 09:19
Raptor Raptor is offline
 
Join Date: Nov 2001
This stopped working in Chrome just recently

Works fine in Edge and cellphone browser

Uncaught DOMException: Failed to execute 'setBaseAndExtent' on 'Selection': There is no child at offset 18125.
at selectAll (
Reply With Quote
  #20  
Old 07 May 2017, 15:51
Raptor Raptor is offline
 
Join Date: Nov 2001
Update:

Select All works in Chrome Version 57.0.2987.133 (64-bit)

Stopped working after update to Chrome Version 58.0.3029.96 (64-bit)

Problem: the last parameter to the "setBaseAndExtent" shouldn't be the text length, it should be the child node count.

https://developer.mozilla.org/en-US/...tBaseAndExtent

I'm not versed enough in Javascript enough to fix this properly. What does make this work is by removing the following:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and the } after the else

So the new Javascript in the headinclude is


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Hope this helps someone.

If there's anyone who can post the correct java solution without removing any code that would be great.

My vB is 4.2.4 btw
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 09:55.

Layout Options | Width: Wide Color: