* Mowi7 * Graham ok, please can you help me with random filelist code
2017-04-30 00:05 · (0)
* Graham * Mowi7 You mean this ?
from here http://ggnnww.yn.lt/rof
<!--parser:xtscript-->
# Path to files folder
var $path_to_folder = /uploads

# this removes files with no extension
var $filter= *.*

# 0 for all items
var $number_of_items = 5

# un-encoded filelist template
var $filelist_template = <div style="border-bottom:1px solid;margin:1px;padding:1px"><img src="http://xtgem.com/images/icons/mimes/.file_type..png" alt="*" /><a href=".file_url."> .file_name_base_parsed.</a> <br />.file_size. .file_mime.</div>

# Process variables
var $filelist_template = call htmlspecialchars $val=$filelist_template 
if not $number_of_items
var $number_of_items = list.length-1
endif
<!--/parser:xtscript-->
<script type="text/javascript">
function shuffleArray(array) {
  for (var i = array.length - 2; i > 0; i--) {
    var j = Math.floor(Math.random() * (i + 1));
    var temp = array[i];
    array[i] = array[j];array[j] = temp;}
return array;}
var rof;
var list=[<xt:filelist folder="{_$$path_to_folder |}" template=" '{_$$filelist_template |}', " filter="{_$$filter|}"/>'dummy_entry'];
var list = shuffleArray(list);
for(var i=0;i<{_$$number_of_items |};i++){
document.getElementById("rof").innerHTML+=list[i];}
</script>

Copy code
2017-04-30 00:49 (edited 2017-04-30 00:53 by Graham ) · (0)
* Mowi7 * Graham how many folders can be included?
2017-05-10 01:07 · (0)
* Mowi7 * Mowi7 its not working bro
2017-05-10 01:14 · (0)
* maltefky * Mowi7 If u need advanced filelist i shall give u see demo HERE
2017-05-10 02:43 (edited 2017-05-10 02:45 by maltefky ) · (0)
* Mowi7 * maltefky there are too many empty pages in your site bro
2017-05-16 03:05 · (0)
* Mowi7 * Graham is there any any filelist that can list multiple folders?
2017-05-16 03:07 · (0)
* Graham * Mowi7 yes I created a couple of versions that that are multi folder search scripts but the can be adapted to just be a file list they have been tried with over 100 folders in the list
http://syntax.xtgem.com/manual/basics/xtscripts/default?func=search
http://syntax.xtgem.com/manual/basics/xtscripts/default?func=search_two
They take a bit of work to set up
2017-05-16 03:39 · (0)
* Mowi7 * Graham i'm not talking about search, i mean pure filelist to display file but with multiple folders
2017-05-16 06:26 · (0)
* Mowi7 * Graham Are you there Mr Graham?
2017-05-17 05:38 · (0)

Online: Guests: 1