I have made a few modifications to core module files to enhance the usability of the site. Listed below are some of the changes that I have invoked over the past few weeks to suit my preferences. These are purely personal and not required for the accessibility module.
<?php
/* CHANGED SORT ORDER
$header = array(
array('data' => t('Hits'), 'field' => 'hits', 'sort' => 'desc'),
array('data' => t('Url'), 'field' => 'url'),
array('data' => t('Last visit'), 'field' => 'last'),
);
*/
$header = array(
array('data' => t('Hits'), 'field' => 'hits'),
array('data' => t('Url'), 'field' => 'url'),
array('data' => t('Last visit'), 'field' => 'last', 'sort' => 'desc'),
);
<?php
/* CHANGED ADMIN THEME OPTION TO EXTEND TO ADD PAGE ETC...
if (arg(0) == 'admin') {
global $custom_theme;
$custom_theme = variable_get('admin_theme', '0');
drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
}
*/
if (arg(0) == 'admin' OR (arg(0) == 'node' AND arg(1) == 'add') OR
( arg(0) == 'node' AND ( arg(2) == 'edit' OR arg(2) == 'localizernode') ) ) {
global $custom_theme;
$custom_theme = variable_get('admin_theme', '0');
drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
}
<?php
/* CHANGED QUERY TO EXCLUDE CATEGORIES AND CONTAINERS IF NO UID SELECTED ... */
if ($uid) {
//~ STUFF
}
else { //~ CHANGED to filter by content type when UID
$sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, ';
$sql .= 'GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count ';
$sql .= 'FROM {node} n INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid ';
$sql .= 'WHERE n.status = 1 AND n.type NOT IN ('category_cat', 'category_cont') ORDER BY last_updated DESC';
$sql = db_rewrite_sql($sql);
$sql_count = 'SELECT COUNT(n.nid) FROM {node} n WHERE n.status = 1';
$sql_count = db_rewrite_sql($sql_count);
$result = pager_query($sql, 25, 0, $sql_count);
}
I am also using a modified common.inc, you can see those changes on the Common Inc V5 page. More details of each "hack" can be found in the Drupal code section.