I wanted to be able to include the authorship information in the search results. I've put the following code into authorship_nodeapi as the last case in the switch statement and it works fine for me!

case 'update index':
   $sql = "SELECT authorship ".
              "FROM {node_authorship} WHERE nid = %d";
   $row = db_fetch_object(db_query($sql, $node->nid));
   return $row->authorship;
break; // end 'update index'

One might want to be able to set this capability as an option on authorship administration and put an if statement to control this in the above...

Hope you find it useful

Matt

CommentFileSizeAuthor
#1 authorship.module_p153451.txt646 bytesAjK

Comments

AjK’s picture

Status: Active » Needs review
StatusFileSize
new646 bytes

If you would liek to test/review this patch please and I'll commit if it does what you expect.

matt b’s picture

Status: Needs review » Reviewed & tested by the community

AJK

It works as expected, thanks!

Matt

AjK’s picture

Status: Reviewed & tested by the community » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)