Browse Source

Adds banner support and banners

pull/40/head
nonmakina 1 year ago
parent
commit
e5969098f9
  1. 32
      banners.php
  2. BIN
      banners/1608992480627.jpg
  3. BIN
      banners/1608992511794.jpg
  4. BIN
      banners/1608992524118.jpg
  5. BIN
      banners/1608992551600.jpg
  6. BIN
      banners/1608992576348.jpg
  7. BIN
      banners/1608992589414.jpg
  8. BIN
      banners/1608992682734.jpg
  9. BIN
      banners/1608993276367.jpg
  10. BIN
      banners/1608996011049.png
  11. BIN
      banners/1609004437891.jpg
  12. BIN
      banners/1609004460965.jpg
  13. BIN
      banners/1609010983068.gif
  14. BIN
      banners/1610174020766-0.png
  15. BIN
      banners/1610174020766-1.png
  16. BIN
      banners/1610174020766-2.png
  17. BIN
      banners/1610174020766-3.png
  18. BIN
      banners/1610174020766-4.png
  19. BIN
      banners/1610175053568.png
  20. BIN
      banners/1610178074936-0.png
  21. BIN
      banners/1610178074936-3.png
  22. BIN
      banners/1610178074936-4.png
  23. BIN
      banners/1610178136375.png
  24. BIN
      banners/1610178320956-0.png
  25. BIN
      banners/1610178320956-1.png
  26. BIN
      banners/lain-bottom.png
  27. 3
      inc/instance-config.php

32
banners.php

@ -1,22 +1,16 @@
<html>
<head>
<title>Lainchan Banners</title>
</head>
<body>
<?php
function listBannersInDir($dir) {
if ($handle = opendir($dir)) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
echo "<a href=\"$dir/$entry\"><img src=\"$dir/$entry\" alt=\"$entry\" style=\"width:348px;height:128px\"></a> ";
}
}
closedir($handle);
}
function getBannerSrc(){
$files = scandir(__dir__.'/banners/');
$files = array_diff($files, array('.', '..'));
return $files[array_rand($files)];
}
listBannersInDir("banners_priority");
listBannersInDir("banners");
?>
</body>
</html>
$filename = getBannerSrc();
$filename = "banners/" . $filename;
$fp = fopen($filename, 'rb');
header("Content-Type: image/png");
header("Content-Length: " . filesize($filename));
fpassthru($fp);
?>

BIN
banners/1608992480627.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
banners/1608992511794.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
banners/1608992524118.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
banners/1608992551600.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
banners/1608992576348.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
banners/1608992589414.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
banners/1608992682734.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
banners/1608993276367.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
banners/1608996011049.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
banners/1609004437891.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
banners/1609004460965.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
banners/1609010983068.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

BIN
banners/1610174020766-0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
banners/1610174020766-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
banners/1610174020766-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
banners/1610174020766-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
banners/1610174020766-4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
banners/1610175053568.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
banners/1610178074936-0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
banners/1610178074936-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
banners/1610178074936-4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
banners/1610178136375.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
banners/1610178320956-0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
banners/1610178320956-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
banners/lain-bottom.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

3
inc/instance-config.php

@ -93,6 +93,9 @@ $config['threads_preview'] = 5;
$config['root'] = '/';
$config['secure_trip_salt'] = 'ODQ2NDM0ODlmMmRhNzk2M2EyNjJlOW';
//Banners
$config['url_banner'] = '/banners.php';
/*
* Some users are having trouble posting when this is on,
* with the message 'Your request looks automated; Post discarded.'

Loading…
Cancel
Save