Hi to @ll!
Habe ein wenig Probleme mit der Pathangabe bei der PonyGallery.
Ud zwar in der ponygallery.php mit der Funktion "ShowCategoryPathLink" und dem Home-Icon. Hier habe ich mir nur mit der Itemid (hardcodet) der PonyGallery helfen können. Kann mir hier jemand eine saubere Lösung sagen?
Habe folgenden Quellcode geändert:
Zeile 124 (Home-Icon):
-------------------------------------------------------
<a href='index.php?option=com_ponygallery'>
Ersetzt durch:
-------------------------------------------------------
<a href='index.php?option=com_ponygallery&Itemid=75'>
Zeile 168 (Sortierung nach Kategorien):
-------------------------------------------------------
echo "<a href='index.php?option=com_ponygallery&Itemid=$Ite mid&func=userpannel'><b>"._PONYGALLERY_USER_PANEL."</b></a> - ";
Ersetzt durch:
-------------------------------------------------------
echo "<a href='index.php?option=com_ponygallery&Itemid=$Ite mid'><b>"._PONYGALLERY_USER_PANEL."</b></a> - ";
Zeilen 1540 - 1576 (ShowCategoryPathLink):
-------------------------------------------------------
function ShowCategoryPathLink ( $cat )
{
global $database, $mosConfig_lang, $gid;
$cat=intval( $cat );
$parent_id=1000;
while ( $parent_id )
{
$query="select * from #__ponygallery_catg where cid=$cat and published=1 \n AND access<='" . $gid
. "'";
$database->setQuery( $query );
$result=$database->query();
$parent_id=@mysql_result( $result, 0, 'parent' );
$cid=@mysql_result( $result, 0, 'cid' );
$name="<a href='" . sefRelToAbs("index.php?option=com_ponygallery&Item id=$Itemid&func=viewcategory&catid=$cat" )."'>" . @mysql_result( $result,0,'name' ) . "</a>";
// write path
if ( empty( $path ) ) {
$path=$name;
}
else {
$path=$name . ' » ' . $path;
}
// next looping
$cat=$parent_id;
}
$home="<a href='" . sefRelToAbs( "index.php?option=com_ponygallery&Itemid=$Itemid" ) . "'>". _PONYGALLERY_HOME."</a>";
$pathName=$home . ' » ' . $path . " ";
return $pathName;
}
Ersetzt durch:
-------------------------------------------------------
function ShowCategoryPathLink ( $cat )
{
global $database, $mosConfig_lang, $gid;
$cat=intval( $cat );
$parent_id=1000;
while ( $parent_id )
{
$query="select * from #__ponygallery_catg where cid=$cat and published=1 \n AND access<='" . $gid
. "'";
$database->setQuery( $query );
$result=$database->query();
$parent_id=@mysql_result( $result, 0, 'parent' );
$cid=@mysql_result( $result, 0, 'cid' );
$name="<a href='" . sefRelToAbs("index.php?option=com_ponygallery&Item id=75&func=viewcategory&catid=$cat" )."'>" . @mysql_result( $result,0,'name' ) . "</a>";
// write path
if ( empty( $path ) ) {
$path=$name;
}
else {
$path=$name . ' » ' . $path;
}
// next looping
$cat=$parent_id;
}
$home="<a href='" . sefRelToAbs( "index.php?option=com_ponygallery&Itemid=75" ) . "'>". _PONYGALLERY_HOME."</a>";
$pathName=$home . ' » ' . $path . " ";
return $pathName;
}
-------------------------------------------------------
Hoffe, jemand kann mir eine saubere Lösung nennen. Die Quellcodeeintragung der Itemid sollte entfernt werden. Bitte um Help. Danke!


LinkBack URL
About LinkBacks
Zitieren
Lesezeichen