You need to see this

Handle problems or report system bug
Hariph
Posts: 43
Joined: Tue May 23, 2023 9:33 pm

Re: You need to see this

Post 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
Hariph
Posts: 43
Joined: Tue May 23, 2023 9:33 pm

Re: You need to see this

Post 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?
User avatar
francisco
Posts: 58
Joined: Tue Mar 07, 2023 1:48 pm
Location: Brazil
Contact:

Re: You need to see this

Post 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/
😴
Post Reply