How to add wapka api, post lister multiple forumid?
Posted: Wed May 22, 2024 7:41 am
Code: Select all
<a href="https://api.wapka.org/PostInfo?apikey={{VAR(APIKEY)}}&forumid=21425,limit=10,order='id_asc'">vikkas</a>
Let's talk
http://forum.wapka.io/
Code: Select all
<a href="https://api.wapka.org/PostInfo?apikey={{VAR(APIKEY)}}&forumid=21425,limit=10,order='id_asc'">vikkas</a>
Code: Select all
forumid[]=810&forumid[]=16927&forumid[]=16928&forumid[]=20382
Code: Select all
local post_check1, post_list, post_stats = api.post_info({forumid[]=15554,forumid[]=24306,forumid[]=24510,limit=10})
if 10 > 0 then
for loopindex, article in ipairs(post_list) do
thumbnail = string.match(article['content'], "%[img%](.-)%[/img%]") or 'https://i.imgur.com/01T3Bxl.png'
colors = {'red', 'blue', 'green', 'orange'}
randomIndex = math.random(1, #colors)
randomColor = colors[randomIndex]
topicClass = "cat_"..randomColor
category = article['ForumInfo']
link = "/article/"..article['id'].."-"..article['title']..".html"
local html = [[
<div class="list">
<div style="float:left">
<img src="]]..thumbnail..[[" title="]]..article['title']..[[" alt="]]..article['title']..[[" width="55" height="55" class="thumbnail"/>
</div>
<a href="]]..link..[["><b>]]..article['title']..[[</b></a><br/>
<b>Category:</b> <span class="mau topic ]]..topicClass..[[">]]..category['name']..[[</span><br/>
<b>Post:</b> ]]..article['date']..[[
</div>
]]
print(html)
end
print('?page=',p,page_max)
else
print([[<div class="list1">post not found</div>]])
end
Code: Select all
api.post_info({forumid={15554,24306}, limit=10})