Preview
<!--parser:xtscript-->
# Filelist settings
var $folder=/my_images
var $per_page=16
var $sort_type=name
var $sort_dir=asc
var $thumb_size=56px
# Landing page
var $name_title=Name
var $type_title=Type
var $size_title=Size
var $date_title=Date
var $open_title=Open
var $download_title=Download
var $descriptions_folder=/descriptions
var $descriptions_nl2br=1
var $back_button_text=Back
# Poll settings
var $question=Rate this image
var $voted_text=Thank you for voting!
var $show_results=always
var $a1=Best
var $a2=Good
var $a3=Medium
var $a4=Poor
var $rate_button_text=Rate image
# Gallery script
get listfile
get __filelist_page
get listpage
var $this=<xt:url noquery="1" />
if $listfile
goto @item
endif
var $div=<div class="list">
var $div_close=</div>
var $tmplt= <span class="list_item"><a href="$this?listfile=.file_name.
if $__filelist_page > 1
var $tmplt=$tmplt&listpage=$__filelist_page
endif
var $tmplt=$tmplt#gallery" title=".file_name_base_parsed."><img class="list_item_image" style="max-width:$thumb_size" src=".file_url." alt=".file_name_base_parsed." /></a></span>
goto @end
@item
var $tmplt= <div class="item_holder"><div class="item"><div class="item_title">.file_name_base_parsed.</div><img src=".file_url." alt=".file_name_base_parsed." /></div><div class="item_meta"><div class="meta_entry">$name_title <span>.file_name.</span></div><div class="meta_entry">$type_title <span>.file_mime.</span></div><div class="meta_entry">$size_title <span>.file_size.</span></div><div class="meta_entry">$date_title <span>.file_datetime.</span></div><div class="meta_entry">$open_title <a class="meta_button" href=".file_url." title=".file_name_base_parsed."><span>.file_name_base_parsed.</span></a></div><div class="meta_entry">$download_title <a class="meta_button" href=".file_url.?__xt_download=1" title=".file_name_base_parsed."><span>.file_name_base_parsed.</span></a></div>
var $d1=call strpos $haystack=$listfile;$needle=.;$offset=0
var $d2= call substr $val=$listfile;$start=0;$length=$d1
var $description= call source $file=$descriptions_folder/$d2;$nl2br=$descriptions_nl2br
if not $description
var $tmplt=$tmplt</div></div>
goto @skip
endif
var $description_content_offset=call strpos $haystack=$description;$needle=<body;
if $description_content_offset
var $description= call source $file=$descriptions_folder/$d2
var $description_content_offset=call strpos $haystack=$description;$needle=<body;
var $description_content_start=call strpos $haystack=$description;$needle=>;$offset=$description_content_offset
var $description_content_end=call strpos $haystack=$description;$needle=</body;$offset=$description_content_offset
var $description=call substr $val=$description;$start=($description_content_start+1);$length=($description_content_end-$description_content_start-1)
endif
var $description=<div class="meta_description">$description</div></div></div>
@skip
var $poll=call md5 $val=$this$listfile
var $poll=call substr $val=$poll;$start=24
var $poll=xt:poll id="$poll" voted_text="$voted_text" question="$question" show_results="$show_results" answer1="$a1" answer2="$a2" answer3="$a3" answer4="$a4"
var $poll_js=<script type="text/javascript">a=document.getElementById("poll");b=a.getElementsByTagName("div");b[0].className="image_poll";c=a.getElementsByTagName("h3");if (b[2].className=="answer"){c[0].className="question";b[b.length-1].className="poll_submit";b[b.length-1].firstChild.className="poll_button";b[b.length-1].firstChild.value="$rate_button_text";}else {c[0].className="voted";}</script><noscript>Javascript is required for this page to run correctly</noscript>
var $back_button= <div class="back"><a class="back_button" href="$this
if $listpage
var $back_button=$back_button?__filelist_page=$listpage
endif
var $back_button=$back_button"><span>$back_button_text</span></a></div>
@end
var $tmplt=call htmlspecialchars $val=$tmplt
<!--/parser:xtscript-->
<div class="list_holder" id="gallery"><xt:filelist sort_type="name" sort_dir="asc" folder="/my_images" template="<span class="list_item"><a href="http://imkimdt6.wapgem.com/xt/index?listfile=.file_name.#gallery" title=".file_name_base_parsed."><img class="list_item_image" style="max-width:56px" src=".file_url." alt=".file_name_base_parsed." /></a></span>" per_page="16" filter="" /><div id="poll"><!----></div></div>Preview
print $included

