Calling all Drupal developers!
Help us get this on the first page of Digg. DIGG NOW!
Help us get this on the first page of Digg. DIGG NOW!
coder_form_alter(&$form, $form_state, $form_id)
contributions/coder/coder.module, line 149
Implementation of hook_form_alter().
Modify the module display view by adding a Coder Review link to every module description.
<?php
function coder_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'system_modules') {
if (user_access('view code review')) {
$path = drupal_get_path('module', 'coder');
drupal_add_css($path .'/coder.css', 'module');
foreach ($form['name'] as $name => $data) {
$description = isset($form['description'][$name]['#value']) ? $form['description'][$name]['#value'] : $data['#value'];
$form['description'][$name]['#value'] = $description .' ('. l(t('Code Review'), "coder/$name") .')';
}
}
}
}
?>