You are here

function _swftools_zlib in SWF Tools 6.3

Same name and namespace in other branches
  1. 6.2 swftools.admin.status.inc \_swftools_zlib()

Check for presence of the zlib library.

Return value

string Markup string for inclusion in report.

1 call to _swftools_zlib()
swftools_status in includes/swftools.admin.status.inc
Generates a status report for SWF Tools methods / players / media defaults.

File

includes/swftools.admin.status.inc, line 291
Generates status reports for SWF Tools.

Code

function _swftools_zlib() {

  // Check if zlib is available
  $has_zlib = extension_loaded('zlib');

  // Build an array of requirements ready for a call to theme_status_report()
  $requirements['swftools'] = array(
    'title' => t('Zlib library'),
    'description' => '',
    'value' => $has_zlib ? t('Enabled') : t('Not installed'),
    'severity' => $has_zlib ? REQUIREMENT_OK : REQUIREMENT_WARNING,
  );

  // Generate the output string and return it
  $html = t('<h3>Zlib library</h3>');
  $html .= t('<p>SWF Tools requires the <a href="@url">zlib library</a> in order to automatically determine the dimensions of compressed swf files. If this library is not installed then SWF Tools will work but you may have to specify the size of swf content when it is produced, otherwise the content may not appear in some browsers.</p>', array(
    '@url' => 'http://www.php.net/zlib',
  ));
  $html .= theme('status_report', $requirements);

  // Return finished markup
  return $html;
}