Search found 69 matches
- Mon Feb 26, 2024 3:18 pm
- Forum: Ask any question
- Topic: How to create Paging using Lua?
- Replies: 4
- Views: 20210
Re: How to create Paging using Lua?
Hello! The api.post_info method has 4 returns (as far as I know), namely¹: ok (boolean, 1 if success or nothing if error), result (list of records returned by the API query, or nothing if error), resultInfo (contains data about the pagination of the returned records!, or error code in case of an err...
- Sat Feb 24, 2024 6:59 am
- Forum: Ask any question
- Topic: How to make url slug using LUA?
- Replies: 3
- Views: 16842
Re: How to make url slug using LUA?
Thank you so much :o , so the keypoint is we can use lua function inside the double brackets by using this delimiter %tag|function% Correct. Any function or method that takes a single parameter can be used in this way. You can even create your own function! function AwesomeTitle(title) local text =...
- Sat Feb 24, 2024 5:07 am
- Forum: Ask any question
- Topic: How to make url slug using LUA?
- Replies: 3
- Views: 16842
Re: How to make url slug using LUA?
Hello! Please try this: %title|url.slug% To explain further, this is as if the return of %title% is used as a parameter for the url.slug(param) method. This means that you could also do, for example, %title|string.upper% to make the text uppercase, or %title|hash.md5% to generate an MD5 hash from th...
- Fri Feb 23, 2024 9:09 pm
- Forum: Problems
- Topic: I need your help please
- Replies: 3
- Views: 15864
Re: I need your help please
In Post Lister you have a really cool setting called STATUS, but don't ask me why it's not documented hahaha To accomplish what you want use the following in Enter Config: <STATUS>{{VAR(USER_ROLE)@IFMATCH(Admin)@THEN(All)@ELSE(Published)}}</STATUS> With this, only posts with Published status will be...
- Fri Feb 23, 2024 4:31 pm
- Forum: Problems
- Topic: You need to see this
- Replies: 12
- Views: 47710
Re: You need to see this
For example, sitename/page-name/forum-number.html Where as, the forum number changes based on the forum category that was clicked and therefore when a user post to that category his or her post appears there and not on all the categories Do you understand what I mean Let's say the page is called fo...
- Thu Feb 22, 2024 11:40 am
- Forum: Problems
- Topic: [Solved] Setting the timezone doesn't work
- Replies: 4
- Views: 20895
[Solved] Setting the timezone doesn't work
Now it works, thank you very much!Administrator wrote: ↑Thu Feb 22, 2024 4:59 am use server.date() it will work same as {{date()}} tag
- Wed Feb 21, 2024 9:41 pm
- Forum: Problems
- Topic: [Solved] Setting the timezone doesn't work
- Replies: 4
- Views: 20895
Re: Setting the timezone doesn't work
Problem Fixed for more https://jonayed-hossan.com/wapka/server/timezone/ It is fixed only for the DATE function, in Lua scripting the timezone remains as CET by default. Datetime (Lua) 2024-02-21 22:38:15 +0100 CET Datetime (DATE() function) 2024-02-21 18:38:15 -0300 America/Fortaleza
- Mon Feb 19, 2024 9:58 pm
- Forum: Problems
- Topic: [Lua] api.user_edit not working
- Replies: 0
- Views: 11066
[Lua] api.user_edit not working
Hello! I'm trying to use the API user_edit method in Lua but it's not working, as I always get the error "Userid Or Username name is required" even if I provide the correct ID/Username. I've tried several parameter options, but none of them work: id, userid, user_id, user, username, user_n...
- Mon Feb 19, 2024 11:56 am
- Forum: Problems
- Topic: You need to see this
- Replies: 12
- Views: 47710
Re: You need to see this
Ooh that's why it wasn't working, well I tried the lua cold you provided, it actually worked but its working for only one forum category but I wanted it to work for all forum categories and not just one alone, I want the user to be able to select the category they want to post to, or better still t...
- Sun Feb 18, 2024 9:03 pm
- Forum: Problems
- Topic: [Solved] Setting the timezone doesn't work
- Replies: 4
- Views: 20895
[Solved] Setting the timezone doesn't work
Hello! Timezone setting is not working in Web Server settings. Using the code below does not actually change the timezone to UTC, it remains CET +01:00 (in Lua codes) - I think this is due to the fact that the Wapka server is located in Germany: server.timezone(env.timezone or 'UTC'); I also reporte...