插件名称:
WordPress缩略图插件 Thumbnails Anywhere
插件作者:
插件功能:
- 调用日志内容中的图片,显示日志缩略图,缩略图链接指向原日志或者原大图。
- 首页缩略图:首页每篇日志显示缩略图。
- 随机缩略图:调用随机日志的缩略图,全站任意位置显示。
- 最新缩略图:调用最新日志的缩略图,全站任意位置显示。
- 相关缩略图:调用相关日志的缩略图,用于日志页显示。
- 分类缩略图:调用当前分类下的日志缩略图,用于分类页显示;调用指定分类下的日志缩略图,全站任意位置显示。
- 任意指定缩略图数量、尺寸、距离。
- 指定显示日志的第一张图片,还是日志内任意图片。
- 支持侧边栏。
- 支持根据分类名和标签名排除日志缩略图。
- 对于站内图片,自动生成缩略图;对于外链图片,自动下载到本地,自动生成缩略图。
- 对Yupoo、Flickr、Picasa外链图片提供特别支持,可直接引用外链缩略图。
插件下载:
Version 2.1.11 下载地址:
http://niaolei.org.cn/wp-content/uploads/2009/08/thumbnails_anywhere.zip
插件安装:
- 如果你是Google Picasa相册用户,在安装之前请先看完这篇文章《Google Picasa图片本地化的方法》;
- 后台安装,激活;
- 设置:选项——缩略图;
- 放置代码或者在后台小工具启用侧边栏;
- 回到首页点开几篇日志;//这一步不能省略。
插件设置:
http://niaolei.org.cn/thumbnails_anywhere/configuration
插件使用:
1. 首页缩略图
代码:
<?php if ( function_exists('thumbnails_anywhere_for_homepage') ) {thumbnails_anywhere_for_homepage();} ?>
放置位置:于首页模板index.php,置于the_content或the_excerpt之前,例如:
<?php if ( function_exists('thumbnails_anywhere_for_homepage') ) {thumbnails_anywhere_for_homepage();} ?>
<div>
<?php the_content(__('Read the rest of this entry »')); ?>
</div>
<div class="clear-float"> </div> //如果样式撑出来了,请补上这句用于清除样式。
也可以放置在分类模板文件或标签模板文件(通常是archive.php),总之,一切包含the_content或the_excerpt的地方都可以放置,专业的说话是任何loop之内都可以放置。
2. 随机缩略图:
代码:(支持侧边栏)
<?php if(function_exists('thumbnails_anywhere_for_random_posts')) { thumbnails_anywhere_for_random_posts(); } ?>
放置位置:任意位置。
3. 最新缩略图:
代码:(支持侧边栏)
<?php if(function_exists('thumbnails_anywhere_for_recent_posts')) { thumbnails_anywhere_for_recent_posts(); } ?>
放置位置:任意位置。
4. 相关缩略图:
代码:
<?php if(function_exists('thumbnails_anywhere_for_related_posts')) { thumbnails_anywhere_for_related_posts();} ?>
放置位置:日志页模板(single.php)的任意位置。
5. 分类缩略图:
代码:
<?php if(function_exists('thumbnails_anywhere_for_category')) { thumbnails_anywhere_for_category(); } ?>
放置位置:分类页模板(通常是archive.php)的任意位置。
另外,插件提供了带参数的调用方式(不带参数时,采用后台设置):依次是数量num、宽度width、高度height。
随机缩略图:thumbnails_anywhere_for_random_posts('num=10&width=100&height=50')
最新缩略图:thumbnails_anywhere_for_recent_posts('num=20&width=200&height=60')
相关缩略图:thumbnails_anywhere_for_related_posts('num=30&width=150&height=70')
分类缩略图:thumbnails_anywhere_for_category(5) 显示分类ID为5的缩略图,位置任意放置。你甚至可以做一个简单的分类相册。
改动相应参数的数值即可,给你充分的自由。
插件历史:
http://niaolei.org.cn/thumbnails_anywhere/changelog
插件常见问题:
http://niaolei.org.cn/thumbnails_anywhere/faq
问得最多的问题:
可惜只支持yupoo、picasa、flickr,我的博客都是本地图片?——晕,管你哪儿的图片,统统支持。
安装后没效果?大图小图都出现了?找不到放代码的地方?巴拉巴拉等等,看《插件常见问题》。
插件演示:
本站首页、任意日志页都可以看到随机缩略图效果,怎么样,漂亮吧?
插件反馈:
欢迎反馈安装效果,尤其是安装在子目录的博客。
反馈前,请麻烦看看上面的常见问题,拜托!
我的邮件:9000birds@gmail.com
插件声明:
欢迎转载介绍本插件。










