Extension talk:CopyToClipboard


CopyToClipboard makes a strange blue line in explorer.

First of all, thank you for making this fantastic extension.

However, CopyToClipboard makes a strange blue line in explorer.

It doesn't cause any problem in chrome, opera, and firefox.

This extension will become even more fantastic after fixing this.

Thank you. Cosfly (talk) 22:58, 12 August 2012 (UTC)

Thanks for the praise :)
I will definitely look into this very soon but I won't promise anything
(This stuff needs help from some HTML expert) Nischayn22 (talk) 13:14, 14 August 2012 (UTC)
My extension uses visible flash so you might also try tweaking on https://github.com/jonrohan/ZeroClipboard , which lets you put a customized JS button Nischayn22 (talk) 09:03, 16 August 2012 (UTC)
It says it uses javascript, then does installing zeroclipboard make it slower to load my website than having your extension?
And although I am reading the code of CopyToClipboard.php, I can't see which line to revise to make ZeroClipboard to work, although I guess I have to edit the 51th line. Cosfly (talk) 12:55, 23 August 2012 (UTC)
No, it won't make your website any slower.
I suggest you try to make a new extension of this, only editing a line in CopyToClipboard won't be enough. You have to load the JS library too. Have a look at http://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker/Extension_Writing_Tutorial to see how this is to be done. Nischayn22 (talk) 13:15, 23 August 2012 (UTC)
anyone got the solution to fix the issue? 182.72.186.86 12:35, 2 September 2013 (UTC)
the extension works well but the only problem is this strange blue in ie...has anyone found solution to fix this? 182.72.186.86 12:22, 3 September 2013 (UTC)
i found the problem..in copytoclipboard.php replace the following line
<param name="bgcolor" value="#white">
with
<param name="bgcolor" value="#ffffff">
fixed :) 182.72.186.86 12:48, 3 September 2013 (UTC)
If that works, this is awesome. I would try to get this on the master version whenever I am free.
But I would like to ask you to get a developer account (http://www.mediawiki.org/wiki/Gerrit/Getting_started) and submit a patch yourself. This will be fun :) Nischayn22 (talk) 01:01, 4 September 2013 (UTC)

CopyToClipboardAndThenPasteFromClipboardToFacebookCommentBox?

Is it possible to make a CopyToClipboardAndThenPasteFromClipboardToFacebookCommentBox?

If a visitor clicks the button, it will 1) copy the specified text to clipboard, and then 2) the facebook comment box will appear 3) it will detect when the facebook comment box appears. 4) it will paste the specified text to the facebook comment box.

I think 1 and 2 are easy since it is just combining two existing button click extensions. The two buttons are displayed at http://wikiuspolitics.com/index.php?title=Main_Page

I guess 3 and 4 are difficult, but I want to ask you if it


The following link seems to contain many java Onclick copy and paste codes but I found that the code of CopyToClipboard doesn't seem to use java, so I guess there is non-java method of making PasteFromClipboard extension. https://www.google.com/#hl=en&newwindow=1&sclient=psy-ab&q=onclick+paste+clipboard&oq=onclick+paste+clipboard&gs_l=hp.3..0i30.71.10661.0.10784.31.21.5.5.5.1.1343.8024.2-3j16j0j1j0j1.21.0.les%3B..0.0...1c.fvi_en6jbpI&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&fp=b6fbdf4e16b0ea8&biw=1005&bih=570


In sum, is it possible to make CopyToClipboardAndThenPasteFromClipboardToFacebookCommentBox? 218.146.16.37 08:00, 16 August 2012 (UTC)

This isn't so easy to do, see http://stackoverflow.com/questions/4244822/copy-paste-content-to-and-from-clipboard-using-javascript for a discussion on the needed feature. I assume you meant Javascript and not Java, but the Javascript solution only works with IE. Nischayn22 (talk) 09:07, 16 August 2012 (UTC)

Template in clippy

You know, mediawiki allows the powerful template system. But it seems I can't use templates inside clippy.
For example, if I put
<clippy>
{{jack | ID1 = a | ID2 = b }}
<clippy>
then I hope the Template:Have to be copied, with ID1 replaced with "a", and ID2 replaced with "b".
Is it technically possible to make such a template-friendly CopyToClipboard extension? Is it easy to make it? Cosfly (talk) 13:00, 23 August 2012 (UTC)
In the 4th line, I meant to say "Template:Jack", not "Template:Have". A rather obvious typo :)
And although mediawiki automatically transformed what I wrote into "Template:Jack" in the 3rd line, originally I wrote there the following.
| ID1 = a
| ID2 = b
That is why I am writing as such in line 4. Cosfly (talk) 13:03, 23 August 2012 (UTC)
you got me all confused in here :)
I am not much familiar with Template stuff but I think tags can't be put in templates, why don't you ask at #mediawiki on IRC; they know more about templates than I do ;) Nischayn22 (talk) 13:31, 23 August 2012 (UTC)
Hi, I was just revisiting this today and realized what you meant in a more generic way; maybe I know more now.
The functionality you are looking for is to have clippy understand wikitext. This can simply be build into the extension as an additional configurable option. I will like to see this myself sometime; maybe I or somebody else gets to do it. Nischayn22 (talk) 14:31, 10 June 2013 (UTC)
Try substituting the line
$link = htmlspecialchars($input);
by
$link = urlencode(htmlspecialchars($parser->recursiveTagParse($input,$frame)));
Cheers, Christoph. 189.15.142.190 19:49, 1 August 2013 (UTC)
Tried this solution. The copied texts are fine, but when show="true" is on,
any spaces between characters are shown in +, like e.g.;
This+is+a+test.&lt;/pre&gt;
Any other way to get this sorted out? [[User:Lilis2nd|Lilis2nd]] ([[User talk:Lilis2nd|talk]]) 04:42, 9 March 2015 (UTC)
:The spaces are replaced by +.
:Is there no fix for clippy to understand wiki syntax?`In my case I would like to use <nowiki>{{PAGENAME}}</nowiki> within the clippy-tag. That would save a lot of time for me.
:Thx [[Special:Contributions/77.22.112.1|77.22.112.1]] ([[User talk:77.22.112.1|talk]]) 15:07, 18 November 2023 (UTC)

== Bug .$wgClippy ==

Line 34 in <code>CopyToClipboard.php</code> should look like
<syntaxhighlight lang="php" line="" start="34">
$wgClippy =  $wgScriptPath.'/extensions/CopyToClipboard/clippy.swf';

-Christoph 189.15.79.158 21:40, 20 July 2013 (UTC)

I think both ways are correct. Anyways feel free to contribute. Do you have a gerrit account already? Nischayn22 (talk) 01:19, 21 July 2013 (UTC)
Well, the other one didn't work for me. No, I don't have a gerrit account. 189.15.142.190 19:19, 1 August 2013 (UTC)

Remove the "Copy to clipboard" text?

Hi All,

Is it possible to remove or make the text that shows optional. It leaves a giant blank space at the end of the link. If not possible, could I leave a request for the extension creator requesting the option be made as a possibility. See the link for an example

https://i.imgur.com/YOczryy.jpg Jack.f.13 (talk) 02:39, 26 August 2019 (UTC)