diff --git a/README.md b/README.md index 6c810cd..fa5ef0f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -emlog 读者墙插件 -==================== - -貌似没什么好介绍的了,最初模仿的是wordpress的读者墙(其实就是模仿wordpress的),根据emlog的特殊性移植过来。有周读者墙,月读者墙,总读者墙,取决于你怎么调用。 - +emlog 读者墙插件 +==================== + +貌似没什么好介绍的了,最初模仿的是wordpress的读者墙(其实就是模仿wordpress的),根据emlog的特殊性移植过来。有周读者墙,月读者墙,总读者墙,取决于你怎么调用。 + [插件主页](http://xiaosong.org/share/emlog-readers-wall-plug-reloaded) \ No newline at end of file diff --git a/reader_wall.php b/reader_wall.php index bfb1153..bf6e483 100644 --- a/reader_wall.php +++ b/reader_wall.php @@ -1,109 +1,109 @@ -readCache('user'); - $content = ob_get_clean(); - if (Option::get('isgzipenable') == 'y' && function_exists('ob_gzhandler')){ - ob_start('ob_gzhandler'); - } else { - ob_start(); - } - $content = explode("
-1) { - $cur_time_span = strtotime('last Monday',strtotime('Sunday')); - $option = 0; - $imgnums = $imgnum_week; - $imgsize = $imgsize_week; - } - elseif(strpos($log_content, '[READERWALL-MONTH]') > -1){ - $cur_time_span = strtotime('this month',strtotime(date('m/01/y'))); - $option = 1; - $imgnums = $imgnum_month; - $imgsize = $imgsize_month; - } - else{$cur_time_span = 0;$option = 2;$imgnums = $imgnum_all;$imgsize = $imgsize_all;} - if(empty($imgsize)){$imgsize = 32;} - $DB = MySql::getInstance(); - $userName = $user_cache[1]['name']; - $userMail = $user_cache[1]['mail']; - $sql = "SELECT count(1) AS comment_nums,poster,mail,url FROM ".DB_PREFIX."comment where date > $cur_time_span and mail != '' and mail != '$userMail' and poster != '$userName' and hide = 'n' group by mail order by comment_nums DESC limit 0,$imgnums"; - $result = $DB->query($sql); - while($row = $DB->fetch_array($result)){ - $img = "".$tip."
"; - }else{ - $output = "".$tip."
"; - }else{ - $output_side = "".$tip."
"; + }else{ + $output = "".$tip."
"; + }else{ + $output_side = "