Biblio is a tremendous module, but the output is hardly themer-friendly. I'm a designer with little knowledge of PHP, and I've had to resort to hacking biblio_theme.inc and other files in the module. I wish there were a clear guide for making changes to the module outside oft he module folder.

Most of these hacks to the module could have been avoided entirely -- had there been a different, more themer-friendly approach to the output.

Here's an example:

  for ($i = 65; $i <= 90; $i++) {
    if ($i == ord($current)) {
      $output .= '<b>[' . chr($i) . ']</b>&nbsp;';
    }
    else{
      $uri['query']['f'][$filter] =  chr($i);
      $output .= l(chr($i), $uri['path'], $uri) . '&nbsp;';
    }
  }
  if ($current) {
    if (empty($all_uri['query']['f'])) unset($all_uri['query']['f']);
    $output .= '&nbsp;&nbsp;' . l(t('Show ALL'), $all_uri['path'], $all_uri);
  }
  $output .= '</div>';
  return $output;

For the alphabetical navigation (biblio-alpha-line a), the buttons should not be spaced with non-breaking spaces (&nbsp;&nbsp;). Instead, they should be spaced apart with a margin-right in CSS.

Similarly, the active class has square brackets and deprecated <b...</b> tags. By placing the output inside an element like

, the button could have been themed to have a different color and border to make it stand out.

Finally, any use of uppercase in the interface should not be placed in the t( ) functions. All caps should be placed inside of a element, so that the case can be toggled off or further emphasized with color, font-size, etc.

I'm happy to contribute styles to biblio.css in exchange for updating the module to make it more themer-friendly.

Comments

modulist’s picture

Also, please, please don't put square brackets into the markup! This can be handled far, far better with <div class="button">.

Here's an example:

$content .= '&nbsp;&nbsp;' . l('[' . t('Reset Search') . ']', "$base/filter/clear", $link_options);

This could be:

$content .= l('<div class="button reset">' . t('Reset Search') . '</div>', "$base/filter/clear", $link_options);

with the following css attributes:

.button {
  margin-left: 12px;
  border-radius: 3px;
  border: 1px solid #ccc;
  text-decoration: none:
}
.reset {
  //attributes that make reset buttons different
}
rjerome’s picture

I'm happy to contribute styles to biblio.css in exchange for updating the module to make it more themer-friendly.

Deal!

As you have probably already surmised, I'm not a "themer", although I've been getting into that side of things a bit more lately on some other projects.

Suggestions and contributions are welcomed.

Ron.