Developers corner > Developer Lobby

Support 3-levels in the User's Category Selection List


In one of the sites I created they use a category list with three levels.
I had to move the new photos to the 3rd level directory every time the user uploaded them. Here is a hack that imho must be added to the new version.

More details you can find in

I used it for version 1.12.2 Alpha .

Edit the administrator/components/com_rsgallery2/config.rsgallery2.php
(after you back it up)

Go to line 202
 and add this:

// Velonis I. Petros addition for a 3 level category selection list

                    $id2 = $row2->id;
                    $database->setQuery("SELECT * FROM jos_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>&nbsp;&nbsp;|--&nbsp;$row3->name</option>\n";
                            $dropdown_html .= "<option value=\"$row3->id\">&nbsp;&nbsp;|--&nbsp;$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.

What exactly should this do?  I DESPERATELY need a third level :(




[0] Message Index

Go to full version