Add Rin to homepage counter
This commit is contained in:
		
							parent
							
								
									7040b1b8e5
								
							
						
					
					
						commit
						6631e2cb6f
					
				@ -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);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								ext/home/counters/femcounter/4.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								ext/home/counters/femcounter/4.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 12 KiB  | 
@ -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>  ";
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user