logo
Home XtGem- Templates- XtScript- bottom
Multifolder search engine
This is a rather complex script that uses Xtscript and filelist to create a javascript array of the search results
which are then sorted displayed and paged using javascript
It uses "post" so no extra query string variables
There are all sorts of tricks and strange looking code used to output the js correctly so careless editing may break the script
The actual file lists are not in the xtscript so should not get timeouts
The search query must be 2 or more chars and is filtered against malicious input
Uncomment the 3 lines in # Query health check to ban - negation and * ? wildcards in the search query
This version is set up to search 4 folders extending it is fairly simple
1/ Insert another line like this into the # Filelist patterns
var $list5 = xt:filelist folder="/FOLDER_5" $params
2/ Insert another filelist into the // Results array before the {_$$dummy|} entry
<{_$$list5|}>

Try to use meaningful names for your files as the name of the files determines the search results
Remember This uses javascript so it uses memory on the users device to store the whole array of the results
Show as text
Show as text
Reload

Anywhere in filename

/FOLDER_1
4bvgrad.png | Cogs_in_motion.gif | android.png | bart_skate.gif | cartoon_clouds.gif | finger.gif | kiss_me_quick.png | mini-Dan_Dare_Mekon.JPG | rotating_skull.gif | us.png | weather_sun.png | 
/FOLDER_2
Meaning_of_Liff_front_cover.jpg | border-4-big.jpg | brighton-pier-centre-lightning-storm.jpg | clematis.jpg | copper.jpg | dawn.jpg | dia.png | dmblbit.jpg | morning_sky.jpg | ngt.jpg | piswasser.jpg | rr_blowjob.jpg | saint.jpg | 
/FOLDER_3
bbb.mp4 | beethovens_9th.wma | movie.mp4 | sample_iPod.m4v | sims.3gp | strange_man.3gp | 
/FOLDER_4
Crazy_Frog-740.mp3 | Dj_BONEZ01.mp3 | Excuse_me_boss.mp3 | Its_A_Weirdo.mp3 | Joe_Walsh_Book_Ends.mp3 | Long Haired Country Boy.mp3 | Low_Rider.m4a | On_The_Run.mp3 | The_Italian_Job.mp3 | black_sabbath_paranoid.mp3 | black_sabbath_rat_salad.mp3 | blues_brothers_closing.mp3 | bonzo_Intro_Outro.mp3 | chicken_hard_bass.mp3 | eat.mp3 | police_siren_4000.mp3 | 
Powered by XtGem
About us Contact Forum topÂ