Wapka FileList Preview Code

Share Button
Wapka

Wapka

Wapka is the best mobile site builder I’ve come across over the years. I have been using it since 2011. While using Wapka, I have discovered many tricks. Some by using the advanced functions in wapka which you will find under your ::EDIT SITE:: menu (Some people don’t know about this), some by using JavaScript or CSS. Even by exloading from PHP sites.

In this tutorial, I’ll show you how to do a File Manager preview system on Wapka. By default, this feature isn’t supported but with the help of a trick, it will be achieved. At the end if you did everything correctly, the below will be achieved.

Wapka File Manager Preview

Wapka File Manager Preview

First Step

Upload the preview/icon/screenshot for the file you want and get the URL of the picture you uploaded.

Second Step

Locate the file you want to add preview for in your file manager. Select the file and click on variables.

Third Step

Add 1 new variable and add your uploaded preview URL in the box as shown below.

Add Preview URL

Add Preview URL in the box

After adding the URL something like the image below will be achieved.

What You Will Achieve

What You Will Achieve

Fourth Step

To add preview to filelist, add the below code where you want the preview to show in your filelist after the first ::

<script>
var latest = "%var-1%";
if(latest=="") {
var latest = "/img/200086/200086690_6c57206f23.png";
} else {
var latest = "%var-1%;
}
</script>
<script>
document.write('<img src="'+latest+'" height="50" width="50"/>');
</script>

Put the code in your file list where you want the preview to show..

Abdullahi Wada

About Abdullahi Wada

View all Posts

A computer engineering student. For the future is computerized...

Leave a Reply

Your email address will not be published. Required fields are marked *

*