'fieldset', '#title' => t('@title', array('@title' => $params[1])), ); $form[$params[0]]['cmd'] = array( '#type' => 'fieldset', '#title' => t('Command Line'), ); $description = t('{%CWD%} = DRUPAL_ROOT.
{%IN%} = input file.
{%IN_URL_ENC%} = url pointing to the input file that has been url encoded.
{%OUT%} = output file.

'); if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $description .= ' ' . t('Example using the Microsoft Ajax Minifier.

@code1

', array( '@link1' => 'http://ajaxmin.codeplex.com/', '@code1' => 'AjaxMinifier {%IN%} -o {%OUT%}', )); } if ($params[0] === 'js') { $description .= ' ' . t('Example using the Google Closure Compiler.

@code1

', array( '@link1' => 'https://developers.google.com/closure/compiler/docs/gettingstarted_app', '@code1' => 'java -jar compiler.jar --js {%CWD%}/{%IN%} --js_output_file {%OUT%}', )); $description .= ' ' . t('Example using curl to compress via the Online Google Closure Compiler.

@code1

', array( '@link1' => 'https://developers.google.com/closure/compiler/docs/api-ref', '@code1' => 'curl -o {%OUT%} -d output_info=compiled_code -d code_url={%IN_URL_ENC%} http://closure-compiler.appspot.com/compile', )); } if ($params[0] === 'css') { $description .= ' ' . t('Example using the YUI Compressor.

@code1

', array( '@link1' => 'http://yui.github.io/yuicompressor/', '@code1' => 'java -jar yuicompressor-x.y.z.jar --type css --line-break 4096 {%CWD%}/{%IN%} -o {%OUT%}', )); $description .= ' ' . t('Example using curl to compress via an online CSS Compressor.

@code1

', array( '@link1' => 'http://cnvyr.io/', '@code1' => 'curl -o {%OUT%} -F \'files0=@{%IN%}\' http://srv.cnvyr.io/v1?min=css', )); } $form[$params[0]]['cmd']['advagg_ext_compress_' . $params[0] . '_cmd'] = array( '#type' => 'textfield', '#title' => t('Command to run'), '#default_value' => variable_get('advagg_ext_compress_' . $params[0] . '_cmd', ''), '#description' => $description, ); }