Hello,

First, this is an excellent module and I'm enjoying working with it much more than the hacked together bibliography module I once made for Drupal 4.6.

Anyway, I seem to have found a problem. I have quite a lot of works with only corporate authors, and when I sort my biblio list to sort by author, these works don't show up at all. At first I thought this was due to my style (MLA)'s lack of handling corporate authors, but I tried in e.g. APA and got the same result.

I want to make author name the default sort, but that's not going to work out if doing so has the effect of cutting out half of my entries!

Any ideas? I looked around biblio.pages.inc, but I'm not sure what the right approach would be to handling this.

Zach

Comments

zwhalen’s picture

I've got a partial workaround going. I don't know if anyone else will find this useful, and for all I know I could be completely misunderstanding some basic functionality, so I'll just paste it here.

First, I removed a line of code that was limiting the basic query to only find entries with contributor types of 1 (primary author). I found this on line 160 of biblio.pages.inc, and I just commented it out:

      //$where['bc-auth-category'] = "bc.auth_category=1";

Next, I discovered that the code which processes and displays results only looks for contributor data of primary author type, even if the query returns all types. This causes an HTML problem, because this the code that formats and prints out the separator bar divs. I found this in the neighborhood of line 688, where there's a check for a lastname that was always failing because it was looking in the wrong place:

case 'author':
      if ( (isset($node->biblio_contributors[1][0]['lastname'])) &&
      (drupal_substr(drupal_ucfirst(ltrim($node->biblio_contributors[1][0]['lastname'])), 0, 1) != $_text))
      {
        
      
        if ($_text != '' ) {
          $content .= theme_biblio_end_category_section();
	
        }
        $_text = drupal_substr(drupal_ucfirst(ltrim($node->biblio_contributors[1][0]['lastname'])), 0, 1) ;
        $content .= theme_biblio_separator_bar($_text);
	
      } 
break;

So to make it work for me, I just added an alternative to that if block so something still gets printed even if the check for lastname fails:

case 'author':
      if ( (isset($node->biblio_contributors[1][0]['lastname'])) &&
      (drupal_substr(drupal_ucfirst(ltrim($node->biblio_contributors[1][0]['lastname'])), 0, 1) != $_text))
      {
        
      
        if ($_text != '' ) {
          $content .= theme_biblio_end_category_section();
	
        }
        $_text = drupal_substr(drupal_ucfirst(ltrim($node->biblio_contributors[1][0]['lastname'])), 0, 1) ;
        $content .= theme_biblio_separator_bar($_text);
	
      } 
        // hack follows
      else{
        if ($_text != '' ) {
          $content .= theme_biblio_end_category_section();
        }
        $content .= theme_biblio_separator_bar('  ');
      }
break;

Now, I realize that the restriction to primary author types was probably put in there for a good reason, but for now at least, it looks like I'm getting the behavior I need by taking it out.

Thoughts?

rjerome’s picture

Yes, you are on the right track, however if you might want to look into using views, I think you could do this without touching the code, (although you might have to use the -dev version for the time being).

This is a known issue, however since I'm pretty much converting everything to use Views, I haven't (and probably won't) fix it in the code.

I had hoped to have a new, more "Views" capable version out by now, but it may be another week or so.

Ron.

zwhalen’s picture

Yeah that makes a lot of sense. I look forward to seeing more views integration, though from what I can tell it's already really pretty good. I mean, since you can include the full citation as a views field, I bet you can pretty well make a full listing to replicate the biblio list.

Anyway, I do want to avoid hacking code as much as possible, so I'll keep an eye out for the update.

Thanks,
Zach

rjerome’s picture

Yes, you can pretty much replicate all the existing pages, what I working on is a style plug in and templates which will handle things like the "Group By" separator bars which appear in the list (i.e. for each year), and also the export links and sorting tabs etc.

Ron.

lostchord’s picture

Any progress on this. I've just added some entries where I've only listed a Corporate Author and the various 'out of the box' listings just don't cope with this. In general, (a) the Corporate Author is not displayed, (b) sort order by Author doesn't make sense... for example, "Information Technology Architecture Committee" is appearing under H in the Author listing.

I'll try using the normal Author fields as a work-around but I think where departmental authorship might be the only tags here this could be very important.

cheers
Andrew

rjerome’s picture

See http://drupal.org/node/817474 with regards to your "Corporate Author" sorting question.

With regards to any further progress on the other issues, yes and no. I've been focusing on a new styling engine for the 2.x branch which should address these issues, however now that summer has arrived in my part of the world, the pace of development has slowed somewhat :-)

Ron.

liam morland’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.