home
»
listcount_1
Log in
Filelist Index Count
Method 2 value is inserted into filelist entry
1
20th
audio/midi (5.8KB)
2
Argent Hold Your Head Up
audio/mpeg (8.03MB)
3
WarOfTheWorlds ep2
audio/mpeg (2.13MB)
4
glfrontier-music
application/zip (4.32MB)
5
glfrontier
application/zip (1.03MB)
1
2
3
4
»
XtScript
<!--parser:xtscript--> # Filelist function var $folder=uploads var $per_page=5 get_or_default __filelist_page;1 var $list_page_multiplier=($__filelist_page-1) var $page_adjust_value=($list_page_multiplier*$per_page) var $template=<img src="http://xtgem.com/images/icons/mimes/.file_type..png" alt="*" /> <a href=".file_url.">.file_name_base_parsed.</a> .file_mime. (.file_size.)|| var $template=call htmlspecialchars $val=$template var $list=<xt:filelist sort_type="name" sort_dir="asc" folder="$folder" template="$template" per_page="$per_page" filter="*.*"/> # Main script var $offset=0 var $file_number=($page_adjust_value+1) @loop var $item_end=call strpos $haystack=$list;$needle=||;$offset=$offset if $item_end var $item=call substr $val=$list ;$start=$offset ;$length=($item_end-$offset) print $file_number $item<br /> var $offset=($item_end+2) var $file_number=($file_number+1) goto @loop endif # Pagination var $pagination=call substr $val=$list;$start=$offset print $pagination <!--/parser:xtscript-->
Xtgem Tutorial
Contact
©2024 3BIAP
ALE tights reversed