(2013-08-01, 01:40:22)Angryboy Wrote: Hopefully this is a cleaner and easier to understand way of doing what I mentioned before (again, using return_i18n_search_results, since its purpose is for custom outputs)This does not work, but it works:
PHP Code:<?php
// total number of results
$total = 5;
// change parameters (except $max) to ones relevant to your search)
$search = return_i18n_search_results($tags=null, $words=null, $first=0, $max=999, $order=null, $lang=null);
// apply this function as many times as you want to throughly shuffle the results
shuffle($search['results']);
// now limit the results to the max number
$search['results'] = array_slice($search['results'], 0, $total);
// loop through each result and output as desired
foreach ($search['results'] as $result) {
// output
}
?>
PHP Code:
<?php
$total = get_i18n_search_results(array('tags'=>'Charging_for_the_tail', 'DATE_FORMAT'=>'', 'max'=>12,'i18n'=>0, 'lang'=>'ru', 'numWords'=>null,'order'=>null,'HEADER'=>null), range(1,999));
shuffle($total);
foreach ($total as $tot) {
echo "$tot ";
}
?>