Hi octane,
habe die Lösung für den Benutzerrechte-Bug gefunden.
In der viewspecial.php mus man den Code in Zeile 35 bis 79 folgendermaßen ersetzen:
PHP-Code:
switch ( $sorting)
{
case 'find':
$suchstring=trim( strtolower( $sstring ) );
$query1="SELECT * FROM #__ponygallery As a, #__ponygallery_catg AS ca WHERE a.catid=ca.cid AND a.imgtitle LIKE '%$suchstring%' AND a.published = 1 "
. " AND a.approved=1 " . " AND ca.access<=$gid" . "\nORDER BY id DESC";
$tl_title=_PONYGALLERY_PRREZ." $sstring";
break;
case 'lastcomment':
$query1
="SELECT a.*, cc.cmtid FROM #__ponygallery AS a, #__ponygallery_comments AS cc, #__ponygallery_catg AS ca WHERE a.id=cc.cmtpic AND a.catid=ca.cid AND a.published = '1' " . " AND a.approved=1 " . " AND ca.access<=$gid"
. "\nORDER BY cc.cmtid DESC LIMIT $ag_toplist";
$tl_title=_PONYGALLERY_TOP." $ag_toplist "._PONYGALLERY_LAST_COMMENT_PIC;
break;
case 'lastadd':
$query1="SELECT * FROM #__ponygallery As a, #__ponygallery_catg AS ca WHERE a.catid=ca.cid AND a.published ='1' " . " AND a.approved='1' " . " AND ca.access<=$gid "
. "\nORDER BY a.id DESC LIMIT $ag_toplist";
$tl_title=_PONYGALLERY_TOP." $ag_toplist "._PONYGALLERY_LAST_ADDED_PIC;
break;
case 'rating':
$query1="SELECT *,ROUND(imgvotesum/imgvotes, 2) as rating FROM #__ponygallery_comments AS cc, #__ponygallery AS a, #__ponygallery_catg AS ca WHERE a.id=cc.cmtpic AND a.catid=ca.cid AND a.published = '1' "
. " AND a.approved=1 " . " AND ca.access<=$gid " . "\nORDER BY rating DESC LIMIT $ag_toplist";
$tl_title=_PONYGALLERY_TOP." $ag_toplist "._PONYGALLERY_BEST_RATED_PIC;
break;
default:
$query1="SELECT * FROM #__ponygallery AS a, #__ponygallery_catg AS ca WHERE a.catid=ca.cid AND a.published = '1' " . "\n AND a.approved=1 " . " AND ca.access<=$gid"
. "\nORDER BY imgcounter DESC LIMIT $ag_toplist";
$tl_title=_PONYGALLERY_TOP." $ag_toplist "._PONYGALLERY_MOST_VIEWED_PIC;
break;
}
Danach funktioniert sowohl die Suche (bislang mehr oder weniger tot) als auch die Ausgabe der Bilder entsprechend den Rechten der User. Das heißt, dass fortan der Benutzer nur noch die Bilder zu sehen bekommt, für die er auch die notwendigen Rechte innehat, wenn er auf einen der Links (Meist gelesen etc.) klickt.
Die neue Version findest Du demnächst unter
http://www.joomlaportal.de/joomla-ko...ug-frei-2.html
oder unter
http://www.joomlaportal.de/joomla-ko...ilanguage.html
Die Suchfunktion kann man auch selbst abändern. Nach meinen Einstellungen bezieht sich die Suche auf den Bild-Titel. Man kann aber auch im Beschreibungstext suchen lassen. Dafür muss man lediglich die Zeile 40 der viewspecial.php editieren:
PHP-Code:
$query1="SELECT * FROM #__ponygallery As a, #__ponygallery_catg AS ca WHERE a.catid=ca.cid AND a.imgtitle LIKE '%$suchstring%' AND a.published = 1 "
Hier ist a.imgtitel durch die Spaltenbezeichnung zu ersetzen, nach der die Suche erfolgen soll, also z. B. a.imgtext
Gruss
mab
Lesezeichen