Graham
Waplocus <!--parser:xtscript-->
var $spc=call chr $val=32
var $path=<xt:url type="path">
var $pos = call strrpos $haystack=$path; $needle=/
var $name = call substr $val=$path; $start=($pos+1)
var $isIndex = call stripos $haystack=*$name; $needle=index;
if $isIndex
var $newPath = call substr $val=$path; $start=0 ;$length=$pos
print $newpath
goto @end
endif
var $name = call str_replace $subject=$name; $search=_ ; $replace=$spc
print $name
@end
<!--/parser:xtscript-->
Copy code