Hi,
bin mir nun nicht sicher, obs hier her gehört, oder in die Rubrik coppermine, aber mir ist gerade aufgefallen, dass wenn ich das Modul "Search" betätige, die My_eGallery durchsucht wir, aber nicht das Coppermine. :(
Gibts da schon was als Addon zu einstellen?
Danke
"Schiebung" :bigsmile:
sie einzige Lösung die mir hier einfällt währe die Coppermine-Suche direkt zuverlinken:
zB in einem kleinen,selbstgebastelten, Block in dem Du beide Suchfunktionen anbietest. zB : Textsuche ( pragmasuche) Bildersuche (Coppermine)
:mad2: war eigentlich ganz trivial:
Wir nehmen also die index.php:
dort suchen wir uns die Zeile 88 raus:
} else {
und ändern die wie folgt:
} elseif ($type == "galerie2") {
$caption = _SEARCHGAL;
} else {
dann gehen wir weiter zur Zeile 197/199(alt) bzw.199/201(neu)
if (mxModuleAllowed('My_eGallery')) {
echo '<input type="radio" name="type" value="galerie"' . (($type == 'galerie') ? 'checked' : '') . '> ' . _PGAL . '<br>';
}
und ändern wie folgt:
if (mxModuleAllowed('My_eGallery')) {
echo '<input type="radio" name="type" value="galerie"' . (($type == 'galerie') ? 'checked' : '') . '> ' . _PGAL . '<br>';
}
if (mxModuleAllowed('Gallery')) {
echo '<input type="radio" name="type" value="galerie2"' . (($type == 'galerie2') ? 'checked' : '') . '> ' . _PGAL . '2*<br>';
}
* die 2 wird angezeigt, damit man die neue Suchfunktion erkennt, da sonst beide Suchfelder "Bilder-Galerie" heißen. Auf der anderen Seite hat man ja nie beide in Betieb, also könnte die auch weg.
nun suchen wir nochmal fix in Zeile 594(alt) bzw. 599
// #####################ENDE GALLERIE###############################
und erweitern mit:
// #####################ENDE GALLERIE###############################
// ######################BEGINN COPPERMINE############################
elseif ($type == "galerie2") {
$result = sql_query("select pid, owner_name, `mtime`, title, caption from " . $prefix . "_cpg1413_pictures where (title LIKE '%" . mxAddSlashesForSQL($query) . "%' OR caption LIKE '%" . mxAddSlashesForSQL($query) . "%') ORDER BY mtime DESC limit " . intval($min) . "," . intval($offset));
// $result = sql_query("select pid, submitter, `date`, name, description from " . $prefix . "_gallery_pictures where (name LIKE '%" . mxAddSlashesForSQL($query) . "%' OR description LIKE '%" . mxAddSlashesForSQL($query) . "%') ORDER BY date DESC limit " . intval($min) . "," . intval($offset));
$nrows = sql_num_rows($result);
$x = 0;
if (!empty($query)) {
echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"5\" border=\"0\" bgcolor=\"$bgcolor1\">\n";
if ($nrows > 0) {
while (list($pid, $owner_name, $mtime, $title, $caption) = sql_fetch_row($result)) {
$text = trim(substr($caption, 0, 35));
if ($text == "") {
$text = $title;
}
echo "<tr bgcolor=\"$bgcolor2\"><td width =\"50%\">"
. "<img src=\"images/folders.gif\" border=\"0\" alt=\"\" />"
. "<strong><a href=\"modules.php?name=Gallery&act=displayimage&pos=-$pid\">$text</a>...</strong></td>"
. "<td width=\"25%\">"
. "von <a href=\"modules.php?name=Userinfo&uname=" . urlencode($owner_name) . "\">$owner_name</a>"
. "</td><td width=\"25%\">am $mtime</td></tr>";
$text = "";
$x++;
}
echo "</table>";
} else {
echo "<tr><td><center><font class=\"option\"><b>" . _NOMATCHES . "</b></font></center><br><br>";
echo "</td></tr></table>";
}
$prev = $min - $offset;
if ($prev >= 0) {
print "<br><br><center><a href=\"modules.php?name=Search&author=$author&topic=$t&min=$prev&query=$query&type=$type\">";
print "<b>$min " . _PREVMATCHES . "</b></a></center>";
}
$next = $min + $offset;
if ($x >= ($offset-1)) {
print "<br><br><center><a href=\"modules.php?name=Search&author=$author&topic=$t&min=$max&query=$query&type=$type\">";
print "<b>" . _NEXTMATCHES . "</b></a></center>";
}
}
}
// #####################ENDE COPPERMINE###############################
Nun sollte es laufen :BD:
Könnte man ja noch ggf. ins vkp übernehmen, da das eBoard auch in der Suche ist, obwohl´s kein Bestandteil vom vkp ist. ^^
Noch Fragen? :bye:
tjo .....
kommt für mich nicht in frage, da der nutzen eine änderung der index.php in dieser grössenordnung bei mir nicht rechtfertigen würde .
obwohl ich eine grafikwebsite hab .