You can run a loop yourself that includes posts that don't belong to the "chat" category for the above case
Search found 14 matches
- Fri May 10, 2024 11:15 am
- Forum: Tutorials
- Topic: [LUA] Article pagination method with lua
- Replies: 4
- Views: 66661
Re: [LUA] Article pagination method with lua
- Thu May 09, 2024 9:29 am
- Forum: General Discussion
- Topic: [SHARE][LUA] Simple blog with lua-lang for wapka
- Replies: 1
- Views: 41315
[SHARE][LUA] Simple blog with lua-lang for wapka
Hi everybody. Today I would like to share with you my open source code written in lua on the wapka.co platform.
This source code is an example of how to use the lua programming language for beginners using wapka.org. The source code has many shortcomings, but it is also very basic so you can build ...
This source code is an example of how to use the lua programming language for beginners using wapka.org. The source code has many shortcomings, but it is also very basic so you can build ...
- Thu May 09, 2024 2:30 am
- Forum: Tutorials
- Topic: [LUA] Plugin video and BBcode as same as Dorew with lua
- Replies: 0
- Views: 57459
[LUA] Plugin video and BBcode as same as Dorew with lua
DEMO:
https://i.imgur.com/ao9xHj2.png
First, create a 'plugin' file with the following lua code:
fullurl0 = req.get.link
if not fullurl0 or fullurl0 == "" then
fullurl0 = "https://www.youtube.com/watch?v=vWGhEKJZ2yI"
end
-- Khởi tạo function cần thiết cho các plugin
local function ...
https://i.imgur.com/ao9xHj2.png
First, create a 'plugin' file with the following lua code:
fullurl0 = req.get.link
if not fullurl0 or fullurl0 == "" then
fullurl0 = "https://www.youtube.com/watch?v=vWGhEKJZ2yI"
end
-- Khởi tạo function cần thiết cho các plugin
local function ...
- Thu May 09, 2024 1:29 am
- Forum: Tutorials
- Topic: [LUA] Article infomation with lua
- Replies: 1
- Views: 42773
[LUA] Article infomation with lua
DEMO:
https://i.imgur.com/HNH8xbA.png
URL: https://{yourdomain}/article/{post_id}-{post_slug}.html
Example:
https://shared.wapka.top/article/70227-automation-studio-5-0-full-crack.html
LUA:
include('jesuisnk')
local article = string.match(req.url, '/article/(%d+)')
if article then ...
https://i.imgur.com/HNH8xbA.png
URL: https://{yourdomain}/article/{post_id}-{post_slug}.html
Example:
https://shared.wapka.top/article/70227-automation-studio-5-0-full-crack.html
LUA:
include('jesuisnk')
local article = string.match(req.url, '/article/(%d+)')
if article then ...
- Thu May 09, 2024 12:02 am
- Forum: Tutorials
- Topic: [LUA] Article pagination method with lua
- Replies: 4
- Views: 66661
Re: [LUA] Article pagination method with LUA
Then I tried passing OFFSET to api.post_info(), but it failed. So I, created a function that works similar to LIMIT and OFFSET like SQL. This will affect the performance of the site, because of too many loops, but it's still good if your 'index' doesn't have too many loops.
function slice(tbl ...
function slice(tbl ...
- Wed May 08, 2024 11:57 pm
- Forum: Tutorials
- Topic: [LUA] Article pagination method with lua
- Replies: 4
- Views: 66661
Re: [LUA] Article pagination method with LUA
- Let me explain a little about the above code. I intentionally wrote loops to cut the multidimensional array into pieces with the number of pages received from the request as follows:
local post_check, post_check_list, post_check_stats = api.post_info()
post_total = tonumber(post_check_stats ...
local post_check, post_check_list, post_check_stats = api.post_info()
post_total = tonumber(post_check_stats ...
- Wed May 08, 2024 11:55 pm
- Forum: Tutorials
- Topic: [LUA] Article pagination method with lua
- Replies: 4
- Views: 66661
[LUA] Article pagination method with lua
DEMO:
https://i.imgur.com/evnhDNp.png
First, create file 'jesuisnk', with lua code:
-- Slug
function slugVN(text)
local diacriticsMap = {
{ base = 'a', regex = '[àáảãạăắằẵặẳâầấậẫẩ]' },
{ base = 'e', regex = '[èéẻẽẹêếềễệể]' },
{ base = 'i', regex = '[ìíỉĩị]' },
{ base = 'o', regex ...
https://i.imgur.com/evnhDNp.png
First, create file 'jesuisnk', with lua code:
-- Slug
function slugVN(text)
local diacriticsMap = {
{ base = 'a', regex = '[àáảãạăắằẵặẳâầấậẫẩ]' },
{ base = 'e', regex = '[èéẻẽẹêếềễệể]' },
{ base = 'i', regex = '[ìíỉĩị]' },
{ base = 'o', regex ...
- Tue May 07, 2024 11:12 pm
- Forum: Tutorials
- Topic: [LUA] Create, rename and get detail categories (forum) with lua for Wapka
- Replies: 1
- Views: 38736
Re: [LUA] Create, rename and get detail categories (forum) with lua for Wapka
Full code: List categories
DEMO:
https://i.imgur.com/5Zi0bB2.png
LUA:
local cat_check, cat_check_list, cat_check_stats = api.forum_info()
cat_total = cat_check_stats['total']
local cat_check1, cat_list, cat_stats = api.forum_info({limit=cat_total})
table.insert(cat_list, 1, cat_list[0])
if ...
DEMO:
https://i.imgur.com/5Zi0bB2.png
LUA:
local cat_check, cat_check_list, cat_check_stats = api.forum_info()
cat_total = cat_check_stats['total']
local cat_check1, cat_list, cat_stats = api.forum_info({limit=cat_total})
table.insert(cat_list, 1, cat_list[0])
if ...
- Tue May 07, 2024 9:10 am
- Forum: Tutorials
- Topic: [LUA] Create, rename and get detail categories (forum) with lua for Wapka
- Replies: 1
- Views: 38736
[LUA] Create, rename and get detail categories (forum) with lua for Wapka
- Creator:
-- CATEGORY
---- /api/Category/Creator.json
if url.map("/api/Category/Creator.json") then
result = "false"
msg = "Thao tác không hợp lệ"
if (env.userid ~= 0) then
if (req.method == "POST") then
local param = {
name = req.post.title
}
local title = param.name
if title then ...
-- CATEGORY
---- /api/Category/Creator.json
if url.map("/api/Category/Creator.json") then
result = "false"
msg = "Thao tác không hợp lệ"
if (env.userid ~= 0) then
if (req.method == "POST") then
local param = {
name = req.post.title
}
local title = param.name
if title then ...
- Tue May 07, 2024 1:56 am
- Forum: Tutorials
- Topic: [LUA] BBcode with lua for wapka
- Replies: 1
- Views: 41472
[LUA] BBcode with lua for wapka
Use smileys from DorewSite.
SMILEYS:
function smile(input_string)
local arrEmoName = {'ami', 'anya', 'aru', 'aka', 'dauhanh', 'dora', 'le', 'menhera', 'moew', 'nam', 'pepe', 'qoobee', 'qoopepe', 'thobaymau', 'troll', 'dui', 'firefox', 'conan'}
for _, emoName in ipairs(arrEmoName) do
local ...
SMILEYS:
function smile(input_string)
local arrEmoName = {'ami', 'anya', 'aru', 'aka', 'dauhanh', 'dora', 'le', 'menhera', 'moew', 'nam', 'pepe', 'qoobee', 'qoopepe', 'thobaymau', 'troll', 'dui', 'firefox', 'conan'}
for _, emoName in ipairs(arrEmoName) do
local ...