Add Rin to homepage counter

This commit is contained in:
James S 2023-10-23 23:10:45 -07:00
parent 7040b1b8e5
commit 6631e2cb6f
3 changed files with 6 additions and 4 deletions

View File

@ -231,7 +231,7 @@ class Image
return 0;
}
$diff_d = ($now->getTimestamp() - $last_date->getTimestamp()) / 86400;
return (int)ceil($diff_d) + 1;
return (int)ceil($diff_d);
}
/**

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -9,14 +9,16 @@ class Home extends Extension
array(23, 64),
array(14, 86),
array(31, 63),
array(37, 100)
array(37, 100),
array(24, 90)
);
private $femTags = array(
"Hatsune_Miku",
"Monika",
"Violet_Parr",
"Keith_Kogane"
"Keith_Kogane",
"Rin_Kagamine",
);
public function onPageRequest(PageRequestEvent $event)
@ -93,7 +95,7 @@ class Home extends Extension
for ($n=0; $n<$length; $n++) {
$cur = $strtotal[$n];
if ($counter_dir === 'femcounter') {
$charId = $n % 4;
$charId = $n % count($this->femTags);
$base64url = $this->addCountToBlankImage($charId, $cur);
$tag = $this->femTags[$charId];
$counter_text .= " <a href='$base_href/post/list/$tag/1'><img alt='$cur' title='$tag' src='data:image/gif;base64,$base64url' /></a> ";