vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=264981

"select all" feature for BB Code : CODE/HTML/PHP
by BCP Hung
10 Jun 2011 08:28

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".

nitra1000 10 Jun 2011 12:07

Good job, tagged for later

BCP Hung 10 Jun 2011 16:26

New update : fix bug : same phrase with CKEditor phrase in vBulletin 4.1.4.

Thank you,
Getamped 1404.

nacaruncr 11 Jun 2011 03:34

working fine in 4.1.3 :D

Thanks men :D

tagged + installed + MOTM + 5 stars :D

BCP Hung 11 Jun 2011 04:04

Quote:

Originally Posted by nacaruncr (Post 2206068)
working fine in 4.1.3 :D

Thanks men :D

tagged + installed + MOTM + 5 stars :D

Thanks for feedback !

You will be like next version with "copy to clipboard" feature. But, some bugs with flash file must be fix ! :confused:

nacaruncr 12 Jun 2011 01:13

Ok, I'll wait it .. thanks so much.

Twikitero 13 Jun 2011 06:29

Thank you very much, works perfectly 100%.
A major modification, pending the copy to clipboard very necessary for my forum

Thanks again

Marked as installed

BCP Hung 13 Jun 2011 07:40

Quote:

Originally Posted by Twikitero (Post 2206952)
A major modification, pending the copy to clipboard very necessary for my forum

Yes, I know that. I'm having a lot of project, I will way back with this modification soon !

Thanks for used,
Getamped 1404.

Twikitero 03 Jul 2011 17:42

Thank you.

Just please do not forget the copy to clipboard.

I love your modifications.

regards

BCP Hung 03 Jul 2011 18:46

Quote:

Originally Posted by Twikitero (Post 2216284)
Thank you.

Just please do not forget the copy to clipboard.

I love your modifications.

regards

Sorry, I really busy now, my free time very poor.

I need more time to update.

Thanks,
Getamped 1404.

nacaruncr 10 Jul 2011 08:08

Thanks men :D I wait for the upgrade :D

f4vn 21 Nov 2011 13:01

This mod doesn`t work with my site. Error is "Parameter is not an object [Break On This Error] r.selectNodeContents(e); " Can you tell me how to fix it ?

Thank you,

bigs15 27 Jan 2013 05:36

is this work with 3.8.7 thankx in advance...

Worked perfectly in 4.2.2
by bulwinkl
31 Jan 2014 21:25

Great job, I really appreciated this.

This really should be part of the default Vbulletin.

Worked perfectly in 4.2.2:up:

ahobilam 03 Feb 2014 15:18

I am using VB 4.2.2
The code found in my (custom template) bbcode_code and bbcode_html are different
than what you are instructed for find as below:

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

Can I replace it, I want to conform before making any changes.

What is the meaning for
....and.....
between the code.
Thanks in advance.

ramesh_umk3 05 Feb 2014 13:14

it will work as i am running vbulletin 4.2.2

leave ....and.....

replace only starting and ending code which he mentioned

Regards,

RedHacker 06 Jun 2016 08:17

Thanks it is work with 4.1.7

john7911 15 Jun 2016 11:09

Hi,
It does not work on my forum 4.2.3 :(
Can somme one tell me where is the problem?
Thank you :)
https://www.vbulletin.org/forum/external/2016/06/5.jpg


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

Raptor 05 May 2017 08:19

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 (

Raptor 07 May 2017 14:51

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

RedHacker 31 May 2020 06:34

Hello can be fix this to work ?

PinkMilk 31 May 2020 11:55

CSS4 solution:

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

user-select is a CSS Module Level 4 specification, that is currently a draft and non-standard CSS property, but browsers support it well see #search=user-select.

Read more on user-select here on MDN and play with it here in w3scools

Source


All times are GMT. The time now is 15:06.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.