You are here

function flashnode_help in Flash Node 6.3

Same name and namespace in other branches
  1. 5.6 flashnode.module \flashnode_help()
  2. 5.2 flashnode.module \flashnode_help()
  3. 5.3 flashnode.module \flashnode_help()
  4. 6.2 flashnode.module \flashnode_help()

Implementation of hook_help

File

./flashnode.module, line 17

Code

function flashnode_help($path, $arg) {
  switch ($path) {
    case 'admin/settings/flashnode':
      return '<p>' . t('Flash node lets you create nodes that store a piece of Flash animation. You can use it in a basic mode, where the Flash item is always displayed at the start of the node, or you can enable the flash filter to incorporate Flash content in to other nodes.') . '</p>';
    case 'admin/help#flashnode':
      $flash_test = '';
      if (defined('SWFTOOLS_INSTALLED')) {
        $flash_test = '<p>' . theme('flashnode', array(
          'filepath' => url(drupal_get_path('module', 'flashnode') . '/flashnode_test_file.swf', array(
            'absolute' => TRUE,
          )),
          'width' => 100,
          'height' => 100,
          'substitution' => t('<span class="error">If you can see this text instead of an animation then JavaScript insertion failed. Check that your browser has JavaScript enabled, and if it does check your SWF Tools settings.</span>'),
        )) . '</p>';
      }
      return t('
      <p>Flash node lets you create nodes that store a piece of <a href="@flash">Flash</a> animation. You can use it in a basic mode, where the Flash item is always displayed at the start of the node, but you can choose whether to have the Flash element displayed in both the teaser and the body, just the teaser, or just the body. You can define the height and width of the Flash element, or you can let the node use the Flash content\'s original settings.</p>

      <p>The module also defines a new input filter called <strong>flashnode</strong> that you can use. This lets you re-use Flash content in other nodes by using the format <strong>[flashnode|nid=&lt;nid&gt;]</strong> in the body of a node. You can pass optional parameters to manipulate the display of the Flash content by including them in the macro. Parameters that are used by flash node are as follows:

      <ul>
      <li>
      <strong>width</strong> - set a specific width, in pixels
      </li><li>
      <strong>height</strong> - set a specific height, in pixels
      </li><li>
      <strong>scale</strong> - scale both width and height to a multiple of the original size
      </li><li>
      <strong>xscale</strong> - scale just the width to a multiple of the original size
      </li><li>
      <strong>yscale</strong> - scale just the height to a multiple of the original size
      </li><li>
      <strong>scalewidth</strong> - set a specific width, in pixels, and automatically adjust the height to maintain the aspect ratio
      </li><li>
      <strong>scaleheight</strong> - set a specific height, in pixels, and automatically adjust the width to maintain the aspect ratio
      </li><li>
      <strong>flashvars</strong> - set a Flashvars string to pass to the Flash movie
      </li>
      </ul>

      For example, to use Flash content from node 10, scaled to 50% of its original size you would use <strong>[flashnode|nid=10|scale=0.5]</strong></p>

      <p>You can include other parameters. These will not be interpreted by flash node, but will be passed on to SWF Tools which may choose to use them.</p>

      <p>Flash node outputs content using HTML embedding and this allows flash node to work without installing any other modules. Using this basic method will result in the \'Click to activate and use this control\' message under Internet Explorer.</p>
      <p>It is recommended to also install <a href="@swftools">SWF Tools</a> as flash node will then use that to output content instead. This lets you take advantage of JavaScript insertion methods. Installing SWF Tools also enables flash node to play back mp3 and flv files via the players that SWF Tools offers. <em>Note - at this time SWF Tools is not available for Drupal 6. Check the SWF Tools project page for the latest information.</em></p>
      <p>Flash node will automatically detect SWF Tools when it is installed and content will then be inserted using the method that you specify in the SWF Tools configuration pages. If you have installed SWF Tools and can see an animation playing below then your installation is working properly and you are ready to use flash node with SWF Tools! If you can\'t see it then double check your SWF Tools settings. In particular check that you have downloaded and installed the necessary JavaScript packages. Refer to the SWF Tools documentation for more details.</p>
      !flashtest
      <p>For more help refer to the <a href="@documentation">flash node documentation</a> on drupal.org.', array(
        '@flash' => 'http://www.adobe.com/products/flashplayer',
        '@swftools' => 'http://drupal.org/project/swftools',
        '@documentation' => 'http://drupal.org/node/214846',
        '!flashtest' => $flash_test,
      ));
  }
}