Jump to content

converting to php - copy text to your clipboard


ceci

Recommended Posts

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

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.