Drupal Modules and Modifications
This page has a complete list of the CS Club's modifications to Drupal and its modules.
List of third-party modules used:
- advanced_forum
- archive
- captcha
- commentcloser
- content_profile (disabled - didn't like it)
- dhtml_menu
- diff
- ed_readmore [Read More Tweak]
- event
- fasttoggle
- iconizer (disabled - missing icon pack)
- porterstemmer
- switchtheme (disabled - didn't find it useful)
- tac_lite [Taxonomy Access Control Lite]
- tagadelic
- taxonomy_list
- taxonomy_menu (disabled - didn't find it useful)
- taxonomy_image (disabled - needs GD)
Filesystem changes
- sites/default/settings.php has our site-specific settings.
- New line in .htaccess to redirect Forum links to PHPBB:
RedirectPermanent /forum https://www.sonoma.edu:443/phpbb/viewforum.php?f=27 - favicon.ico is currently a copy of the generic SSU favicon. The misc/favicon.ico url used by Drupal is symlinked back to the favicon in public_html.
Code changes
These changes will need to be reprogrammed in after updating the relevant module.
Changes to Advanced Forum module:
This code in template_preprocess_author_pane shows the profile title field: [patch]
// Custom SSU code - Grabs title from user profile. - dmt
$dmt_temp = db_query("select value from profile_values where fid=2 and uid=$account_id");
$dmt_temp2 = db_fetch_object($dmt_temp);
$variables['user_title'] = '<div class="user-title">' . $dmt_temp2->value . '</div>';
In the regular forums module, added to forum.css: [patch]
table.forum-topics td.title {
font-size: 8pt;
}Changes to Event module:
In event/event.css (CSS for the events calendar): [patch]
At line 20:
.event-calendar th {
color: #000;
background: #aac;
text-align: center;
padding: 1px 0.33em;
border: 1px solid #242;
font-size: .75em; /* Added by dmt to shrink width of calendar */
}At line 25:
.event-calendar td {
/* Added by dmt */
position: relative; /* Allows 'a' to be width: 100% */
/* End additions by dmt */
border: 1px solid #bbb;
color: #777;
text-align: right;
vertical-align: top;
margin: 0;
/* Modified by dmt */
padding: 2px !important; /* Override theme style for ie7 bug */
/* End modifications by dmt */
}At line 50:
.event-calendar td a {
/* Added by dmt */
display: block; /* Allows 'width' to work */
width: 100%;
/* End additions by dmt */
color: #222244;
font-weight: bold;
text-decoration: none;
}At event/event.module line 1609 in expand_event, prevent midnight times from changing to "pm" after preview: [patch]
- if ($element['#value']['hour'] > 11) {
+ if ($element['#value']['hour'] > 12) {At event/event.module line 1668 in expand_event, restrict minutes selections to 5 minute increments: [patch]
for ($i = 0; $i <= 59; $i+=5) $options["$i"] = ($i < 10) ? "0$i" : "$i";
At event/event.module around line 1776 (just before the "don't display navigation" if block): [patch]
// Allow browsing forward a few months - dmt
// Based on Liberation's hack - http://drupal.org/node/289960
if($dir == "next"){
$range['month'] = (string)((int)$range['month'] + 2);
// Note: Drupal's event_is_later() handles end-of-year wraparounds.
}At event/event.module line 2963, pad minutes in preview: [patch]
case 'i':
$ret .= str_pad($date['minute'], 2, '0', STR_PAD_LEFT);
break;In event/event_node_edit.js, add ampm boxes to "Event has time" show/hide toggle list: [patch]
var times = new Array("#edit-event-start-exploded-hour",
"#edit-event-start-exploded-minute",
"#edit-event-end-exploded-hour", "#edit-event-end-exploded-minute",
"#edit-event-start-exploded-ampm", "#edit-event-end-exploded-ampm");These are old patches that are kept around just in case we might need code from them in the future. These should be redundant with the new official release. Do not use them.
Changes to System module:
In system/system.css (all added code): [patch]
/* Edit by dmt: Keep floating "show summary" out of textarea */
div#edit-body-wrapper {
clear: both;
}
/* End edit by dmt */In ../includes/file.inc line 50 to fix file upload paths: [patch]
#return url('system/files/'. $path, array('absolute' => TRUE));
return url('files/'. $path, array('absolute' => TRUE));In node/node.tpl.php line 53, this will disable picture posts on nodes except forums (but can be overridden by a theme): [patch]
<?php if(!($type != 'forum')){ print $picture; } ?>Changes to BlueMarine theme:
node.tpl.php line 5 - disable pictures on non-forum nodes: [patch]
<?php if ($picture and (strcmp($type, 'forum') == 0)) {
