Site customization
The following modules were site customized or modified.
Theme - bluelake
A
template.php was added to display the name of the drupal user who had last updated the page along with the original page author.
This was requested to ease the maintenance of pages maintained by multiple users (when ACLs are set to allow many to all to edit and modify).
The code is as below
function phptemplate_node_submitted($node) {
// JL - Simplified logic originally taken from https://drupal.org/node/511642
if ($node->changed ){
// The node was changed from its original format - good ..
$revuid = $node->revision_uid;
if ( $revuid != 0 && $revuid != $node->uid ){
// Only display this if the revision owner UID differs from the original owner UID
$revname = db_result(db_query("SELECT name FROM {users} WHERE uid = %d",$revuid));
# JL - be careful of possible orphans
if ( empty($revname) ){ $revname = 'unknown'; }
else { $revname = '<a href="'.url("user/$revname").'">'.$revname.'</a>'; }
return t('Updated on @changed by !newuser. Originally created by !username on @created.',
array(
'@changed' => format_date($node->changed, 'medium'),
'!newuser' => $revname,
'!username' => theme('username', $node),
'@created' => format_date($node->created, 'small'),
));
} else {
// No need to show the revised uid as they are the same
return t('Updated on @changed. Originally created by !username on @created.',
array(
'@changed' => format_date($node->changed, 'medium'),
'!username' => theme('username', $node),
'@created' => format_date($node->created, 'small'),
));
}
} else {
// Return the default formatting
return t('Submitted by !username on @datetime',
array(
'!username' => theme('username', $node),
'@datetime' => format_date($node->created),
));
}
}
NODE ACCESS patch to maintain OG compatibility
see attached file..
Advanced Poll module has broken CSS for Ranking polls
By default,
advpoll-display-ranking-form.tpl.php does not include:
<div style="clear:both"></div>
...so container height is not calculated properly.
Captcha - enable AFS user name lookup
changed file: /var/www/html/STAR/sites/all/modules/captcha/captcha.module
1. added function:
function captcha_validate_star_account_by_afs() {
if ( $_POST['form_id'] === 'user_register' && !empty( $_POST['captcha_token'] ) ) {
$dirname = '/afs/rhic.bnl.gov/star/users/'.$_POST['name'];
return file_exists( $dirname );
}
return true;
}
2. modified functions: captcha_validate_strict_equality, captcha_validate_case_insensitive_equality, captcha_validate_ignore_spaces, captcha_validate_case_insensitive_ignore_spaces
added line:
if ( captcha_validate_star_account_by_afs() === false ) { return false; }