Fix words counter

This commit is contained in:
Skywt2003 2021-08-01 19:09:08 +08:00
parent 1ae6e4be03
commit ac0f8dacef
3 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ $this->need('header.php');
<article> <article>
<h1 class="font-weight-bold post-title">文章归档</h1> <h1 class="font-weight-bold post-title">文章归档</h1>
<p class="meta"> <p class="meta">
共有 <?php Typecho_Widget::widget('Widget_Stat')->to($stat);?><?php $stat->publishedPostsNum() ?> 篇文章,<?php $this->allOfCharacters();?> 文字 共有 <?php Typecho_Widget::widget('Widget_Stat')->to($stat);?><?php $stat->publishedPostsNum() ?> 篇文章,<?php echo allOfCharacters();?> 文字
</p> </p>
<?php <?php
$this->widget('Widget_Contents_Post_Recent', 'pageSize=10000')->to($archives); $this->widget('Widget_Contents_Post_Recent', 'pageSize=10000')->to($archives);

View File

@ -23,7 +23,7 @@
<a href="<?php $this->options->siteUrl();?>sitemap.xml">Sitemap</a> | <a href="<?php $this->options->siteUrl();?>sitemap.xml">Sitemap</a> |
<a href="<?php $this->options->siteUrl();?>links">Links</a> <a href="<?php $this->options->siteUrl();?>links">Links</a>
</p> </p>
<p>&copy; <?php echo date('Y');?> <?php $this->options->title(); ?> ♥ <?php Typecho_Widget::widget('Widget_Stat')->to($stat); ?><?php $stat->publishedPostsNum() ?> Posts <?php $this->allOfCharacters();?> Words crafted</p> <p>&copy; <?php echo date('Y');?> <?php $this->options->title(); ?> ♥ <?php Typecho_Widget::widget('Widget_Stat')->to($stat); ?><?php $stat->publishedPostsNum() ?> Posts <?php allOfCharacters();?> Words crafted</p>
<p>Powered by <a href="https://www.typecho.org">Typecho</a> | Theme <a href="https://skywt.cn/sky-theme">Sky</a> by <a href="https://skywt.cn/">SkyWT</a></p> <p>Powered by <a href="https://www.typecho.org">Typecho</a> | Theme <a href="https://skywt.cn/sky-theme">Sky</a> by <a href="https://skywt.cn/">SkyWT</a></p>
</div> </div>
</div> </div>

View File

@ -52,7 +52,7 @@ function allOfCharacters() {
$unit = 'K'; $unit = 'K';
} }
$out = sprintf('%.2lf %s',$chars, $unit); $out = sprintf('%.2lf%s',$chars, $unit);
echo $out; echo $out;
} }