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
You need to see this
Re: You need to see this
francisco wrote: ↑Mon Feb 19, 2024 11:56 amWhat url structure are you using on your forum?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
Re: You need to see this
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: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
Code: Select all
raw_uri = req.uri -- Example: /forums/10000.html
forum_number = tonumber(string.match(raw_uri, "/forums/(%d+)"))