Re: Can anyone tell me how to use this api new method
Posted: Mon Feb 05, 2024 3:23 am
Let's talk
http://blog.wapka.co/
This is weird, I don't know what the problem could beshrmaprem0202 wrote: ↑Mon Feb 05, 2024 3:23 am If i use script tag display nothing was display and without script tag displayed code in text format
francisco wrote: ↑Mon Feb 05, 2024 3:25 amThis is weird, I don't know what the problem could beshrmaprem0202 wrote: ↑Mon Feb 05, 2024 3:23 am If i use script tag display nothing was display and without script tag displayed code in text format
Code: Select all
<script>
local tags = [=[
<div class="user-line">
<a href="/user/%id%/%username%"><b>%username%</b></a><br>
<i>Registered: %regdate%</i>
</div>
]=]
local param = {
limit = 10,
order = "id_desc"
}
local is_ok, list = api.user_info(param)
if is_ok then
print('\n<div class="user-list">\n')
print(html.render_tag(tags, list, true))
print('\n</div>\n')
end
</script>
I removed script tag and put this code in tag code then this result was show
Code: Select all
local tags = [=[ %username% Registered: %regdate% <br> ]=] local param = { limit = 10, order = "id_desc" } local is_ok, list = api.user_info(param) if is_ok then print('\n \n') print(html.render_tag(tags, list, true)) print('\n \n') end
Code: Select all
local tags = [=[ <div class="container" id="form"> <b>User:</b> %username% <br> <b>Registered:</b> %regdate% </div> ]=] local param = { limit = 10, order = "id_desc" } local is_ok, list = api.user_info(param) if is_ok then print('\n \n') print(html.render_tag(tags, list, true)) print('\n \n') end
Super, thank youXkria-uy wrote: ↑Mon Feb 05, 2024 9:30 pmCode: Select all
local tags = [=[ <div class="container" id="form"> <b>User:</b> %username% <br> <b>Registered:</b> %regdate% </div> ]=] local param = { limit = 10, order = "id_desc" } local is_ok, list = api.user_info(param) if is_ok then print('\n \n') print(html.render_tag(tags, list, true)) print('\n \n') end
Screenshot_20240205-182739.png
Where you put this codevikkas wrote: ↑Tue Feb 06, 2024 2:06 amSuper, thank youXkria-uy wrote: ↑Mon Feb 05, 2024 9:30 pmCode: Select all
local tags = [=[ <div class="container" id="form"> <b>User:</b> %username% <br> <b>Registered:</b> %regdate% </div> ]=] local param = { limit = 10, order = "id_desc" } local is_ok, list = api.user_info(param) if is_ok then print('\n \n') print(html.render_tag(tags, list, true)) print('\n \n') end
Screenshot_20240205-182739.png