You are here

function _swftools_test_content in SWF Tools 6

Same name and namespace in other branches
  1. 6.3 includes/swftools.admin.status.inc \_swftools_test_content()
  2. 6.2 swftools.admin.status.inc \_swftools_test_content()
1 call to _swftools_test_content()
_swftools_status_embedding in ./swftools.admin.status.inc
Generate a status report for embedding methods Called from swftools_status() and returns markup

File

./swftools.admin.status.inc, line 231

Code

function _swftools_test_content($severity, $method) {

  // Generate the output string and return it
  $html = '';
  $html .= t('<h3>Test content</h3>');
  if ($severity == REQUIREMENT_ERROR) {
    $html .= t('<p>SWF Tools cannot currently generate test content as the chosen embedding method is not available. Refer to the table above for assistance in fixing the problem.</p>');
  }
  else {

    // Build file path to the test file
    $file = url(drupal_get_path('module', 'swftools') . '/shared/swftools_test_file.swf', array(
      'absolute' => TRUE,
    ));
    $html .= t('<p>SWF Tools is now trying to generate some flash content using the currrently configured embedding method (%current). If you can see an animation below then SWF Tools appears to be installed correctly.</p>', array(
      '%current' => $method,
    ));
    $html .= swf($file, array(
      'params' => array(
        'height' => 150,
        'width' => 150,
      ),
    ));
    $html .= t('<p> If the animation does not appear then check that your browser has the necessary Flash plug-in, and that JavaScript is enabled (if required). Also try clearing your browser\'s cache.</p>');
  }
  return $html;
}