is there a way of getting search results from private documents visible to guest users?
By using a parameter, I haven’t any solution.
By hacking the code, to not take into account of the privacy of documents, simply comment the following block of code lines in the classes/search.class.inc.php file (line 285 to 326):
// document group allowed regarding user authentification
if ($this->validListIDs($this->cfg['docgrp'])) {
$this->main['jfilters'][] = array(
'tb_name' => "{$modx->dbConfig['dbase']}.`{$modx->dbConfig['table_prefix']}document_groups`",
'tb_alias' => 'dg',
'main' => 'id',
'join' => 'document',
'field' => 'document_group',
'oper' => 'isnull or in',
'value' => $this->cfg['docgrp']
);
}
else {
// documents should be public
$this->main['filters'][] = array(
'field' => 'privateweb',
'oper' => '=',
'value' => '0'
);
}By commenting these lines, the search occurs in all the documents (private or not).
Unfortunately it doesn’t exist a placeholder regarding privacy to use for displaying or not the content. So if you hide the extract, you will do for all the documents found (private or not).