PDA

View Full Version : Results to display info from mysql table


kjhay
08-26-2005, 02:42 PM
I'm using phpdig to search a large number of pdf files, which also have their title, author and source stored in a mysql table (same db as phpdig uses).

What would be the best way to go about adding the title, author and source information to the search results?

By the way, fantastic job on PHPDig, setting it up and configuring for pdfs was pleasantly simple.

Charter
08-26-2005, 08:35 PM
What version of PhpDig are you using, and do you have CONTENT_TEXT set to zero or one?

kjhay
08-29-2005, 09:31 AM
PHPDig 1.8.7

CONTEXT_TEXT=1

kjhay
09-01-2005, 07:03 PM
Bump.

If you could just point me in the right direction (eg in which function the result urls are selected from the database, and in which function the results are formatted).

Thanks! :)

Charter
09-03-2005, 01:34 PM
In robot_functions.php you might try running a query within the IF of the following code to append text to $result and see if that does it:

if ((is_array($result)) && (count($result) > 0)) {
// run query and stick content into $result[] here
$f_handler = fopen($tempfile1,'wb');
fwrite($f_handler,str_replace('ลก',' ',str_replace(chr(0xad),'-',implode(' ',$result))));
fclose($f_handler);
}