Commit 9a9b3a05 authored by kpaxman's avatar kpaxman
Browse files

Creating 1.4-beta2 tag

parents
CHANGELOG for UW Base Profile for Drupal 7
Ticket numbers are for UW RT tickets
UW Base Profile 7.x-1.4
=======================
#213841 by kpaxman: Display the friendly path in autocomplete to help users differentiate same-named links
#217395 by kpaxman: Fix broken links when uploading a file containing spaces in the filename
#213861 by kpaxman: Add "clone" option to actions tab for web pages
#222327 by kpaxman: Make "rearrange" icon different from "add" icon in Workbench
#221499 by kpaxman: Ignore extra leading and trailing spaces when determining promo item visibility
#222406 by kpaxman: Update events views to show events that include the current date, even if they started earlier
#214115 by kpaxman: Add home page banner slideshow capability
#221683 by lkmorlan: Provide form capability
#214019 by btlang: Path structure should be determined by site hierarchy
#214609 by javoskam: WCMS auto logout fix
#223305 by kolafson: Site managers now able to manage multiple shortcut bars
#224314 by javoskam: PHP sessions must end when browser closed
#224601 by lkmorlan: Embed videos with HTTPS
#224685 by kpaxman: Ordered list margin fix
#214111 by mnshantz: Added RSS feeds for events
#214113 by mnshantz: Added RSS feeds for news items
#214905 by kpaxman: "Add a new file" option disappears when a non-uploaded image is added to a web page - fixed
#214958 by kpaxman: Fix for fields missing auto complete
#215632 by kolafson: Content authors can now add custom page titles with meta tags
#216311 by mnshantz: News and Events filtering blocks made consistent
#217395 by kpaxman: Fix for uploading a file where filename includes spaces
#220045 by kolafson: Increase number of person profiles from 3 to 5
#221242 by lkmorlan: News and promo items bodies now required
#221253 by lkmorlan: uw_auth_wcms_admins module now uses ldap/group membership to grant admin access upon login
#221499 by kpaxman: Fix for promotional item visibility does not work when extra white space is present
#221930 by ccarigna: Add "required" text beside * for required fields
#221826 by javoskam: Upgrade to Drupal 7.12 (http://drupal.org/node/1425104 for release notes)
#222104 by kolafson: Update Libraries module from 7.x-2.0-alpha1 to 7.x-2.0-alpha2 (http://drupal.org/node/1371706 for release notes)
#222106 by kolafson: Update Redirect module from 7.x-1.0-beta3 to 7.x-1.0-beta4 (http://drupal.org/node/1365170 for release notes)
#222109 by kolafson: Upgrade References module from 7.x-2.x-dev to 7.x-2.0 final (http://drupal.org/node/1380830 for release notes)
#222110 by kolafson: Upgrade Role Assign module from 7.x-1.0-beta2 to 7.x-1.0-rc1 (http://drupal.org/node/1353242 for release notes)
#222112 by kolafson: Upgrade Strongarm module from 7.x-2.0-beta4 to 7.x-2.0-beta5 (http://drupal.org/node/1373018 for release notes)
#222113 by kolafson: Upgrade Token module from 7.x-1.0-beta7 to 7.x-1.0-rc1 (http://drupal.org/node/1422936 for release notes)
#223833 by kolafson: PDF icon added for Manage PDFs link
#222346 by mnshantz: Lock down official taxonomy terms and open up taxonomy access for site managers
#223074 by kpaxman: Fix for banner links being cut off
#223408 by kpaxman: Fix for images appearing squished within table
#224263 by kpaxman: Fix for chrome issues with WCMS theme - text over other text, etc
#224271 by kpaxman: Fix for image galleries can't be placed in Information for menu hierarchy
#224597 by kpaxman: Added "start" attribute to allowed list for numbered lists
#225508 by kolafson: Update schema.org module to 7.x-1.0-beta2 - now has native features support (http://drupal.org/node/1439946 for release notes)
#225513 by temiller: Enable content locking so two users can't edit the same content at one time
#214118 by temiller: Users should be able to check their sites for broken links with an automated process
UW Base Profile 7.x-1.3
=======================
#209535 by mnshantz: Change order of content types from most to least used
#210127 by kpaxman: Implement property/attribute filters (WYSIWYG Filter put in place)
#210139 by mnshantz: Users shouldn't be able to delete content easily - archive instead to avoid accidents
#211305 by ccarigna: Add a button when logged in to 'view as anonymous user'
#211770 by kolafson: Terms added and rearranged in Profile Type Taxonomy
#213607 by kolafson: Menus now appear on 404 pages
#213858 by ccarigna: A 2 column template is now available for sitebar content
#213863 by ccarigna: Styling fixes for visited links
#213976 by leharris: Image gallery content type added
#215135 by kolafson: Fix for banner image urls being cut off
#215309 by kpaxman: Fix for Contact content type LDAP lookup for hidden users
#215590 by kpaxman: Fix for Paste with Plain Text not inserting text
#215910 by javoskam: Upgrade Drupal Core from 7.9 to 7.10
#215926 by ccarigna: Fixes to site footer styling
#216765 by kolafson: Schema.org module update
#219173 by kolafson: Views module updated to 3.0
#219176 by kolafson: Draggable views updated to latest dev
#219555 by kpaxman: Live remote images now available, not cached locally anymore
#219695 by javoskam: CAS default domain variable set to uwaterloo.ca
UW Base Profile 7.x-1.2
=======================
#213864 by kpaxman: Fix for losing content when switching to source view
#214021 by kpaxman: Added "not" functionality for promotional item placement
#214024 by ccarigna: Added thumbnail images for events and news items
#214811 by kolafson: Updating CAS module to 7.x-1.1
#214832 by kolafson: Update Pathauto persistent state module to 7.x-1.2
#214838 by kpaxman: Site managers can now clear the cache
Prerequisites
-------------
PHP is required, the install profile has been tested with version 5.3.3.
The LDAP module for PHP5 is required for the Contact Feature to retrieve user information from LDAP (php5-ldap). This module may not be installed by default.
A copy of Drupal is also required; this version of the install profile has been tested on Drupal 7.10.
In order to retrieve all the files required for the install, the rebuild.sh script requires the installation of Drush (http://drupal.org/project/drush), Drush Make (http://drupal.org/project/drush_make) and Subversion (SVN).
Drush Make may work from several locations. One good place to save it is in a hidden .drush folder in your home folder. Ex. ~/.drush/drush_make/<files go here>
Finally, a database installation is also required. mySQL is recommended, and the install profile has been tested on 5.5.16.
Installation
------------
To get things started, the profile files should be copied to "drupal/profiles/uw_base_profile".
Then run "./rebuild.sh" to pull down all the required themes, modules, features and libraries.
After that is complete, start a Drupal site installation process (http://<your Drupal site address>/install.php)
If the profile is sitting in the correct folder, you should see "uWaterloo Base Profile" in addition to the usual Standard and Minimal installation profiles. Select that and press the "Save and continue" button.
On the next page, "Choose language", select English and continue.
The "Verify requirements" page will only appear if you are not satisfying a requirement, for example by having incorrect folder permissions. You must satisfy all requirements to proceed.
The "Set up database" page appears if your database information was not previously configured. Enter your database information and press "Save and continue".
The "Install profile" page will appear as Drupal is installing.
Once that is complete, you will be at the "Configure site" page. This is the standard Drupal site configuration page; enter the information and continue. Please note that you are creating a admin local user for this point and not a CAS user. Press "Save and continue".
On the next page "Optionally enable a site controller", you will probably want to select the FDSU configuration (unless you want to turn on all the components individually).
Next is the "Enable features" page. Here you can enable the content types you want to use on your site. The web page content type is turned on by default. Additionally, you can enable modules that help with development here. Please do not enable these modules on a production site.
Finally, you can choose to have some basic pages created for you. The last stage can take several minutes to complete, regardless of whether or not you create pages.
#!/bin/sh
rm -rf libraries modules themes
drush make --working-copy --no-core -y --contrib-destination=. uw_base_profile.make
mkdir ./modules/contrib/rdfx/vendor
ln -s ../../../../libraries/arc2/ ./modules/contrib/rdfx/vendor/arc
chmod -R g+w *
name = uWaterloo Base Profile
description = uWaterloo base Installation Profile. Has options to install Main and FDSU sites.
version = 7.x-1.4
core = 7.x
dependencies[] = block
dependencies[] = color
dependencies[] = contextual
dependencies[] = dashboard
dependencies[] = help
dependencies[] = image
dependencies[] = list
dependencies[] = menu
dependencies[] = number
dependencies[] = options
dependencies[] = path
dependencies[] = taxonomy
dependencies[] = dblog
dependencies[] = search
dependencies[] = toolbar
dependencies[] = field_ui
dependencies[] = file
dependencies[] = rdf
dependencies[] = shortcut
files[] = uw_base_profile.profile
<?php
// $Id: uWaterloo Base
/**
* Implements hook_install().
*
* Perform actions to set up the site for this profile.
*/
function uw_base_profile_install() {
// Enable some standard blocks.
$default_theme = variable_get('theme_default', 'bartik');
$admin_theme = 'seven';
$values = array(
array(
'module' => 'system',
'delta' => 'main',
'theme' => $default_theme,
'status' => 1,
'weight' => 0,
'region' => 'content',
'pages' => '',
'cache' => -1,
),
array(
'module' => 'system',
'delta' => 'help',
'theme' => $default_theme,
'status' => 1,
'weight' => 0,
'region' => 'help',
'pages' => '',
'cache' => -1,
),
array(
'module' => 'system',
'delta' => 'main',
'theme' => $admin_theme,
'status' => 1,
'weight' => 0,
'region' => 'content',
'pages' => '',
'cache' => -1,
),
array(
'module' => 'system',
'delta' => 'help',
'theme' => $admin_theme,
'status' => 1,
'weight' => 0,
'region' => 'help',
'pages' => '',
'cache' => -1,
),
array(
'module' => 'user',
'delta' => 'login',
'theme' => $admin_theme,
'status' => 1,
'weight' => 10,
'region' => 'content',
'pages' => '',
'cache' => -1,
),
);
$query = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'cache'));
foreach ($values as $record) {
$query->values($record);
}
$query->execute();
// Disable user picture support and set the default to a square thumbnail option in case it is enabled later.
variable_set('user_pictures', '0');
variable_set('user_picture_dimensions', '1024x1024');
variable_set('user_picture_file_size', '800');
variable_set('user_picture_style', 'thumbnail');
// Allow visitor account creation with administrative approval.
variable_set('user_register', USER_REGISTER_ADMINISTRATORS_ONLY);
// Create an image field named "Image", enabled for the 'article' content type.
// Many of the following values will be defaulted, they're included here as an illustrative examples.
// See http://api.drupal.org/api/function/field_create_field/7
$field = array(
'field_name' => 'field_image',
'type' => 'image',
'cardinality' => 1,
'translatable' => TRUE,
'locked' => FALSE,
'indexes' => array('fid' => array('fid')),
'settings' => array(
'uri_scheme' => 'public',
'default_image' => FALSE,
),
'storage' => array(
'type' => 'field_sql_storage',
'settings' => array(),
),
);
field_create_field($field);
// Get the admin role ID from the variable, if it doesn't exist yet we need to define it
$admin_role_id = variable_get('user_admin_role');
if (empty($admin_role_id)) {
// Create a default role for site administrators, with all available permissions assigned.
$admin_role = new stdClass();
$admin_role->name = 'administrator';
$admin_role->weight = 2;
user_role_save($admin_role);
user_role_grant_permissions($admin_role->rid, array_keys(module_invoke_all('permission')));
// Set this as the administrator role.
variable_set('user_admin_role', $admin_role->rid);
$admin_role_id = $admin_role->rid;
}
// Assign user 1 the "administrator" role.
db_insert('users_roles')
->fields(array('uid' => 1, 'rid' => $admin_role_id))
->execute();
// Create a Home link in the main menu.
$item = array(
'link_title' => st('Home'),
'link_path' => '<front>',
'menu_name' => 'main-menu',
);
menu_link_save($item);
// Update the menu router information.
menu_rebuild();
// Enable the admin theme.
db_update('system')
->fields(array('status' => 1))
->condition('type', 'theme')
->condition('name', 'seven')
->execute();
variable_set('node_admin_theme', '1');
// Set default theme to gateways
theme_enable(array('seven'));
variable_set('admin_theme', 'seven');
variable_set('node_admin_theme', '1');
// Set date-related variables.
variable_set('date_first_day', '1');
variable_set('date_api_use_iso8601', TRUE);
variable_set('date_format_long', 'l, F j, Y - H:i');
variable_set('date_format_medium', 'D, Y-m-d H:i');
variable_set('date_format_short', 'Y-m-d H:i');
}
This diff is collapsed.
<?php
/*
* This function is called by form submit handlers to increase script execution time limits.
*/
function _uw_base_profile_max_execution_time() {
// Increase execution time for installs.
if ((int)ini_get('max_execution_time') < 240) {
set_time_limit(240);
}
// Make sure the MySQL does not die while scripts are executed.
if (function_exists('db_query')) {
db_query('SET SESSION wait_timeout = 240');
}
}
/**
* Implements hook_form_FORM_ID_alter().
*
* Allows the profile to alter the site configuration form.
*/
function uw_base_profile_form_install_configure_form_alter(&$form, $form_state) {
// Pre-populate the site name with the server name.
$form['site_information']['site_name']['#default_value'] = $_SERVER['SERVER_NAME'];
// Pre-populate the country with "Canada".
$form['server_settings']['site_default_country']['#default_value'] = 'CA';
// Disable time zone autodetect and default to "America/Toronto".
$form['server_settings']['date_default_timezone']['#attributes']['class'][0] = '';
$form['server_settings']['date_default_timezone']['#default_value'] = 'America/Toronto';
// Disable email notifications by default.
$form['update_notifications']['update_status_module']['#default_value'][1] = 0;
}
/**
* Implements hook_install_tasks().
*/
function uw_base_profile_install_tasks() {
$tasks = array();
$tasks['uw_select_site_controller_form'] = array(
'display_name' => st('Site controller'),
'type' => 'form',
);
$tasks['uw_select_site_features_form'] = array(
'display_name' => st('Features'),
'type' => 'form',
);
$tasks['uw_create_default_content_form'] = array(
'display_name' => st('Create content'),
'type' => 'form',
);
return $tasks;
}
/**
* Task callback: returns the form allowing the user to select a site controller.
*/
function uw_select_site_controller_form() {
drupal_set_title(st('Optionally enable a site controller'));
$form['select_site_controller'] = array(
'#type' => 'radios',
'#title' => st('Please select a site configuration'),
'#options' => array('none' => st('None'), 'fdsu' => st('FDSU'), 'main' => st('Main')),
'#default_value' => 'none',
);
$form['actions'] = array('#type' => 'actions');
$form['submit'] = array('#type' => 'submit', '#value' => st('Enable and continue'));
return $form;
}
/**
* Submit callback: turns on a site controller
*/
function uw_select_site_controller_form_submit(&$form, &$form_state) {
_uw_base_profile_max_execution_time();
if ($form_state['values']['select_site_controller'] == 'fdsu') {
$success = module_enable(array('uw_site_fdsu'));
}
if ($form_state['values']['select_site_controller'] == 'main') {
$success = module_enable(array('uw_site_main'));
}
if (isset($success) && !$success) {
drupal_set_message('Could not enable site controller, a module dependency was missing -- the function module_enable() returned FALSE', 'error');
}
}
/**
* Task callback: returns the form allowing the user to turn on features at install time.
*/
function uw_select_site_features_form() {
drupal_set_title(st('Enable features'));
$form['enable_content_types'] = array(
'#type' => 'fieldset',
'#title' => st('Enable content types'),
'#collapsible' => FALSE,
'#tree' => TRUE,
);
// the array key is the name of the module
$form['enable_content_types']['uw_ct_contact'] = array(
'#type' => 'checkbox',
'#title' => st('Contacts'),
);
$form['enable_content_types']['uw_ct_event'] = array(
'#type' => 'checkbox',
'#title' => st('Events'),
);
/* Removing Feature Stories until the reqs are sorted out
$form['enable_content_types']['uw_ct_feature_story'] = array(
'#type' => 'checkbox',
'#title' => st('Feature stories'),
);
*/
$form['enable_content_types']['uw_ct_home_page_banner'] = array(
'#type' => 'checkbox',
'#title' => st('Home page banners'),
);
$form['enable_content_types']['uw_ct_news_item'] = array(
'#type' => 'checkbox',
'#title' => st('News items'),
);
$form['enable_content_types']['uw_ct_person_profile'] = array(
'#type' => 'checkbox',
'#title' => st('People profiles'),
);
$form['enable_content_types']['uw_ct_image_gallery'] = array(
'#type' => 'checkbox',
'#title' => st('Image galleries'),
);
$form['enable_content_types']['uw_ct_promo_item'] = array(
'#type' => 'checkbox',
'#title' => st('Promotional items'),
);
$form['enable_content_types']['uw_ct_web_form'] = array(
'#type' => 'checkbox',
'#title' => st('Web Form'),
);
/* DEVELOPMENT */
$form['enable_development'] = array(
'#type' => 'fieldset',
'#title' => st('Enable development modules'),
'#collapsible' => FALSE,
'#tree' => TRUE,
);
$form['enable_development']['uw_auth_wcms_admins'] = array(
'#type' => 'checkbox',
'#title' => st('Add WCMS administrators'),
);
$form['enable_development']['coder'] = array(
'#type' => 'checkbox',
'#title' => st('Coder'),
);
$form['enable_development']['coder_review'] = array(
'#type' => 'checkbox',
'#title' => st('Coder Review'),
'#states' => array(
'visible' => array( // action to take.
':input[name="enable_development[coder]"]' // element to evaluate condition on
=> array('checked' => TRUE), // condition
),
),
);
$form['enable_development']['context_ui'] = array(
'#type' => 'checkbox',
'#title' => st('Context UI'),
);
$form['enable_development']['devel'] = array(
'#type' => 'checkbox',
'#title' => st('Devel'),
);
$form['enable_development']['devel_generate'] = array(
'#type' => 'checkbox',
'#title' => st('Devel Generate'),
'#states' => array(
'visible' => array( // action to take.
':input[name="enable_development[devel]"]' // element to evaluate condition on
=> array('checked' => TRUE), // condition
),
),
);
$form['enable_development']['drupal_reset'] = array(
'#type' => 'checkbox',
'#title' => st('Drupal Reset'),
);
$form['enable_development']['module_filter'] = array(
'#type' => 'checkbox',
'#title' => st('Module filter'),
);
$form['enable_development']['views_ui'] = array(
'#type' => 'checkbox',
'#title' => st('Views UI'),
);
$form['actions'] = array('#type' => 'actions');
$form['submit'] = array('#type' => 'submit', '#value' => st('Enable and continue'));
return $form;
}
/**
* Submit callback: creates the requested default content.
*/
function uw_select_site_features_form_submit(&$form, &$form_state) {
_uw_base_profile_max_execution_time();
$modules = array();
if (!empty($form_state['values']['enable_content_types'])) {
$modules = $form_state['values']['enable_content_types'];
}
if (!empty($form_state['values']['enable_development'])) {
$modules = array_merge($modules, $form_state['values']['enable_development']);
}
if (!empty($modules)) {
_uw_base_profile_enable_modules($modules);
}
}
/**
* Task callback: returns the form allowing the user to create initial or default content on install.
*/
function uw_create_default_content_form() {
drupal_set_title(st('Create initial default content'));
/* Default Web Pages */
if (module_exists('uw_ct_web_page')) {
$form['add_default_pages'] = array(
'#type' => 'fieldset',
'#title' => st('Create default web pages'),
'#collapsible' => FALSE,
'#tree' => TRUE,
);
$form['add_default_pages']['home'] = array(
'#type' => 'checkbox',
'#title' => st('Home'),
'#default_value' => 1,
);
$form['add_default_pages']['about'] = array(
'#type' => 'checkbox',
'#title' => st('About'),
'#default_value' => 1,
);
}
/* Turn on term lock for profile and audience taxonomies */
if (module_exists('uw_vocab_audience') || ('uw_ct_person_profile')) {
$form['add_vocab_pages'] = array(
'#type' => 'fieldset',
'#title' => st('Add terms to vocabularies'),
'#collapsible' => FALSE,
'#tree' => TRUE,
);
/* Add Audience vocabulary terms */
if (module_exists('uw_vocab_audience')) {
$form['add_vocab_pages']['audience'] = array(
'#type' => 'checkbox',
'#title' => st('Audience Vocabulary Terms'),
'#default_value' => 1,
);
}
/* Add Profile vocabulary terms */
if (module_exists('uw_ct_person_profile')) {
$form['add_vocab_pages']['profile'] = array(
'#type' => 'checkbox',
'#title' => st('Profile Vocabulary Terms'),
'#default_value' => 1,
);
}
}
$form['actions'] = array('#type' => 'actions');
$form['submit'] = array('#type' => 'submit', '#value' => st('Continue'));
return $form;
}
/**
* Submit callback: creates the requested default content.
*/
function uw_create_default_content_form_submit(&$form, &$form_state) {
_uw_base_profile_max_execution_time();
// clear all caches to rebuild the registry and node types that were setup earlier
drupal_flush_all_caches();
$modules = array();
// add default pages
if (!empty($form_state['values']['add_default_pages'