A small hack for RSGallery2
It is for the RSGallery 1.12.2 Alpha version. I wrote it in the RSGallery's Forum and I hope that it will be added in the new version of RSGallery.
Write cd administrator/components/com_rsgallery2
Backup the config.rsgallery2.php
e.g. write in the command line cp config.rsgallery2.php config.rsgallery2.php.backup and press enter.
You will edit the config.rsgallery2.php
e.g. write in the command line vi config.rsgallery2.php
Go to line 202 or after this:
foreach($rows2 as $row2) { if (!in_array($row2->id, $galleries)) $dropdown_html .= "<option value=\"$row2->id\" DISABLED> |-- $row2->name</option>\n"; else $dropdown_html .= "<option value=\"$row2->id\"> |-- $row2->name</option>\n";
and add this:
// Velonis I. Petros addition for a 3 level category selection list
$id2 = $row2->id;
$database->setQuery("SELECT * FROM #__rsgallery2_galleries WHERE parent = '$id2' ORDER BY ordering ASC");
$rows3 = $database->loadObjectList();
foreach($rows3 as $row3)
{
if (!in_array($row3->id, $galleries))
$dropdown_html .= "<option value=\"$row3->id\" DISABLED> |-- $row3->name</option>\n";
else
$dropdown_html .= "<option value=\"$row3->id\"> |-- $row3->name</option>\n";
}
//until here
Save it and you are ready! If it doesn't work then you did something wrong and you better wait for the new version. Until that just write in the command line
rm config.rsgallery2.php
cp config.rsgallery2.php.backup config.rsgallery2.php
rm config.rsgallery2.php.backup
The Academic Site of Velonis I. Petros


Comments
Best wishes