View Full Version : AutoCopy Code and PHP to clipboard
This hack will allow you to copy the text quoted in Code and PHP, to your clipboard, with a simple double-click.
This is extremly useful if your users utilise frequently the code environment.
Once installed the hack, if an user double-click in the quoted area, an alert will popup let him(her) know that the code was copied to the clipboard.
ESTIMATED INSTALL TIME: 1 minute
TESTED IN VERSION: 2.2.5
NOTE: As a thank you for using my hack, please click on the INSTALL button. You will receive updates in your email, whenever I add new features to it and it will let me evaluate better the quality of my hacks.
Also post a reply with your comments. Your oppinion is important to me.
To use this hack with FireFly's Quote, Code and PHP hack, read the instructions mentioned here (https://vborg.vbsupport.ru/showthread.php?action=showpost&postid=237856).
To download the latest version of this hack, click below:
Below, you see a screenshot... ;)
Lesane
04-07-2002, 10:03 AM
Pretty usefull, thanks.
i hope firefly will install this here.. ;)
Admin
04-07-2002, 11:14 AM
Yeah, looks useful indeed. I'll look into this shortly. :)
thanks firefly. :)
it's extremly easy to install it in your hack. i have no idea how come i didnt think of this before...
Admin
04-07-2002, 11:27 AM
Alright, installed. :) Will make my life easier, good job.
Recluse
04-07-2002, 11:31 AM
nice one ;)
Admin
04-07-2002, 11:32 AM
Yeah, you must click inside the text and not just anywhere in the table (because the <pre> ends before the table).
Maybe with some more Javscript you can make the whole table double-clickable? :)
i'm glad you like it firefly. it will make everyone's life easier here at vB.org... :D
Originally posted by FireFly
Yeah, you must click inside the text and not just anywhere in the table (because the <pre> ends before the table).
Maybe with some more Javscript you can make the whole table double-clickable? :) you cant.. unfortunatelly. the code is looking only for a segment of code related to whatever variable you select (in our case <pre), to paste it. if you select ather area, it will paste everything, including the html code. i would make more clear the message:
(double-click the code segment to copy to clipboard) or something like that...
if you dont click on the actual code, it will not work. talking abot this, how can we remove the space? if you click on the first line (even is it's outside the text), in your example, it works. in the empty space below, it doesnt. VB adds some extra space there... only in CODE and PHP. maybe you can tell us here firefly how to remove this pesky space in both CODE and PHP.. it is not very estethic..
Admin
04-07-2002, 11:46 AM
I was thinking of maybe giving every <pre> a unique ID (per page of course), and then instead of "this" in the JS use that ID.
Admin
04-07-2002, 11:50 AM
* FireFly beats the system. ;)
Ok, I got it to work with my hack (PHP and stuff in boxes) that you can click the table and not just the text.
Instead of replacing <pre I replace this:
<td colspan="2" style="BORDER: #000000 1px solid; FONT-SIZE:
With the same code only with added JavaScript.
good job firefly, as usual.. ;)
so if i understand corectly.. you fall in love with me?? hehe
nsr81
04-07-2002, 05:02 PM
Thanks for this hack nakkid.
Sindatel
04-10-2002, 12:06 PM
I can't seem to get it to work on my 2.2.5
every time i click it copies the entire post!
and gives me 3 CopyBoxes !!!
HELP :)
you have firefly's hack installed?
check his post here, related to this issue. he tells you how to edit properly the html code.
squawell
04-11-2002, 06:12 AM
very useful hack~~
thankz ur great work~~
Parker Clack
04-13-2002, 04:19 PM
nakkid:
Is there anyway to incorporate this in with the quotereply template so when someone clicks on the quote icon the text that is in the post is copied to the clipboard?
So instead of putting the Originally posted by $originalposter $pagetext that this template puts into a new post it would just copy $pagetext to the clipboard? That way it when they go to reply and the page won't load they haven't lost what they just typed. Or better yet it would be cool if it was a feature that when they typed a message it would just copy the contents to the clipboard and then you could just cut and paste. The information copied to the clipboard would change each time you posted a new message.
Just a thought.
Parker
212rikanmofo
04-22-2002, 12:54 AM
in the instructions in the txt file says:
| File: admin/functions.php (1 change) |
+-----------------------------------------------+
| 1. Find this code:
+--------------------------------------------------------------------------+
return "</normalfont><blockquote><pre><smallfont>PHP:</smallfont><hr>$buffer<hr></pre></blockquote><normalfont>";
}
// ###################### Start stripbrsfromcode #######################
function stripbrsfromcode($foundcode) {
$foundcode = str_replace("\\\"","\"",$foundcode);
return "</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>" . str_replace("<br>", "", str_replace("<br />", "", $foundcode) ) . "<hr></pre></blockquote><normalfont>";
}
but in my admin/functions.php it says:
return "</normalfont><table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\" cellspacing=\"1\"><tr><td><smallfont><b>PHP:</b></smallfont></td></tr><tr><td style=\"BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: {codefontcolor}; FONT-FAMILY: Courier, Courier New, sans-serif; BACKGROUND-COLOR: {codebackground};\"><pre>" . $buffer . "</pre></td></tr></table><normalfont>";
}
// ###################### Start stripbrsfromcode #######################
function stripbrsfromcode($foundcode) {
$foundcode = str_replace("\\\"","\"",$foundcode);
return "</normalfont><table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\" cellspacing=\"1\"><tr><td><smallfont><b>code:</b></smallfont></td></tr><tr><td style=\"BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: {codefontcolor}; FONT-FAMILY: Courier, Courier New, sans-serif; BACKGROUND-COLOR: {codebackground};\"><pre>" . $foundcode . "</pre></td></tr></table><normalfont>";
}
im running vb 2.2.5... btw... so how am i spose to modify this?
you have firefly's hack installed? he posted how to mod the code few posts above.
Entourage
04-22-2002, 09:27 AM
very nice hack mate! tnx
212rikanmofo
04-22-2002, 09:41 AM
Originally posted by FireFly
* 212rikanmofo beats the system. ;)
Ok, I got it to work with my hack (PHP and stuff in boxes) that you can click the table and not just the text.
Instead of replacing <pre I replace this:
<td colspan="2" style="BORDER: #000000 1px solid; FONT-SIZE:
With the same code only with added JavaScript.
k, firefly im really confused here, i have installed your code,php quote box hack, and i want to install this hack to work with your hack, can you please be more specific on what to do. when i install this hack, the php and code boxes return to vbulletin's default, which is them lines.... :(
Felix
05-04-2002, 08:16 PM
Just replace
return "</normalfont><table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\" cellspacing=\"1\"><tr><td><smallfont><b>PHP:</b></smallfont></td></tr><tr><td style=\"BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #EEEEFF; FONT-FAMILY: Courier, Courier New, sans-serif; BACKGROUND-COLOR: #1D6AA0;\"><pre>" . $buffer . "</pre></td></tr></table><normalfont>";
}
// ###################### Start stripbrsfromcode #######################
function stripbrsfromcode($foundcode) {
$foundcode = str_replace("\\\"","\"",$foundcode);
return "</normalfont><table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\" cellspacing=\"1\"><tr><td><smallfont><b>code:</b></smallfont></td></tr><tr><td style=\"BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #EEEEFF; FONT-FAMILY: Courier, Courier New, sans-serif; BACKGROUND-COLOR: #1D6AA0;\"><pre>" . $foundcode . "</pre></td></tr></table><normalfont>";
}
with this:
return "</normalfont><table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\" cellspacing=\"1\"><tr><td><smallfont><b>PHP:</b></smallfont></td><td align=\"right\"><smallfont>(double-click to copy to clipboard)</smallfont></td></tr><tr><td colspan=\"2\" ondblclick='javascript:window.clipboardData.setDat a(\"Text\", this.innerText); alert(\"Code copied to the clipboard. You can paste it now.\");' style=\"BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: {codefontcolor}; FONT-FAMILY: Courier, Courier New, sans-serif; BACKGROUND-COLOR: {codebackground};\"><pre>" . $buffer . "</pre></td></tr></table><normalfont>";
}
// ###################### Start stripbrsfromcode #######################
function stripbrsfromcode($foundcode) {
$foundcode = str_replace("\\\"","\"",$foundcode);
return "</normalfont><table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\" cellspacing=\"1\"><tr><td><smallfont><b>code:</b></smallfont></td><td align=\"right\"><smallfont>(double-click to copy to clipboard)</smallfont></td></tr><tr><td colspan=\"2\" ondblclick='javascript:window.clipboardData.setDat a(\"Text\", this.innerText); alert(\"Code copied to the clipboard. You can paste it now.\");' style=\"BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: {codefontcolor}; FONT-FAMILY: Courier, Courier New, sans-serif; BACKGROUND-COLOR: {codebackground};\"><pre>" . $foundcode . "</pre></td></tr></table><normalfont>";
}
Worked for me :)
Bald Bouncer
05-07-2002, 03:56 PM
Originally posted by FireFly
* FireFly beats the system. ;)
Ok, I got it to work with my hack (PHP and stuff in boxes) that you can click the table and not just the text.
Instead of replacing <pre I replace this:
<td colspan="2" style="BORDER: #000000 1px solid; FONT-SIZE:
With the same code only with added JavaScript.
what added javascript ... I just cant get this too work with your boxes :(
mersey
05-13-2002, 08:42 AM
cheers very handy hack :)
Boofo
05-13-2002, 09:26 AM
I already installed Firefly's code and php hack and I also installed this great hack (the part I needed with Firefly's hack), but how do I add the "double-click to copy to clipboard" text at the top of the box if I only need to use the final step 1 in this file? Also, I'm not 100 % clear on the instructions Firefly said about the <pre replacement. Can anyone help explain what it is exactly that I am supposed to do here?
Allstar DC
05-14-2002, 02:17 PM
ok,i figured it out. do the following after you installed firefly's hack:
replace:
return "</normalfont><table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\" cellspacing=\"1\"><tr><td><smallfont><b>PHP:</b></smallfont></td></tr><tr><td style=\"BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Courier, Courier New, sans-serif; BACKGROUND-COLOR: #D7D7D7;\"><pre>" . $buffer . "</pre></td></tr></table><normalfont>";
}
// ###################### Start stripbrsfromcode #######################
function stripbrsfromcode($foundcode) {
$foundcode = str_replace("\\\"","\"",$foundcode);
return "</normalfont><table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\" cellspacing=\"1\"><tr><td><smallfont><b>code:</b></smallfont></td></tr><tr><td style=\"BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Courier, Courier New, sans-serif; BACKGROUND-COLOR: #D7D7D7;\"><pre>" . $foundcode . "</pre></td></tr></table><normalfont>";
with:
return "</normalfont><table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\"
cellspacing=\"1\"><tr><td><smallfont><b>PHP:</b></smallfont></td><td align=\"right\"><smallfont>(double click the code to
copy it)</smallfont></td></tr><tr><td colspan=\"2\" style=\"BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR:
#000000; FONT-FAMILY: Courier, Courier New, sans-serif; BACKGROUND-COLOR: #D7D7D7;\"><pre>" . $buffer .
"</pre></td></tr></table><normalfont>";
}
// ###################### Start stripbrsfromcode #######################
function stripbrsfromcode($foundcode) {
$foundcode = str_replace("\\\"","\"",$foundcode);
return "</normalfont><table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\"
cellspacing=\"1\"><tr><td><smallfont><b>code:</b></smallfont></td><td align=\"right\"><smallfont>(double click the code to
copy it)</smallfont></td></tr><tr><td colspan=\"2\" style=\"BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR:
#000000; FONT-FAMILY: Courier, Courier New, sans-serif; BACKGROUND-COLOR: #D7D7D7;\"><pre>" . $foundcode .
"</pre></td></tr></table><normalfont>";
forget about the lines in nakkids hack, just do this:
Create a new replacement variable. Go to your admin control panel:
|
| Replacements > Add
|
| and enter the following information:
|
| Code to find: <td colspan="2"
| Code to insert: <td colspan="2" ondblclick='javascript:window.clipboardData.setDat a("Text", this.innerText); alert("Code copied to the clipboard. You can paste it now.");'
that will fix the "php:" and "code:" part.
to make the box clickable with quote do the following:
+-------------------------------------------------------------------------------------------------+
| In the Admin CP, goto Modify under Custom vB Codes and click [edit] next to the [quote] code |
| |
+-------------------------------------------------------------------------------------------------+
replace this:
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td><smallfont><b>quote:</b></smallfont></td></tr><tr><td style="BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Verdana,Arial; BACKGROUND-COLOR: #D7D7D7;">{param}</td></tr></table>
with this:
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td><smallfont><b>quote:</b></smallfont></td><td align="right"><smallfont>(double click the code to copy it)</td></tr><tr><td colspan="2" ondblclick='javascript:window.clipboardData.setDat a("Text", this.innerText); alert("Code copied to the clipboard. You can paste it now.");' style="BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Verdana,Arial; BACKGROUND-COLOR: #D7D7D7;">{param}</td></tr></table>
that will fix it for you!
Boofo
05-14-2002, 05:35 PM
It works here now, I just don't have the "double-click to copy to clipboard" showing up like it does here. That's the only part I need to make it look right.
Allstar DC
05-14-2002, 07:08 PM
thats easy, just add
<smallfont>(double click the code to copy it)</smallfont>
in functions.php right after the following :
<smallfont><b>PHP:</b></smallfont>
& after:
<smallfont><b>CODE:</b></smallfont>
last one: In the Admin CP, goto Modify under Custom vB Codes and click [edit] next to the [quote] code Place this code in the "vB Code replacement" Box
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td><smallfont><b>quote:</b></smallfont></td><td align="right"><smallfont>(double click the code to copy it)</td></tr><tr><td colspan="2" ondblclick='javascript:window.clipboardData.setDat a("Text", this.innerText); alert("Code copied to the clipboard. You can paste it now.");' style="BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: {codefontcolor}; FONT-FAMILY: Verdana,Arial; BACKGROUND-COLOR: {codebackground};">{param}</td></tr></table>
Bald Bouncer
05-15-2002, 12:20 AM
never mind sorted it ... good job mate! :)
Bald Bouncer
05-15-2002, 12:30 AM
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td><smallfont><b>quote:</b></smallfont></td><td align="right"><smallfont>(double click the code to copy it)</td></tr><tr><td colspan="2" style="BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Verdana,Arial; BACKGROUND-COLOR: #D7D7D7;">{param}</td></tr></table>
that needs to be your quote text to work
Boofo
05-15-2002, 12:46 AM
Thanks! It works great! :)
Allstar DC
05-15-2002, 04:06 AM
Originally posted by Bald Bouncer
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr> etc. etc.
that needs to be your quote text to work
your right, thanx i pasted the wrong code in my message
aspire007
05-15-2002, 07:02 PM
is there a way i can fix this? --
[QUOTE]Originally posted by blue devil
did it work? [/QUOTE
test
thats how it shows up when someone quotes another person accept the last quote has this at the end ] but i couldnt put it here due to it tries to quote me :)
Allstar DC
05-15-2002, 07:28 PM
In the Admin CP, goto Modify under Custom vB Codes and click [edit] next to the [quote] code Place this code in the "vB Code replacement" Box:
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td><smallfont><b>quote:</b></smallfont></td><td align="right"><smallfont>(double click the code to copy it)</td></tr><tr><td colspan="2" ondblclick='java script:window.clipboardData.setData("Text", this.innerText); alert("Code copied to the clipboard. You can paste it now.");' style="BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #EEEEFF; FONT-FAMILY: Verdana,Arial; BACKGROUND-COLOR: #1D6AA0;">{param}</td></tr></table>
Boofo
05-15-2002, 07:32 PM
Isn't it supposed to be this?
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td><smallfont><b>quote:</b></smallfont></td><td align="right"><smallfont>(double click the code to copy it)</td></tr><tr><td colspan="2" style="BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Verdana,Arial; BACKGROUND-COLOR: #D7D7D7;">{param}</td></tr></table>
Did you mean to put the above? :)
Allstar DC
05-15-2002, 07:38 PM
boofo, your code doesn't have the "copy to clipboard"function, mine does
aspire007
05-15-2002, 09:09 PM
sorry guys heres what i did -- *didnt notice untill now*
when i click on modify Custom vB Codes there is no quote Definitions there.. i see the rest of the things there like [b]bold[b] but quote is gone
i think i deleted the whole thing on accident so could you guys tell me what all i need to put it back in?
thanx in advance to you all :)
Allstar DC
05-15-2002, 09:19 PM
go to: Custom vB Codes in your admin cp
click on "add"
next:
vB Code tag --> quote
vB Code replacement -->
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td><smallfont><b>quote:</b></smallfont></td><td align="right"><smallfont>(double click the code to copy it)</td></tr><tr><td colspan="2" ondblclick='javascript:window.clipboardData.setDat a("Text", this.innerText); alert("Code copied to the clipboard. You can paste it now.");' style="BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: {codefontcolor}; FONT-FAMILY: Verdana,Arial; BACKGROUND-COLOR: {codebackground};">{param}</td></tr></table>
vB Code example --> This is a quote
vB Code explanation
The quote tag is used to denote a quote from another post
Use {option} ?
No
does it make sence to you?
aspire007
05-15-2002, 09:52 PM
thanx man that made perfect sence to me :) thanx very much :)
Allstar DC
05-15-2002, 09:52 PM
no prob, is it all working now?
aspire007
05-15-2002, 10:02 PM
yep all working so far -- but im good at screwing things up :(
*which im not proud about*
thanx again man :)
aspire007
05-15-2002, 10:28 PM
Originally posted by Allstar DC
In the Admin CP, goto Modify under Custom vB Codes and click [edit] next to the [quote] code Place this code in the "vB Code replacement" Box:
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td><smallfont><b>quote:</b></smallfont></td><td align="right"><smallfont>(double click the code to copy it)</td></tr><tr><td colspan="2" ondblclick='java script:window.clipboardData.setData("Text", this.innerText); alert("Code copied to the clipboard. You can paste it now.");' style="BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #EEEEFF; FONT-FAMILY: Verdana,Arial; BACKGROUND-COLOR: #1D6AA0;">{param}</td></tr></table>
when i put this in all i see is this for the quote --> <
there is no text displayed?
Boofo
05-16-2002, 12:02 AM
Originally posted by Allstar DC
boofo, your code doesn't have the "copy to clipboard"function, mine does
I tried it that way (with your code) and it didn't work. I had to put the td colspan "2" with the javascript added in the replacement variable to make it work. The code I gave will work with the replacement variable. I couldn't get yours to work with the onclick in it. :)
aspire007
05-16-2002, 03:16 AM
i cant get either one to work.. dont know what i did wrong but can someone tell me step by step everything to this hack - starting from the admin/funtions.php?
i know im asking alot but maybe 1 day i will be able to return the favor :) thanx guys
Allstar DC
05-16-2002, 03:27 AM
boofo: you need to have it in your replacement variable anyway, to make the [php:] and [code:] functions work
the line i posted is working for me
Allstar DC
05-16-2002, 03:49 AM
aspire007:
in functions.php
find:
return "</normalfont><blockquote><pre><smallfont>PHP:</smallfont><hr>$buffer<hr></pre></blockquote><normalfont>";
}
// ###################### Start stripbrsfromcode #######################
function stripbrsfromcode($foundcode) {
$foundcode = str_replace("\\\"","\"",$foundcode);
return "</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>" . str_replace("<br>", "", str_replace("<br />", "", $foundcode) ) . "<hr></pre></blockquote><normalfont>";
replace it with:
return "</normalfont><table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\" cellspacing=\"1\"><tr><td><smallfont><b>PHP:</b></smallfont></td><td align=\"right\"><smallfont>(double click the code to copy it)</smallfont></td></tr><tr><td colspan=\"2\" style=\"BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #EEEEFF; FONT-FAMILY: Courier, Courier New, sans-serif; BACKGROUND-COLOR: #1D6AA0;\"><pre>" . $buffer . "</pre></td></tr></table><normalfont>";
}
// ###################### Start stripbrsfromcode #######################
function stripbrsfromcode($foundcode) {
$foundcode = str_replace("\\\"","\"",$foundcode);
return "</normalfont><table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\" cellspacing=\"1\"><tr><td><smallfont><b>code:</b></smallfont></td><td align=\"right\"><smallfont>(double click the code to copy it)</smallfont></td></tr><tr><td colspan=\"2\" style=\"BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #EEEEFF; FONT-FAMILY: Courier, Courier New, sans-serif; BACKGROUND-COLOR: #1D6AA0;\"><pre>" . $foundcode . "</pre></td></tr></table><normalfont>";
Now run this SQL query through phpMyAdmin or Telnet/SSH
ALTER TABLE bbcode CHANGE bbcodereplacement bbcodereplacement TEXT;
In the Admin CP, goto Modify under Custom vB Codes and click [edit] next to the [quote] code, Place this code in the "vB Code replacement" Box :
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td><smallfont><b>quote:</b></smallfont></td><td align="right"><smallfont>(double click the code to copy it)</td></tr><tr><td colspan="2" ondblclick='javascript:window.clipboardData.setDat a("Text", this.innerText); alert("Code copied to the clipboard. You can paste it now.");' style="BORDER: #000000 1px solid; FONT-SIZE: 11px; COLOR: #EEEEFF; FONT-FAMILY: Verdana,Arial; BACKGROUND-COLOR: #1D6AA0;">{param}</td></tr></table>
Go to your admin control panel:
Replacements > Add
and enter the following information:
Code to find: {codebackground } ///without the spaces
Code to insert: #D7D7D7
And another one
Code to find: {codefontcolor } ///without the spaces
Code to insert: #000000
last one to add:
Code to find: <td colspan="2"
Code to insert: <td colspan="2" ondblclick='javascript:window.clipboardData.setDat a("Text", this.innerText); alert("Code copied to the clipboard. You can paste it now.");'
thats it!
Boofo
05-16-2002, 05:13 AM
Code to find: #1D6AA0
Code to insert: #D7D7D7
And another one
Code to find: #EEEEFF
Code to insert: #000000
Why are you adding these two? Why not just change them in the line before you put in the code? This is 2 extra steps you really don't need, do you? :)
Allstar DC
05-16-2002, 06:17 AM
lol, the board was messing up my code
when i typed this {codefontcolor } without the spaces in my code it just changed it here to #EEEEFF
i edited it now and it should be ok now
btw those codes are not mine!!
i just quoted those from FireFly's instructions,
Allstar DC
05-16-2002, 06:20 AM
btw boofo, yes you can do that too, but than you have to change evrything seperatly , with those 2 lines its easier.
it will automaticly replace all the colors where the {codefontcolor } code is used
Boofo
05-16-2002, 04:14 PM
NOW it makes more sense with the codefontcolor there. :) That is basically the same thing I am using, just the quote box I did a little different.
Allstar DC
05-16-2002, 08:57 PM
haha, i forgot that vbb turned that code into color code when posting it
kalle
01-07-2003, 08:50 PM
great hack !
THX for work
regards
Slynderdale
01-20-2003, 01:56 AM
Hmm, wierd, i installed this exsactly how it said, and i used firfly's fix for it but when i double click on it i get a javascript error "Invalid FORMATECT structure" yet when my freind tried it, it worked, i have the newest version od internet explorer, when i installed this on my old board, it worked just fine.
i have a problem :(
between the <pres are always linebreaks
it looks like
line
space
Code Text
space
line
how can i remove the spaces between the <pre?
Boofo
04-07-2003, 06:34 PM
<pre>".str_replace("<br>","",str_replace("<br />","",$foundcode)).
"</pre>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.