MyBB Community Forums

Full Version: [Issue][Low] - hardcoded HTML in online.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
After revamping online templates i have noticed that {$refresh} variable doesn't point to any templates. After digging in online.php i have noticed that that variable is hardcoded:

Line 277

$refresh = "<meta http-equiv=\"refresh\" content=\"{$refresh_time};URL=online.php{$refresh_string}\" />";

Fix

Replace that code above with

eval("\$online_refresh = \"".$templates->get("online_refresh")."\";");



Line 14

$templatelist = "online,online_row,online_row_ip,online_today,online_today_row,online_row_ip_lookup,multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start";


to


$templatelist = "online,online_refresh,online_row,online_row_ip,online_today,online_today_row,online_row_ip_lookup,multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start";


and new template online_refresh

<meta http-equiv="refresh" content="{$refresh_time};URL=online.php{$refresh_string}" />


And in online template replace {$refresh} with {$online_refresh}

If possible this issue can be added to https://github.com/mybb/mybb/issues/1150 (Removed hadcoded HTML V2).
Just check this: you can start with PR
https://github.com/mybb/mybb/issues/1150
Added to the list.