list orders

alt=
MONEE
@monee
3 weeks ago
65 posts
I need to know how to create some list. I need a list of new items created in last 30 days random
List of items rated 4 stars or more random
List of items top 100 on charts random
douglas
@douglas
3 weeks ago
2,793 posts
Have you checked out the documentation on the jrCore_list function?
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/89/jrcore-list

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
alt=
MONEE
@monee
3 weeks ago
65 posts
This is not in the documentation. I found how to do 2 but the one I can't get is listing only items 4.0 rating or higher
michael
@michael
2 weeks ago
7,740 posts
To do that, the first step is figuring out which module is doing the ratings, then get a jrCore_list of those item. The data will come back with the item_id of the thing its rated for then do a search for those item ids. Loop over the ratings and insert the corresponding item.

Its almost easier to do it in a module
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1569/defining-your-own-smarty-function

Do a search in the module to get the ids, do another search using those ids then send the whole thing to a template to loop over.
alt=
MONEE
@monee
2 weeks ago
65 posts
I don't understand these responses that I'm getting in this forum. Instead of getting real answers I just getting directed to documentation that doesn't explain anything about what I'm asking. creating a whole module for a solution to this is crazy. now that I think about it should be a simple if statement. If item rating => 4 and then foreach. I'll figure out myself
updated by @monee: 12/04/24 06:07:23PM
michael
@michael
2 weeks ago
7,740 posts
The problem with doing it with an IF is its quite loose. If you wanted say 10 of the most recent you'd have to get say 100 then loop over them. If you get the 10 within that 100 that are 4+ then no problem but if in that 100 only 8 are 4+ then you wont show all you need.

What's the exact thing you want? I'll build a query that works in a template.
michael
@michael
2 weeks ago
7,740 posts
the start will be something like:
{jrCore_list module="jrRating" search1="rating_value > 3"  search2="rating_module = jrAudio" limit="10" }
alt=
MONEE
@monee
2 weeks ago
65 posts
Thank You. That did work but I came up with this and it worked too but only list upload video but I need either way to list youtube videos also
{jrSeamless_list modules="jrVideo,jrYouTube" search1="video_rating_overall_average_count > 3" order_by="_item_id random" limit="20"}
updated by @monee: 12/05/24 04:12:37AM
michael
@michael
2 weeks ago
7,740 posts
the problem in your one is that "video_...." is only going to be a key on uploaded videos, try using a key that is on all of them or using the || which is OR but that will make it heavier on your system. May be ok if its not pulling a ton per page.

so try search1="video_rating_overall_average_count > 3 || youtube_rating_overall_average_count > 3"
alt=
MONEE
@monee
2 weeks ago
65 posts
that did work. I tried that yesterday and I didn't see any youtube videos but when I just double checked it was because I didn't have any rated of 4 yet. This should help solve the listing videos and youtube by category too.

updated by @monee: 12/05/24 05:35:56AM