Page 2 of 2

Re: You need to see this

Posted: Mon Feb 19, 2024 9:30 pm
by Hariph
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

Re: You need to see this

Posted: Fri Feb 23, 2024 9:20 am
by Hariph
francisco wrote: Mon Feb 19, 2024 11:56 am
Hariph wrote: Mon Feb 19, 2024 10:36 am 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 the url can catch the category where the user is coming from and update thier post on that category
What url structure are you using on your forum?

Re: You need to see this

Posted: Fri Feb 23, 2024 4:31 pm
by francisco
Hariph wrote: Mon Feb 19, 2024 9:30 pm 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 forums and the structure is always https://example.com/forums/1000.html (i.e. the forum number always comes after "/forums/"), you can get the forum number in the following way:

Code: Select all

raw_uri = req.uri -- Example: /forums/10000.html
forum_number = tonumber(string.match(raw_uri, "/forums/(%d+)"))
https://jonayed-hossan.com/wapka/request/synopsis-req/