* alizainal.aljufri Mr Grahan, can you correct about this code?
<!--parser:xtscript-->
get name
get folder

if $folder = livery
var $span = <span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/livery-bussid.html" itemprop="url"><span itemprop="title">Livery Bussid</span></a></span>
else
if $folder = mp3
var $span = <span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/mp3-music.html" itemprop="url"><span itemprop="title">Mp3 Musik</span></a></span>
endif

print <div class="clip"><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/" itemprop="url"><span itemprop="title">Home</span></a></span> » $span » <span>$name</span></div>
<!--/parser:xtscript-->

Copy code

It's not function
2018-06-05 05:49 · (0)
* Graham * alizainal.aljufri you need to use == in the 'if' statements ie if $folder == livery
2018-06-05 23:09 · (0)
* alizainal.aljufri * Graham Thank you sir! If I want use Random Filelist using variabel not function, like this code
<!--parser:xtscript-->
get folder
var $path_to_folder == /invertory/$folder
var $filter= *.*
var $number_of_items = 5

var $list_template = <div class="clip"><table width="100%" cellspacing="1" cellpadding="1"><tr><td valign="top" align="center" class="pass"><img src="/icon/golsarium.png" alt=".file_name_base_parsed." /></td><td align="left" valign="top"><b>.file_name_base_parsed.</b><br/>Powered by XtFilelist<br/><a href="/view.php?arti=.file_name_base_parsed.&folder={_$folder|Abid}" style="color: #008000; text-align: center;" title=".file_name_base_parsed.">Download</a></td></tr></table></div>

var $filelist_template = call htmlspecialchars $val=$list_template 
if not $number_of_items
var $number_of_items = list.length-1
endif

print <h2>$folder</h2>
print_raw {{
<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="{_$$path_to_folder |}" 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>
}} 
<!--/parser:xtscript-->

Copy code
Can you help me?
2018-06-16 13:28 (edited 2018-06-16 13:29 by alizainal.aljufri ) · (0)

Online: Guests: 1