Saturday, 6 December 2014

Filelist/Download Page(Preview)
Filelist & Download page code with preview
  First for filelist with preview, you have to set image url in the var 1 while uploading your file, which you can see by clicking on your file id in directory after uploading your file. To set var, go to
Edit site > File manager > now select dir.* > click the file id > Variables > add > Now in the text box put the url of the image preview and set.
 
Note: You have to do this for every file, so it is better to do it after each uploading.
Filelist code
 
 Ok, Now here's the code for filelist, remove the 4 spaces in : filelist : and : /filelist : and 1 space in : geti-p(1): and copy & paste in
Edit site > wml/xhtml code
 
 
From the above code, change X to the directory id(you can see the directory id at 'Edit site > Filemanager') and also you have to change Y to the DOWNLOAD PAGE site id that we can see later in this page. If you want more than 6 files to display in one page, change 6 to the number you want in l=6.
Only if you are using Image filelist, add ,nc=1 after ,o=d.
Thats it for filelist code but to make it complete, we should add a Paging code which is useful if you have many files to separate in different pages.
Paging code
For paging code remove 4 spaces in : paging : and : /paging : and 1 space in : geti-p(1): and copy and paste in
Edit site > Wml/xhtml code
 
Note: Change ID to the site id of the current site. It is better to use this code with the previous one, So, while you adding this paging code, tick Join this item with previous or Paste directly in the last of the previous Filelist code.
Download Page code
Finally, to create a download page, create a new page with name Download and set the visibility to Admin Mode. To create a New Page, go to
Edit site > New page
Now open the created site and note the site id at the bottom. Remember this id and go back to the Filelist code page and click,
Editsite > edit items > select the filelist code and change Y to the site Id of the download page.
Now again open the Download page and go to
Edit site > Wml/xHtml code
Now copy & paste the below code there. DONT FORGOT TO REMOVE SPACES in : filelist : and : /filelist :. Also remove space in between : get-id(1):(otherwise the code may not work)
 
You must change X to the directory id as you done in the filelist code
If you are using Image filelist, then change %var-1% to %url% in all the above codes(filelist and download page) and add ,nc=1 after ,l=1 in the Download page code. And if you are using games or other filelist and using comment section to put image url, then change all %var-1% to %comment% and delete the existing "Description: %comment%" in the download page code. Thanks for your understanding...
ALL THE CODES ARE WORKING FINE! Check out the demo here... Create good css/designs to match your site theme.
About the Demo
I created a Demo page for you to understand better...I was uploaded some photos in the directory without comments and used the above codes. What Iam used was a Image filelist. So, I changed %var-1% to %url% and added ,nc=1 after ,o=d in filelist code and ,l=1 in Download page code. Also you can see the link 'Download' at the bottom of the filelist code page in Demo, because I dont set the visibility to admin mode for you to understand. Anyway, As you can see that it works fine...
   Yep.! You've now created a filelist code with preview and Download page for your site. Enjoy adding good contents and files for your users. I think it would be more interesting if the download page contains Share on Facebook, Twitter, Orkut option. So, i'll add those codes shortly in this page. Also Iam going to add a Filelist code Generator, Filelist code Tutorial and others if any. So, it worth to bookmark this page and i like you to come back again. If you have any doubts in the above codes, ask it in the below forum, please share your valuable comments. . .

0 comments: