博客主题评论部分修改
本来在上次折腾之后,打算等上 3.0 之后再弄的。不过这段时期朋友们共享了一些不错的技巧,我也心动了。
这回拿主题评论模板开刀,优化了样式,解决了存在已久的嵌套问题,并添加了一些小功能。
评论功能是 Blogger 之间、以及访问者互动的重要手段,是必须重视的。
和往常一样,做个总结手记,也分析那些让大家受益的技巧。
评论样式优化
新的样式如图:
所做的主要修改:
- 添加了大量的 box-shadow 和 text-shadow 阴影效果,并去掉了一些边框。现在自我感觉良好。
这些属性不支持 IE 浏览器。 - 调整布局:一些位置调整,并把回复按钮和 UA 信息弄到了评论内容的下方,避免评论者名字过长造成的重叠。
- 给评论者 UA 信息的图片添加 opacity 属性,看起来淡一些,毕竟是点缀作用别太吸引注意嘛。鼠标放上去才恢复不透明。
当然,这个也不支持 IE 。
实现完美的 WordPress 无限嵌套回复
我比较喜欢嵌套方式的评论模板,这样回复评论更有对话的感觉。
之前的无限嵌套有一个问题:回复非主评论时,评论框错位了(跑到了主评论下面),回复并刷新后正常。
虽然基本不影响使用,不过追求完美是好事。
QiQiBoY 已经把方法折腾出来了,高手哇。效果:
解决方法见:完美解决WordPress嵌套回复的层深问题(无限嵌套)<一>
为 WordPress 主评论加上楼层号
有个楼层号看起来像模像样,只给主评论加上也不会显得杂乱,还支持评论分页。
来自 OM:只在WP主评论加上楼层号的方法(支持评论分页)
添加评论引用功能
使用评论嵌套方式的话引用就少了,不过在说明某些问题的时候还是需要的。
在评论模板加上引用按钮,免去了不少麻烦。
同样来自 QiQiBoY 的:添加引用按钮——轻松打造属于你的WordPress引用回复功能
文章的步骤写得很详细了,不过由于那段 JavaScript 和主题的回复功能有些冲突,拜托了 om 才改好的 :!:。
在评论框添加简单计数器
折腾一回肯定要把好东西都搜刮来。
这个评论文字计数器虽然没啥用,只是考虑到一小段 js 即可实现,无需改动主题其他部分,就用上了。可以增加点动感。
等看腻了就去掉吧。
方法见:评论框的简单计数器
P.S.
感谢上面提到的两位同学一位同学和一位老同学。
现在的评论风格看起来有点华丽了,和其他部分不怎么协调,留着下次折腾吧。
这个 zsofa-ova 越来越不朴素了,罪过吖。 😐
» 转载请以超链接形式注明来源:A.shun Blog » 《博客主题评论部分修改》
» 本文链接地址:http://shun.im/21375
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 346
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 348
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /www/wwwroot/ashun/shun.im/wp-content/themes/zova/functions.php on line 350