Page 1 of 1

Update: We just added scripting language support

Posted: Wed Jan 31, 2024 2:43 pm
by Administrator
Hello, finally we added support for programming language on wapka. Now any one can write php/python like code and do everything.
No need to use tag code any more. REST API is now available as

Code: Select all

api.method_name
library.
here how you can use Lua code on wapka Script:

Code: Select all

--user list using wapka script
local param = {
    limit = 10, --> maximum 10 item
    order = "id_desc"
}

local is_ok, userlist = api.user_info(param) --> calling rest api method for user list
print(userlist); --> show result
Old style html tag file list

Code: Select all

--file list using wapka script
local tags = [=[
<tr><td width="23%" align="left" valign="top" margin="auto">
<img src="%thumb%" title="%name%" name="%name%" alt="%name%" width="65" height="56" style="border-radius:2px;"/>
<br/></td><td align="left"><a href="/download/%id%/%name|slug%"><b>%name%.%format%</b></a><br/>
<b><font color="gold">Size:</font></b> %size%<br/><b><font color="gold">Upload at: </font> </b> %date|date%</td></tr>
<tr><td colspan="2" align="left"><div style="background:#444;border-top: 1px solid #505050;padding:3px 0px 3px 6px;margin:0px 0px 0px 0px;">
<font color="gold"><b> Category:</b> </font> 
  <a href="/category/%dir%/%dirname|slug%" style="color:#ddd"><b>%dirname%</b></a> </div>
</td></tr>
]=]
local param = {
    limit = 10, --> maximum 10 item per page
    order = "id_desc"
}

local is_ok, list = api.file_info(param) --> calling rest api method for file list

if is_ok then
    print(html.render_tag(tags, list, true)); ---> render all item recursively
end
print(list); --> view all as json
All REST API function is converted to function so test it now and give your suggest so we and make it better.
Stay tuned we will add full information soon.
To learn more about lua go to: https://jonayed-hossan.com/learn-lua-sc ... -language/

Re: We just added scripting language support

Posted: Wed Jan 31, 2024 4:10 pm
by francisco
This is wild, I can't fathom how amazing this is 😲

Re: We just added scripting language support

Posted: Thu Feb 01, 2024 2:01 am
by vikkas
Awesome bro, Super

Re: We just added scripting language support

Posted: Thu Feb 01, 2024 10:54 am
by shrmaprem0202
Please post a example of userlist with source code

Re: We just added scripting language support

Posted: Fri Feb 02, 2024 2:20 am
by vikkas
Admin demo please

Re: Update: We just added scripting language support

Posted: Mon Feb 26, 2024 3:06 am
by obaydulbc
Awesome