function _swftools_test_content in SWF Tools 6.3
Same name and namespace in other branches
- 6 swftools.admin.status.inc \_swftools_test_content()
- 6.2 swftools.admin.status.inc \_swftools_test_content()
Generates some test content using a simple swf movie.
Parameters
int $severity: The severity level associated with the currently defined embedding method. Either:
- REQUIREMENT_OK: the method is available
- REQUIREMENT_ERROR: the method is not available
string $method: The name of the currently enabled embedding method.
Return value
string A string of markup.
1 call to _swftools_test_content()
- _swftools_status_embedding in includes/
swftools.admin.status.inc - Generates a status report for embedding methods.
File
- includes/
swftools.admin.status.inc, line 264 - Generates status reports for SWF Tools.
Code
function _swftools_test_content($severity, $method) {
// Generate the output string and return it
$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 = base_path() . drupal_get_path('module', 'swftools') . '/swf/swftools_test_file.swf';
$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;
}