local param = { id = env.userid } local is_ok, userdata = api.user_info(param) local user = is_ok and userdata and userdata[0] local dark_setting = user and user.var and user.var.dark if dark_setting == "Dark Mode" then print('') else print('') endlocal param = { id = env.userid } local is_ok, userdata = api.user_info(param) local user = is_ok and userdata and userdata[0] local dark_setting = user and user.var and user.var.dark if dark_setting == "Dark Mode" then print('') else print('') end
print("Content-Type: text/html\n") -- Get user ID from URL (uid parameter) local user_id = req.get.uid or env.userid or "" -- If no user ID, show error if user_id == "" then print([[ Profile

No user selected.

← Go Back
]]) return end -- Fetch user data from API local is_ok, userdata = api.user_info({id = user_id}) -- Default values local username = "Unknown" local avatar = "https://yocliq.com/media/icons/default-avatar.png" local point = 0 local email = "" local regdate = "" local role = "0" local var = {} -- Parse user data if successful if is_ok and userdata and userdata[0] then local user = userdata[0] username = user.username or "Unknown" avatar = user.avatar or avatar -- Convert var.point to number safely local raw_point = (user.var and user.var.point) or 0 point = tonumber(raw_point) or 0 email = user.email or "" regdate = user.regdate or "" role = user.role or "0" var = user.var or {} end -- Map role numbers to readable names local role_map = { ["0"] = "User", ["1"] = "Contributor", ["4"] = "Moderator", ["5"] = "Master Moderator", ["8"] = "Administrator", ["9"] = "Head Admin", ["10"] = "Site Owner" } local role_display = role_map[tostring(role)] or "Member" -- Get current logged in user ID from env local current_user_id = env.userid or "" -- Custom variables local cimg = var.cimg or "" local fin = var.fin or "" local actp = var.actp or "" local about = var.about or "No bio added yet." local country = var.country or "Not specified" local website = var.website or "" local phone = var.phone or "" local gender = var.gender or "Not specified" local birthday = var.birthday or "Not specified" local status = var.status or "Active" local premium = var.premium or "False" local languages = var.languages or "Not specified" local likes = var.likes or "Not specified" local dislikes = var.dislikes or "Not specified" local last_active = var.last_active or "Just now" local post_count = tonumber(var.post_count) or 0 local follower_count = tonumber(var.follower_count) or 0 local following_count = tonumber(var.following_count) or 0 -- Cover image local cover_image = cimg if cover_image == "" then cover_image = "https://yocliq.com/media/icons/default-cover.jpg" end -- Display name - use var.fin first, then username local display_name = fin if display_name == "" then display_name = username end -- Get role as number for comparison local role_num = tonumber(role) or 0 -- Verified Tick (from var.premium) local verified_tick = "" if premium == "True" or premium == "true" or premium == "1" then verified_tick = 'Verified' end -- STF Badge - for staff members (role > 0) local stf_badge = "" if role_num > 0 then stf_badge = '' end -- Show edit button (only for profile owner) local show_edit_button = (current_user_id == user_id) -- Show follow button (only for OTHER users, not the profile owner) local show_follow_button = (current_user_id ~= "" and current_user_id ~= user_id) -- Show message button (only for OTHER users, not the profile owner) local show_message_button = (current_user_id ~= "" and current_user_id ~= user_id) -- Level calculation based on var.point local level_text = "Newbie" if point < 5000 then level_text = "Newbie" elseif point < 10000 then level_text = "Wapper" elseif point < 20000 then level_text = "Apprentice" elseif point < 30000 then level_text = "Proficient" elseif point < 40000 then level_text = "Bronze Member" elseif point < 50000 then level_text = "Silver Member" elseif point < 75000 then level_text = "Elite Member" elseif point < 100000 then level_text = "Superior Member" elseif point < 200000 then level_text = "Premium User" else level_text = "Legend" end -- Rank calculation based on var.point local rank_image_url = "https://yocliq.com/media/icons/no-badge.svg" local rank_label = "Beginner" local current_max = 50 local next_rank = "Explorer" if point <= 50 then rank_image_url = "https://yocliq.com/media/icons/no-badge.svg" rank_label = "Beginner" current_max = 50 next_rank = "Explorer" elseif point <= 300 then rank_image_url = "https://yocliq.com/media/icons/lvl2-badge.svg" rank_label = "Explorer" current_max = 300 next_rank = "Seeker" elseif point <= 600 then rank_image_url = "https://yocliq.com/media/icons/lvl3-badge.svg" rank_label = "Seeker" current_max = 600 next_rank = "Artisan" elseif point <= 1000 then rank_image_url = "https://yocliq.com/media/icons/lvl4-badge.svg" rank_label = "Artisan" current_max = 1000 next_rank = "Expert" else rank_image_url = "https://yocliq.com/media/icons/lvl5-badge.svg" rank_label = "Expert" current_max = point next_rank = "Master" end local rank_percent = (point / current_max) * 100 if rank_percent > 100 then rank_percent = 100 end -- HTML Output print([[ ]] .. display_name .. [[ - Profile
Profile Avatar
]] .. stf_badge .. [[
]] .. display_name .. [[ ]] .. verified_tick .. [[
@]] .. username .. [[ · ]] .. actp .. [[
]] .. level_text .. [[ • ]] .. point .. [[ XP
]]) -- Follow button - ONLY show for other users (not the profile owner) if show_follow_button then print([[ Follow ]]) end -- Message button - show for other users if show_message_button then print([[ Message ]]) end print([[
About
]]) if show_edit_button then print([[
]]) end print([[
]] .. about .. [[
]] .. post_count .. [[
Posts
Preferences
Likes:
Dislikes: ]] .. dislikes .. [[
User Information
Gender: ]] .. gender .. [[
Languages: ]] .. languages .. [[
Location: ]] .. country .. [[
Phone: ]] .. phone .. [[
Birthday: ]] .. birthday .. [[
Status: ]] .. status .. [[
Joined: ]] .. regdate .. [[
Email: ]] .. email .. [[
Badges & Achievements
]]) if premium == "True" or premium == "true" or premium == "1" then print([[
✓ Premium Verified
]]) end if role_num > 0 then print([[
⭐ Staff Member
]]) end print([[
]] .. role_display .. [[
★ Early Bird
Rank Progression
]] .. rank_label .. [[
]] .. point .. [[ / ]] .. current_max .. [[ XP to ]] .. next_rank .. [[
]])
Hi guyz am new here
0 comments · 0 likes
Hi guyz am new here
0 comments · 0 likes
Hi guyz, am new here, so am i welcome?
0 comments · 0 likes
Hello Everybody!
0 comments · 0 likes
Berry i love u guy
0 comments · 0 likes
About · Help · Terms · Privacy Policy · Advertise with Us
Owned & developed by: Nobletech
© Newgram Social