das Search Modul (1.5.1) kann, wie ich festgestellt habe, Parameter an die Suche übergeben und zwar in der Form
Dafür braucht es aber eine Funktion SearchResultWithParams(), die im News Modul vorhanden sein muss.Das Format für jeden dieser Parameter lautet: "passtru_MODULENAME_PARAMNAME='value'" z.B. "passthru_News_detailpage='newsdetails'"
In meiner Version 2.8.3 war diese Funktion nicht drin. Deshalb habe ich die mal eingefügt, hier der Code...
Code: Select all
// Modul : News
// Version : 2.83
// Datei : modules/News/News.module.php
// Änderungen : Neue Funktion hinzugefügt, nach der Funktion SearchResult(...)
function SearchResultWithParams($returnid, $articleid, $attr = '', $params = '')
{
$result = array();
if ($attr == 'article')
{
$db =& $this->GetDb();
$q = "SELECT news_title FROM ".cms_db_prefix()."module_news WHERE news_id = ?";
$dbresult = $db->Execute( $q, array( $articleid ) );
if ($dbresult)
{
$row = $dbresult->FetchRow();
//0 position is the prefix displayed in the list results.
$result[0] = $this->GetFriendlyName();
//1 position is the title
$result[1] = $row['news_title'];
//2 position is the URL to the title.
$aliased_title = munge_string_to_url($row['news_title']);
$prettyurl = 'news/' . $articleid.'/'.$returnid."/$aliased_title";
$miwdata = array('articleid' => $articleid);
foreach ($params as $key => $value)
{
$miwdata[$key] = $value;
}
$result[2] = $this->CreateLink('cntnt01', 'detail', $returnid, '', $miwdata ,'', true, false, '', true, $prettyurl);
}
}
return $result;
}

Gruß