Shuraih99
Weezy Weezy I need Random file list
Like of this site
http://eaglenet.xtgem.com
Weezy
Shuraih99 i don't have another tutorial for random related files
Shuraih99
Weezy Weezy give me a full tutorial
Iddnt understand this thing &fold=/FolderPath
Weezy
Shuraih99 Random related files code below! U will add
&fold=/FolderPath in all ur filelist template
<div class="yourClass" align="justify">
<!--parser:xtscript-->
# Path to files folder
var $path_to_folder=
# this removes files with no extension
var $filter= *.*
# 0 for all items
var $number_of_items = 10
# un-encoded filelist template
var $filelist_template = <a href="/download?file=.file_name.&name=.file_name_parsed.&type=.file_mime.&size=.file_size.&ext=.file_type.&link=.file_url.&date=.file_date.&time=.file_time.&fold={_$fold|}">.file_name_parsed.</a><b> - </b>
# 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 list=[<xt:filelist folder="{_$fold|}" template=" '{_$$filelist_template |}', " filter="{_$$filter|}"/>'dummy_entry'];
var list = shuffleArray(list);for(var i=0;i<{_$$number_of_items |};i++){
document.write(list[i]);}
</script>
[<a href="#more">+More</a>]
</div>
Copy code
Shuraih99
Weezy Weezy how would i add Random related file to my filelist
Weezy
Shuraih99 Copy the filelist and the download page code below, replace the ones in capital letters, create a file named 'download' direct in ur file browser ..and paste the download page code in it..replace the div class names in the download page with urs ..
<center><xt:filelist sort_type="updated" sort_dir="desc" folder="/FOLDER" template="<table width='100%'><tr><td width='25%' class='DIV_CLASS' align='center'><img src='http://iMAGE_PREVIEW_LINK.png' width='100%' height='100%'></td><td width='75%' align='left' class='DIV_CLASS'><img src='http://weezywap.xtgem.com/images/rating.gif'/><br/><b>Name: </b><b style='color:blue'>.file_name_parsed.</b><br/><b>File Size: </b><b style='color:green'>.file_size.</b><br/><b>• </b><a href='/download?file=.file_name.&name=.file_name_parsed.&category=.file_mime.&size=.file_size.&href=.file_url.&date=.file_date.&time=.file_time.'><b style='color:red'>Download Now!</b></a></td></tr></table>" filter="*.*" per_page="5" /><br/>Jump to page:<form action="<xt:url type="path" />" method="get"><input type="text" style="width:25px" name="__filelist_page"><input
type="submit" value="jump"></form></center>
Copy code
create a file named
download direct in ur filebrowser ..dont put it in any folder ..inside the download ..enter the code below
<div class="header"><center><b>File Statistics</b></center></div>
<div class="menu"><b>Name:</b> <b style=color:red;>{_$name|No File Referred To}</b></div>
<div class="menu"><b>File size:</b> <b style=color:red;>{_$size|No File Referred To}</b></div>
<div class="menu"><b>Category:</b> <b style=color:red;>{_$category|No File Referred To}</b></div>
<div class="menu"><b>Time Of Upload:</b> <b style=color:red;>{_$time|Not Available}</b></div>
<div class="menu"><b>Date Of Upload:</b> <b style=color:red;>{_$date|Not Available}</b></div>
<div class="menu"><a href="{_$href|404}"><center><img src="http://www.weezywap.xtgem.com/Pic/download_icon2.png"></center></a></div><br/><table width="100%" border="0"><tr><td width="33%" bgcolor="" class="DIV_CLASS" align="center"><b>URL</b><br/><input type="text" size="5%" value="{_$href|http://<xt:url type="domain"/>/index}"></input></td><td width="34%" bgcolor="" class="DIV_CLASS" align="center"><b>HTML</b><br/><input type='text' size='5%' value='<a href="{_$href|http://<xt:url type="domain"/>/index}">Download {_$name|Nothing}</a>'></input></td><td width="33%" bgcolor="" class="DIV_CLASS" align="center"><b>BB CODE</b><br/><input type="text" size="5%" value="[url={_$href|http://<xt:url type="domain"/>/index}]Download {_$name|Nothing}[/url]"></input></td></tr></table>
Copy code
Shuraih99
Plz weezy help me with ur file lizt code and how to function it