Search on author

Matt B - June 21, 2007 - 05:27
Project:Authorship Module
Version:5.x-1.1
Component:Code
Category:feature request
Priority:minor
Assigned:Unassigned
Status:closed
Description

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

#1

AjK - July 8, 2007 - 21:03
Status:active» needs review

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

AttachmentSize
authorship.module_p153451.txt 646 bytes

#2

Matt B - July 12, 2007 - 20:16
Status:needs review» reviewed & tested by the community

AJK

It works as expected, thanks!

Matt

#3

AjK - July 12, 2007 - 22:00
Status:reviewed & tested by the community» fixed

Committed, thx!

http://drupal.org/cvs?commit=73303

#4

Anonymous - July 26, 2007 - 22:03
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.