Commit Graph

3 Commits

Author SHA1 Message Date
RealAngeleno
84c8bebfb6 fix issues with the banner script not working
PHP 7.4
Notice: Trying to access array offset on value of type resource in on line 13

Notice: Trying to access array offset on value of type resource in on line 14

Notice: fpassthru(): read of 8192 bytes failed with errno=21 Is a directory in  on line 17
2024-01-30 10:05:43 -01:00
Majin Bejitto
6e15e696ce fix "scandir should not need to sort in b.php (banner code)"
scandir by default sorts files in ascending order. this is unnecessary when you're picking a random file anyway. it's just wasting CPU cycles and increasing latency as more files are added.

currently it is

    $files = scandir($dir);

it should be

    $files = scandir($dir, SCANDIR_SORT_NONE);
2024-01-30 10:05:43 -01:00
deysu
582b123be4 Add banners as default functionality & display them on mod login / dashboard when enabled (#513)
* Add banner support as a default, integrated option.
Used lainchan's original banner script, authored by barrucadu

* Display banners on moderator login and dashboard

* Remove memes & better directory structure
2024-01-30 10:05:43 -01:00