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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.