Listing Order

MySong
MySong
@mysong
10 years ago
155 posts
Thanks for the invite, much more useful then 'tags' for what we are trying to do.

How do I reset the order of listed items. Currently it lists everything by 'order uploaded'

What code would we need to modify to get items to list in the following order...

1 - Rating Average
2 - Total Rating Count (so item rated 5 three times will show before an item that was rated 5 only one time).
3 - Number of Views (can skip this factor if too complicated)
3 - Alphabetical order (if above factors are the same so should be listed by ABC)

Thanks
updated by @mysong: 04/13/17 08:22:29AM
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
You'd change the order_by and search parameters in the jrCore_list function:
http://www.jamroom.net/the-jamroom-network/documentation/development/89/jrcore-list


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
MySong
MySong
@mysong
10 years ago
155 posts
Which of these 4 templates should I try playing around with...

magic_view_default.tpl
magic_view_multiple.tpl
view_default.tpl
view_multiple.tpl

Also do not get this 'magic view' vs. 'regular view', what is the difference and how how is it applied.

Thanks
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Try view_default.tpl. You can put the name of the template into the template and then check it in your browser. If you see the name of the template, you are looking at the right template.

You can ignore the magic views unless you know you need them.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
MySong
MySong
@mysong
10 years ago
155 posts
Put the names in and it is running on magic_view_default.tpl

Lets see if I can get the order thing working.
updated by @mysong: 07/24/14 05:37:36AM
MySong
MySong
@mysong
10 years ago
155 posts
Got it working changed

{$order_by = "_created"}

into

{$order_by = "audio_rating_1_average_count NUMERICAL_DESC"}

Not sure what this part of the code is for...

{if isset($cat_post_1) && $cat_post_1 == 'by_ratings'}
{$order_by = "profile_rating_1_average_count NUMERICAL_DESC"}
{elseif isset($cat_post_1) && $cat_post_1 == 'by_views'}
{$order_by = "_created"}
{/if}
MySong
MySong
@mysong
10 years ago
155 posts
Also what would be the proper way to add a multiple order into the code.

First
audio_rating_1_average_count NUMERICAL_DESC
Then
audio_rating_1_count NUMERICAL_DESC

Thanks
updated by @mysong: 07/24/14 06:04:59AM
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
You could try order_by1="audio_rating_1_average_count NUMERICAL_DESC" order_by2="audio_rating_1_count NUMERICAL_DESC"

Not sure if that will work, but worth a try - jrCore_list documentation is what you need to look at, and experiment if the documentation doesn't cover it.

Post back here if you can, it may save someone else some time in the future.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)