Heyuri / kokonotsuba

Heyuri's BBS software
Other
19 stars 12 forks source link

Catalog images do not show up and the replies icon does not exist. #7

Closed RealAngeleno closed 10 months ago

RealAngeleno commented 1 year ago

This was originally found on an Apache/2.4.29 (Ubuntu) Server with PHP 7.2 and MySQL, but was reproduced on an NGINX (Debian 10) Server with PHP 7.3 and MariaDB. This bug can also be found on Heyuri's /q/ board. It appears to happen because Kokonotsuba always makes thumbnails .pngs, while the catalog script only searches for .jpgs. It can be fixed (possibly in a jank manner) by changing ($FileIO->imageExists($tim.$ext) ? '<img src="'.$FileIO->getImageURL($tim.'s.jpg').'" width="'.min(150, $tw).'" vspace="3" class="thumb" />' : '***'). to ($FileIO->imageExists($tim.$ext) ? '<img src="'.$FileIO->getImageURL($tim.'s.png').'" width="'.min(150, $tw).'" vspace="3" class="thumb" />' : '***'). on module/mod_cat.php.

The replies icon (koko//image/replies.png) also does not show up since the image does not exist locally.

(did not submit a pull request for this because I believe the fix I listed here may be a band-aid fix)