Plugin Directory

Changeset 767751


Ignore:
Timestamp:
09/06/2013 08:02:43 AM (13 years ago)
Author:
leniy
Message:

fix widgets

Location:
leniy-tweaks/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • leniy-tweaks/trunk/leniy.php

    r765589 r767751  
    44    Plugin URI: http://blog.leniy.org/leniy-tweaks.html
    55    Description: 为中国大陆用户设计的wordpress小工具,适合中文用户习惯
    6     Version: 0.3.5
     6    Version: 0.3.6
    77    Author: leniy
    88    Author URI: http://blog.leniy.org/
  • leniy-tweaks/trunk/widgets/leniy-blogstat-widget.php

    r765588 r767751  
    4040        $output .= '<li>标签数量:' . $count_tags            . ' 个</li>';
    4141        $output .= '<li>建站日期:' . $begin                             ;
    42         $output .= '<li>运行天数:' . $rundays               . ' 天</li>';
     42        $output .= '<li>运行天数:';
     43            $rundays_year =  floor( $rundays/365 );
     44            $rundays_month = floor( ($rundays - $rundays_year * 365)/30 );
     45            $rundays_day =   $rundays - $rundays_year * 365 - $rundays_month * 30;
     46            if($rundays_year  > 0) $output .= $rundays_year  . ' 年 ';
     47            if($rundays_month > 0) $output .= $rundays_month . ' 个月 ';
     48            if($rundays_day   > 0) $output .= $rundays_day   . ' 天 ';
     49            $output .= '</li>';
    4350        $output .= '<li>最后更新:' . $last                              ;
    4451        $output .= '<li>访客数量:' . $count_views         . ' 人次</li>';
Note: See TracChangeset for help on using the changeset viewer.