Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • amejat Friend
    #125642

    Here is my problem:

    I have about 50 albums (or categories) in my RSGallery2 but it looks ugly on the frontpage as the “categories” module shows ALL of them.

    How could I limit and define the albums showed by the “categories” module on the front page ?

    Can we limit the number of links displayed ? Define to show ONLY the XX most recent ?

    Please HELP

    kashxo Friend
    #238934

    You can get rid of this issue by following tips. Here is my tip to display 5 latest galleries:

    1. Open file mod_ja_rsmenu.php, you can found it in modules folder.
    2. Search for the line containt this code:

    $query = "SELECT *"
    . " FROM #__rsgallery2_galleries"
    . " WHERE published = 1"
    . " ORDER BY parent, ordering";

    3. Replace that block by this:
    <blockquote>$query = “SELECT *”
    . ” FROM #__rsgallery2_galleries”
    . ” WHERE published = 1″
    . ” ORDER BY date, ordering LIMIT 0,5″;</blockquote>
    It will display the last 5 galleries added. Change LIMIT 0,5 to 0,7 or 0,10 or whatever you need.

    amejat Friend
    #239028

    Thanks a lot for the reply !

    amejat Friend
    #239029

    Pity this could not be set up from the admin area…

    jerryjoomla1 Friend
    #242995

    This is a good fix for the front page listings, but it also changes the listings shown when you click on the Gallery component link.

    Is there anyway to change them by themselves. For example, have 5 categories shown on the front page, but 10 shown on the gallery component page?

    itgl72 Friend
    #243416

    I’m not getting the same results as jerry.

    When I changed modules/mod_ja_rsmenu/mod_ja_rsmenu.php to:

    <blockquote>
    // get a list of the menu items
    // excluding the current menu item and its child elements
    $query = “SELECT *”
    . ” FROM #__rsgallery2_galleries”
    . ” WHERE published = 1″
    . ” ORDER BY date, ordering LIMIT 0,5″;
    </blockquote>

    I only saw 5 galleries as I wanted, but I didnt see the last 5 galleries added, I didnt see the galleries with the latest pictures added. This actually lists from top to bottom gallery IDs 9, 6, 4, 3, 1.

    Is the SQL syntax wrong?

    Sherlock Friend
    #243418

    Hi jtgl72.
    You must change 0,5 to 0,10, and you can change 10 to a bigger number

    itgl72 Friend
    #243420

    I have done this nguoiabcd, but I get the same result as above, except now instead of 5 galleries on front page I get 10.

    They are still not listed from top to bottom as newest galleries, or galleries with newest pics. Maybe this isnt possible.

    itgl72 Friend
    #243570

    BEST I CAN DO…

    [PHP]
    $query = “SELECT *”
    . ” FROM #__rsgallery2_galleries”
    . ” WHERE published = 1″
    . ” ORDER BY id DESC, ordering LIMIT 0,5″;
    [/PHP]

    Instaed of DATE, I used the database id descending order. This gave me the last 5 newest galleries added.

    Then after thinking, I guess we could use DATE and at DESC to it like below showing the last six added galleries by date descending order:

    [PHP]
    $query = “SELECT *”
    . ” FROM #__rsgallery2_galleries”
    . ” WHERE published = 1″
    . ” ORDER BY date DESC, ordering LIMIT 0,6″;
    [/PHP]

    How do you like that for a non php programmer hacking away? LOL :laugh:

    quantaweb Friend
    #285377

    I have a question. I too would like to refine how my gallery heirarchy is shown in mod_ja_rsmenu. Any clues about how to show only a group of subgalleries in the list, rather than all galleries with parent=0 ?

    If you can point me to the location in the code to change to force it to display only the subgalleries that belong to “parent=12” for example.

    I tried this in the query

    $query = "SELECT *"
    . " FROM #__rsgallery2_galleries"
    . " WHERE published = 1"
    . " AND parent = 12"
    . " ORDER BY parent, ordering";

    but no dice. Some other changes are required to get the code to treat subgalleries as if they were in the root.

    I am willing to bypass admin options for this, but just hack the source and create multiple copies of the module to get this to work for now.

    Here is an image. I would like “SubGallery 1,2,3 … Conceptual” to show up as if they were in the root, without also showing “Fruits & Vegetables” or any of the other primary galleries.

    quantaweb Friend
    #285554

    discovered a hint (not a real solution) thought experimentation. If I force galleryID to the desired parent Gallery number, it will display only the subgalleries when you are looking at the desired gallery or any of its subgalleries. Otherwise it still behaved erratically – only displays properly when you are viewing the ParentID that is hard coded in. Menu links disapear as you browse through other galleries.

    Any suggestions would be appreciated.

    I will link to the MAIN galleries (parent galleries) from the top menu, then I want the mod_ja_rsmenu to show only the subgalleries for that main gallery.

Viewing 11 posts - 1 through 11 (of 11 total)

This topic contains 11 replies, has 6 voices, and was last updated by  quantaweb 15 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum