What to change to not show default X newest resources in sidebar (This controls the maximum number of new resources to display on the forum list page...), but X random resources.
It will be an easy change. To show resources in random order instead of newest, go to the XenResource_Listener_Template file and find this part of code:
We only support a small number of order clauses, see XenResource_Model_Resource::prepareResourceOrderOptions.
Besides which, using MySQL's RAND() function is awful in terms of performance so what you're looking to do would likely require custom development and likely more than a few lines of code to do it properly.
I fully agree about the performance affects of rand() function. I should have mentioned that in my previous post. Thank you for bringing it up sir.
I also agree that this will require an add on to do it properly and I would use array_rand() function instead to display the latest reources randomly. But what I posted above was a quick dirty way to achive what the OP wanted on the fly.
I am aware of Resource_Model_Resource:repareResourceOrderOptions, but modifying that, would not it affect the display of resources everywhere btw?
Newest resources is nice when you have everyday new resource on forum, but if you have just one or two resources per month, then random resources sidebar is much better solution.
You can't pass 'rand()' in as an option as it isn't a valid option. I'm not proposing changing that function, that's just to demonstrate which order options are valid.