I needed to display keywords in the default biblio listing to make it easier to navigate for project participants. So I created a new display style (see attached).

While I was at it, I also changed the way authors are listed so that it follows the following rules:
1 Author: Author1
2 Authors: Author1; and Author2
3 and more Authors: Author1; Author2; and Author3

If anybody's created more styles, this may be a good place to share.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

techczech’s picture

In case anyone's interested. Here's the same thing again but with authors separated by pipes '|'.

csc4’s picture

It would be great if this was built into the settings of the module somewhere - or else themeable

rjerome’s picture

I'm not sure I follow, it would be great it what was built into the settings?

techczech’s picture

I think what csc4 is referring to is the possibility to customize the display of references along the lines what you can do in EndNote (and others). Your new update with the possibility for overriding the CSS may go a long way toward something like that. I think, perhaps, that a better documentation of how to change the style files might be a good interim measure. I'm rather busy at the moment but I will try to put something together on the Wiki - http://groups.drupal.org/node/2829.

csc4’s picture

Sorry - I was a little inscrutable!

I was thinking that the delimiter character could easily be in the settings.

I also thought that a couple of different listing styles for the authors might be possible to be a setting for those not comfortable with CSS changes.

techczech’s picture

Well, that's extremely easy to do in the style I posted. Just change

$commaseparator = '; '
$andseparator = '; and '

to

$commaseparator = ', '
$andseparator = ', and '

In the biblio_style_project.inc I posted. Probably not worth creating a setting for. You can just create a comma style and semi-colon style.

rjerome’s picture

Dominik,

I could include those styles with the distribution, but we would have to come up with some sort of name for them (something a little more meaningful than project and project2). Let me know what you think.

Ron.

techczech’s picture

Ron,

I made these to make it easier for project participants to sort through results (see http://linux1.care.uea.ac.uk/uta/bibliography) so maybe the name "Easy sort" might be descriptive of that. The way the authors are listed is really independent of that so it might be better moved to a separate setting along the lines of normalize author names. However, I'm not sure where that would best live. The code for changing the author names is this:

    $preparsed_authors = _biblio_author_links($authors);
    $parsed_authors = explode(';',$preparsed_authors);
    $commaseparator = ', '; $andseparator = ', and '; $cnt = 0; foreach ((array)$parsed_authors as $item)
      {  if($cnt == 0) $separator = "";
      elseif($cnt == count($parsed_authors) - 1) $separator = $andseparator; 
      else $separator = $commaseparator;
      $output .= $separator." <span style='color: brown;'>".$item."</span>";
            $cnt++; }
      $output .=" ";

I attach the generic easy sort style, as it might go in with biblio. Here are the CSS style definitions that go with it:

/*Biblio easysort style settings*/
.easysort_keywords {
color: #494949; 
font-size: .8em;
margin: 2px 15px 0 30px;
text-indent: -30px;
line-height: 1.2;
}

.easysort_keywords a:link,
.easysort_keywords a:hover
{
color: #660000; 
}

.easysort_keywords a:visited {
color: #990000;
}
catdevrandom’s picture

Status: Active » Closed (fixed)