election 7.x-1.0-beta18

Bug fixes

This is the 18th beta release of Election version 1.0. It is intended to be used in development and testing, not production.

Significant changes since -beta17:

  • You should only be able to add a candidate to a post if you can edit that post. Previously you were able to add candidates if you could create elections. Also clarified other candidate access checks.
  • The 'bypass running election lock' permission used to allow update to an election post, without checking update access to the election.

googlechat 7.x-1.0-beta9

New features

username replaced with realname in chat if realname module enabled and vice-versa

extended_block_visibility 7.x-1.0

New features
Bug fixes

This module extends Drupal's block visibility settings, for ease of configuration and deployment.

Features

  • Allows PHP block visibility to be defined in code.
  • Allows theme specific block visibility code.
  • Removes reliance on core php module and eval() for defining block visibility.

Usage

  1. Edit a block.
  2. Pick one or more of the applicable callback functions from the list provided.
  3. Implement the functions as follows:
/**
 * Block visibility callback for the search form block.
 *
 * @param object $block
 *   The block object.
 *
 * @return bool
 *   TRUE if the block should be displayed on the current page.
 */
function _search_form_block_visibility($block) {
  if ($block->theme == 'my_theme') {
    return !drupal_is_front_page();
  }
  return arg(0) == 'node' && is_numeric(arg(1));
}

Note that if multiple callbacks have been implemented for a block, the most specific match will always be used.

Possible extensions

  • Allow users to specify their own function names for each block.
  • Create a hook which can be implemented by one or more modules to determine block visibility (similar to hook_file_download()).

Pages

Subscribe with RSS Subscribe to RSS - 7.x