Clipboard Button allows you to design templates for the clipboard view mode of any node. This is useful for pasting formatted descriptions of products to online listing services such as Craigslist or eBay.

Knowledge of Drupal theming is required to use this module.

How to install:
1. Copy to modules folder and enable Clipboard Button
2. Download and install the version 1.0.7 or greater of the ZeroClipboard library to 'sites/all/libraries/zeroclipboard'
3. Edit node.tpl.php or node--TYPE.tpl.php, adding a condition for `$view_mode == 'clipboard'` that prints the desired layout.
4. To insert and initialize a clipboard button, you must invoke TEMPLATE_preprocess_node($vars) in template.php and call clipboard_button($nid). The following example will add a button to full and teaser display modes in the title_suffix:

<?php
if ($vars['type'] == 'page' && ($vars['view_mode'] == 'full' || $vars['view_mode'] == 'teaser')) {
    if (module_exists('clipboard_button') && $markup = clipboard_button($vars['nid'])) {
      $vars['title_suffix']['clipboard_button'] = $markup;
    }
  }
?>

Project information

Releases