ceci Posted March 25, 2011 Share Posted March 25, 2011 I found this "https://github.com/mojombo/clippy" Clippy into our site which uses php. The example is written in Rails (Ruby). https://github.com/mojombo/clippy#readme Can anyone help me convert that into php? Here is my attempt but not getting any results. <? if ( ! function_exists('clipit')) { function clipit($var = 'Copy me please') { $clippy_url = '/resources/flash/clippy.swf'; $clippy = <<< EOD <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="110" height="14" id="clippy" > <param name="movie" value="$clippy_url"/> <param name="allowScriptAccess" value="always" /> <param name="quality" value="high" /> <param name="scale" value="noscale" /> <param NAME="FlashVars" value="text=$var"> <param name="bgcolor" value="#FFFFFF"> <embed src="$clippy_url" width="110" height="14" name="clippy" quality="high" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="text=$var" bgcolor="#FFFFFF" /> </object> EOD; return $clippy; } } ?> Thanks Link to comment https://forums.phpfreaks.com/topic/231716-converting-to-php-copy-text-to-your-clipboard/ Share on other sites More sharing options...
sunfighter Posted March 26, 2011 Share Posted March 26, 2011 Before getting too deep into this you should know that firefox does not allow php or javascript to write to the clipboard as a security measure. Link to comment https://forums.phpfreaks.com/topic/231716-converting-to-php-copy-text-to-your-clipboard/#findComment-1192562 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.