]]
print(html2)
local is_ok, list1 = api.post_info({id = req.get.postid})
content = list1[0].content
print(bbcode(content.. "[hr]").. ' ')
fid = {23992}
uid = tostring(req.get.postid)
sn = 1
muser = tonumber(env.userid)
local is_ok, list2 = api.post_info({forumid=fid, limit=9999})
local seen = {}
local html = {}
local new_list = {}
for i, users in ipairs(list2) do
if list2[i].var and list2[i].var.postid == uid then
seen[users.var.postid] = true
table.insert(new_list, users)
end
end
print("Total likes ["..#new_list.."] ")
for loopindex, userdata in ipairs(new_list) do
user = userdata['UserInfo']
if user['id'] == muser then
print("")
end
if sn == 1 then
html[#html + 1] = [[]] .. user['username'] .. [[ ]]
elseif sn == #new_list then
html[#html + 1] = [[and ]] .. user['username'] .. [[ ]]
else
html[#html + 1] = [[, ]] .. user['username'] .. [[ ]]
end
sn = sn +1
end
print(like_btn)
print(table.concat(html))
print("
")-- Comment inputs
local is_ok, list3 = api.user_info({ id= tonumber(env.userid)})
postid = tonumber(req.get.postid) or 134804
local is_ok, list = api.post_info({id = postid})
if is_ok then
user = list[0].UserInfo
end
local header = [[
]]
print(header)
if(env.userid ~= 0) then
-- All input values
local cid = tonumber(req.get.reply or user.id)
local cname = tostring(user.username)
local cavatar = tostring(list3[0].avatar or "https://wapka-cdn.zuna.id/008s6z/e826bedc83eaa61c8659d8e737579f5c/image.jpg")
local replyto = tostring(req.get.uname or "0")
local replyhtml
if req.get.reply then
replyhtml = '
Share the complete code admin.. Not Understood properly should I add only link ??https://waptrick360.wapka.site/post?forum=20714 In Config of Postcrea
(9 months ago
)
-- Random 5 posts
postid = tonumber(req.get.postid)
local is_ok, list1 = api.post_info({id = postid})
fid = tonumber(list1[0].ForumInfo.id)
if fid ~= 27289 then
fid = {10294} end
include('luascripts')
include('bbcode')
print([[
More Topics
]])
local post_check, post_check_list, post_check_stats = api.post_info({forumid=fid})
post_total = tonumber(post_check_stats['total'])
local is_ok, list = api.post_info({limit=post_total,forumid=fid})
if is_ok then
table.insert(list,list[0])
-- Shuffle the list
math.randomseed(os.time())
for i = #list, 2, -1 do
local j = math.random(i)
list[i], list[j] = list[j], list[i]
end
-- Display 5 random posts
for i = 1, math.min(5, #list) do
local article = list[i]
thumbnail = string.match(article['content'], "%[img%](.-)%[/img%]") or 'https://wapka-img.zuna.id/37cb83d6.png'
colors = {'red', 'blue', 'green', 'orange'}
randomIndex = math.random(1, #colors)
randomColor = colors[randomIndex]
topicClass = "cat_"..randomColor
category = article['ForumInfo']
user = article['UserInfo']
link = "/view?postid="..article['id'].."&title="..slugVN(article['title'])..".html"
local html = [[