Skip to content

Commit 3935dfc

Browse files
committed
refinements
1 parent c94e5e5 commit 3935dfc

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

modules/obbywiki.com/PlayerInfobox/PlayerInfobox.module.luau

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ function PlayerInfobox.main( frame )
197197

198198
--
199199

200-
local most_popular_obby = { name = ''; visits = 0; }
200+
local most_popular_obby = { name = ''; visits = 0; year = ''; month = ''; image = '' }
201201
local most_recent_obby
202202

203203
if mw.ext.cargo and mw.ext.cargo.query then
@@ -223,6 +223,8 @@ function PlayerInfobox.main( frame )
223223
if popular_data and popular_data[1] then
224224
most_popular_obby.name = popular_data[1].name
225225
most_popular_obby.visits = tonumber(popular_data[1].visits) or 0
226+
most_popular_obby.month = tostring(popular_data[1].month)
227+
most_popular_obby.year = tostring(popular_data[1].year)
226228
end
227229
end
228230

@@ -253,7 +255,16 @@ function PlayerInfobox.main( frame )
253255
content = {
254256
test:renderItem( 'Total Visits', get_comma_val(player_total_visits) .. '+ <ref name="statistics_data">Collected from every obby developed by this user which is stored in the Obby Wiki\'s database. Data may not be conclusive.</ref>'),
255257
test:renderItem( 'Obbies', '~' .. player_total_obbies .. ' <ref name="statistics_data" />'),
256-
test:renderItem( 'Most Popular Obby by Visits', most_popular_obby.name),
258+
-- test:renderItem( 'Peak CCU', obby_stats_peak_ccu .. '+' ),
259+
-- test:renderItem( 'Likes', obby_stats_likes .. '+' ),
260+
}
261+
} )
262+
263+
test:renderSection( {
264+
title = 'Featured',
265+
col = 2,
266+
content = {
267+
test:renderItem( 'Most Popular Obby', `{most_popular_obby.name} - {get_comma_val(most_popular_obby.visits)} ({most_popular_obby.month} {most_popular_obby.year})`),
257268
-- test:renderItem( 'Peak CCU', obby_stats_peak_ccu .. '+' ),
258269
-- test:renderItem( 'Likes', obby_stats_likes .. '+' ),
259270
}

0 commit comments

Comments
 (0)