Can anyone tell me how to use this api new method

Handle problems or report system bug
shrmaprem0202
Posts: 38
Joined: Tue Mar 07, 2023 7:13 pm
Contact:

Re: Can anyone tell me how to use this api new method

Post by shrmaprem0202 »

francisco wrote: ↑Sun Feb 04, 2024 4:36 pm
shrmaprem0202 wrote: ↑Sun Feb 04, 2024 5:25 am I don't know why but it's still not working 🚫
What error are you getting?
If i use script tag display nothing was display and without script tag displayed code in text format
User avatar
francisco
Posts: 62
Joined: Tue Mar 07, 2023 1:48 pm
Location: Brazil
Contact:

Re: Can anyone tell me how to use this api new method

Post by francisco »

shrmaprem0202 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
This is weird, I don't know what the problem could be
😴
shrmaprem0202
Posts: 38
Joined: Tue Mar 07, 2023 7:13 pm
Contact:

Re: Can anyone tell me how to use this api new method

Post by shrmaprem0202 »

francisco wrote: ↑Mon Feb 05, 2024 3:25 am
shrmaprem0202 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
This is weird, I don't know what the problem could be

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 used this simply i copied your code and paste
User avatar
francisco
Posts: 62
Joined: Tue Mar 07, 2023 1:48 pm
Location: Brazil
Contact:

Re: Can anyone tell me how to use this api new method

Post by francisco »

Do not use <script> and </script>, this is Lua code, not Javascript.
😴
shrmaprem0202
Posts: 38
Joined: Tue Mar 07, 2023 7:13 pm
Contact:

Re: Can anyone tell me how to use this api new method

Post by shrmaprem0202 »

francisco wrote: ↑Mon Feb 05, 2024 4:12 am Do not use <script> and </script>, this is Lua code, not Javascript.
I removed script tag and put this code in tag code then this result was show



local tags = [=[
%username%
Registered: %regdate%
]=] 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
User avatar
Xkria-uy
Posts: 122
Joined: Fri Apr 07, 2023 9:27 pm
Location: Uruguay
Contact:

Re: Can anyone tell me how to use this api new method

Post by Xkria-uy »

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
code
Screenshot_20240205-180047.png (38.79 KiB) Viewed 18135 times
resultados
resultados
Screenshot_20240205-175903.png (61.6 KiB) Viewed 18135 times
User avatar
Xkria-uy
Posts: 122
Joined: Fri Apr 07, 2023 9:27 pm
Location: Uruguay
Contact:

Re: Can anyone tell me how to use this api new method

Post by Xkria-uy »

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
r
r
Screenshot_20240205-182739.png (94.49 KiB) Viewed 18121 times
vikkas
Posts: 84
Joined: Sun May 07, 2023 9:28 am

Re: Can anyone tell me how to use this api new method

Post by vikkas »

Xkria-uy wrote: ↑Mon Feb 05, 2024 9:30 pm

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

Screenshot_20240205-182739.png
Super, thank you πŸ‘πŸ˜Š
shrmaprem0202
Posts: 38
Joined: Tue Mar 07, 2023 7:13 pm
Contact:

Re: Can anyone tell me how to use this api new method

Post by shrmaprem0202 »

vikkas wrote: ↑Tue Feb 06, 2024 2:06 am
Xkria-uy wrote: ↑Mon Feb 05, 2024 9:30 pm

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

Screenshot_20240205-182739.png
Super, thank you πŸ‘πŸ˜Š
Where you put this code
shrmaprem0202
Posts: 38
Joined: Tue Mar 07, 2023 7:13 pm
Contact:

Re: Can anyone tell me how to use this api new method

Post by shrmaprem0202 »

francisco wrote: ↑Mon Feb 05, 2024 4:12 am Do not use <script> and </script>, this is Lua code, not Javascript.
In tag code
Post Reply