-
AuthorPosts
-
amejat Friend
amejat
- Join date:
- February 2008
- Posts:
- 124
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 16
- Thanked:
- 3 times in 2 posts
February 12, 2008 at 4:24 am #125642Here 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 Friendkashxo
- Join date:
- April 2007
- Posts:
- 605
- Downloads:
- 0
- Uploads:
- 21
- Thanks:
- 11
- Thanked:
- 78 times in 40 posts
February 12, 2008 at 4:59 am #238934You 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.1 user says Thank You to kashxo for this useful post
amejat Friendamejat
- Join date:
- February 2008
- Posts:
- 124
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 16
- Thanked:
- 3 times in 2 posts
February 12, 2008 at 11:02 pm #239028Thanks a lot for the reply !
amejat Friendamejat
- Join date:
- February 2008
- Posts:
- 124
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 16
- Thanked:
- 3 times in 2 posts
February 12, 2008 at 11:02 pm #239029Pity this could not be set up from the admin area…
March 24, 2008 at 6:37 am #242995This 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 Frienditgl72
- Join date:
- March 2008
- Posts:
- 230
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 41
- Thanked:
- 10 times in 1 posts
March 28, 2008 at 3:23 am #243416I’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 FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
March 28, 2008 at 3:37 am #243418Hi jtgl72.
You must change 0,5 to 0,10, and you can change 10 to a bigger numberitgl72 Frienditgl72
- Join date:
- March 2008
- Posts:
- 230
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 41
- Thanked:
- 10 times in 1 posts
March 28, 2008 at 3:56 am #243420I 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 Frienditgl72
- Join date:
- March 2008
- Posts:
- 230
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 41
- Thanked:
- 10 times in 1 posts
March 29, 2008 at 7:21 pm #243570BEST 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 Friendquantaweb
- Join date:
- September 2007
- Posts:
- 38
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 4
- Thanked:
- 6 times in 1 posts
January 8, 2009 at 9:43 am #285377I 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 Friendquantaweb
- Join date:
- September 2007
- Posts:
- 38
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 4
- Thanked:
- 6 times in 1 posts
January 9, 2009 at 7:30 am #285554discovered 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.
-
AuthorPosts
This topic contains 11 replies, has 6 voices, and was last updated by quantaweb 15 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum