修改emotions插件

这个评论的表情插件emotions很不错,但是我不喜欢它使用ul进行布局,在FF和IE下都有问题,占的地方太大,在FF下和评论功能说明有重叠效果,而在IE下则是分得太开了,修改了下,直接贴一下代码算了:
    function bar() {
        echo ‘<div id="emotion" align="left"><table>’;
        $count=0;
        if ($handle = opendir(’wp-content/plugins/emotions/images/’)) {
            while (false !== ($file = readdir($handle))) {
                if ($file != "." && $file != "..") {
                    if ($count == 0) {
                        echo "<tr>";
                    }
                    echo "<td><img src=\"" . get_settings(’siteurl’) . "/wp-content/plugins/emotions/images/$file\" alt=\":" .
                        substr($file, 0, 4) .
                        ":\" /></td>\n";
                    $count = $count+1;
                    if ($count == 9) {
                        echo "</tr>";
                        $count=0;
                    }
                }
            }
            closedir($handle);
        }
        echo ‘</table></div>’;
    }

换成使用table了,呵呵,这样更紧凑一些。

2006年11月12日更新:
修改后的版本的完整下载


作者: Cherami
原载: 修改emotions插件
版权所有。转载时必须以链接形式注明作者和原始出处及本声明。

日志评价

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (暂无评价) --点击星星直接投票
Loading ... Loading ...


相关日志



随机日志



添加到网摘

[del.icio.us]  [新浪 VIVI]  [365key]  [YouNote]  [博采中心]  [Poco]  [SOHU狐摘]  [天极网摘]  [和讯网摘]
喜欢这个插件?

当前日志信息