By User on Tuesday, 18 June 2019
Posted in General Issues
Replies 4
Likes 0
Views 452
Votes 0
Hello. I just tested "EasySocial Videos Module" to display 2 Random videos and recorded videos.
In fact videos not random, they are looped: 2 latest videos, 2 oldest videos, 2 latest featured videos...
I made a video (attached).
Thanks.
Hi Dmitry,

Regarding the random sorting in videos, we've changed the behaviour to simulate the 'randomness' by randomly pick a column from the video table and sort based on that particular column. This applied to the ordering as well where it sometime sort based on ascending order and sometime based on descending orders.

The reason we've implement the above is that in previous random order, we use this 'order by rand()' from MySQL but this rand() gave a great impact to the performance and thats is why we have to use the alternatives.

Hope this clarify the new behaviour of order by random.
Sam
·
Tuesday, 18 June 2019 10:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello. Can you please discuss this suggestion.
I beleave it will allow to display really random items.
(not 100% all from all time; but latest, created by XX days).
Thanks.
·
Saturday, 29 June 2019 01:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Dmitry,

To be frank with you, I don't see how 'trending' can produce 'randomness' of the videos in term of video sorting. Anyway, I do appreciate your idea of displaying the videos that created from xx days so that old popular videos will not always stay on the top of the listing.

As I've mention in my previous reply, currently there is no real way of display video in random unless you can sacrifice the performance by using the 'order by rand()'. If you do, then you can edit this file 'JOOMLA/administrator/components/com_easysocial/models/videos.php'

and replace below code at line 928:


$query[] = "order by $rndColumn $rndSort";


to:


$query[] = "order by rand()";


Hope this help and have a nice day
Sam
·
Monday, 01 July 2019 13:18
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post