首页 » WordPress 插件 » Advanced Post Image Plugin

Advanced Post Image Plugin

October 16th, 2007 at 02:49pm 雪山飞猪 浏览: 7,160

English

This is the initial release. Advanced Post Images plugin can generate thumbnails of the first image of latest (number is set by user) posts and link back to the them.

Installation and Usage

  1. Upload the advanced-post-image.php to to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Place <?php get_post_image_list(); ?> in your templates
  4. create the folder thumb under the directory wp-content/uploads/, and set it to 777

If you want to control the number, the thumb image’s width and height, you can use the following four parameters in the function <?php get_post_image_list(); ?>

$image_number = 10 // the image number, default is 10
$thumb_width = 50 // the thumb image's width, default is 50px
$thumb_height = 50 // the thumb image's height, default is 50px
$type = "recent" // the list's type,  "recent" displays latest posts's image while "random" display random posts's image

You can use the ul.post-image-list CSS selector to stlye the images list.

Download: Advanced Post Image Plugin

Demo:
post-image-list

You can donate via payapl to support the plugin’s development, :-)


中文

这是该插件的初始版本,Advanced Post Image 插件会生成最新日志(数字由用户设定)的第一张图片的缩略图,然后产生一个链回原来日志的列表。
安装和使用

  1. 上传 advanced-post-image.php 到 /wp-content/plugins/ 目录下
  2. 在插件菜单下激活插件
  3. 在模板文件中适当的位置插入 <?php get_post_image_list(); ?> 模板函数
  4. 在 wp-content/uploads/ 目录下创建 thumb 文件夹并将其设置为 777

你可以使用函数 <?php get_post_image_list(); ?> 的以下四个参数:

$image_number = 10 // 设置显示图片个数,默认为10 张
$thumb_width = 50 // 设置所略图的宽度,默认为 50 像素,如果为 0,则会根据高度自动修改,但是宽度和高度至少填一个
$thumb_height = 50 // 设置所略图的高度,默认为 50 像素,如果为 0,则会根据宽度自动修改,但是宽度和高度至少填一个
$type = "recent" // 设置列表的类型,"recent" 显示最近日志的图片, "random" 则显示随机日志的图片

你可以根据 ul.post-image-list 这个 CSS selector 去样式化图片列表

下载:Advanced Post Image Plugin

演示:
post-image-list

作者:雪山飞猪
原文链接:Advanced Post Image Plugin
我爱水煮鱼版权所有,转载时必须以链接形式注明作者和原始出处及本声明。

标签:

17fav 收藏本文

PR: 3 / del.ici.ous: 7 / Technorati: 4

48 条评论 添加你的评论

  • 1. 雪山飞猪  |  October 16th, 2007 at 3:21 pm

    这个版本可能存在一些问题,也找不到人帮我测试,如果使用上有问题,欢迎向我 report !

    [回复该留言]

    你好,老师,请教一个问题 reply on March 17, 2008:

    我开启Advanced Post Image Plugin插件后,并在主页的sidebar ,下方调用了这个 函数,结果出错提示
    nable to open ‘E:\xampplite\htdocs\wordpress/wp-content/uploads/thumb/thumb_3.thumbnail.jpg’ for writing: No such file or directory in,我看了一下自己的文件目录,图片在../uploads/thumb/2008/03中,是目录路径问题吗,我该怎么做才能读出图片呢我用的版本是2.3的,谢谢

    [回复该留言]

    雪山飞猪 reply on March 17, 2008:

    在 wp-content/uploads/ 目录下创建 thumb 文件夹并将其设置为 777

    不好意思,我不是老是….
    :twisted:

    [回复该留言]

  • 2. 倮虫  |  October 20th, 2007 at 3:19 am

    不能再扩展一下,把BLOG里的图片按分类读出来?形成一个图片汇总。当然,汇总页里也要有图片所属的BLOG链接。

    [回复该留言]

  • 3. MO  |  October 20th, 2007 at 11:44 am

    如果文章里面没有图片,是不是就不能生成缩略图了呢?

    [回复该留言]

  • 4. 雪山飞猪  |  October 20th, 2007 at 10:56 pm

    @裸虫,不能!
    @MO,是的,他是获取日志的第一张图片!

    [回复该留言]

  • 5. 王凤泽  |  November 7th, 2007 at 1:42 pm

    你的Honey Piggy就是用的这个插件吧!我就是想实现你的Honey Piggy这种效果,但是我装上之后,只能单列显示图片,而且宽度不一。我希望能宽度我指定,长度自动,两列显示。请问应该如何修改?

    [回复该留言]

  • 6. 雪山飞猪  |  November 7th, 2007 at 4:27 pm

    @汪凤泽,这个是下个版本的功能!

    [回复该留言]

  • 7. badblue  |  November 18th, 2007 at 11:12 am

    如果图片要横向排列的话我要怎么做!现在装了插件图片是竖排的

    [回复该留言]

  • 8. badblue  |  November 18th, 2007 at 10:52 pm

    这外插件能够随机变支提取图片就好了!现在是固定的,有点死呀!

    [回复该留言]

  • 9. 玛雅  |  December 2nd, 2007 at 8:37 am

    不错的插件,不过我在2.31上装不成功,在sidebar插入(?php get_post_image_list(); ?)后不显示,这个代码之下的内容都不显示,你说是怎么回事飞猪先生?

    [回复该留言]

  • 10. lucius  |  December 5th, 2007 at 2:41 am

    hi hi
    thanks for the great easy to use plugin.
    but how to i get my images to align say in rows of 5
    in stead of 1 row?

    thanks!

    [回复该留言]

  • 11. MO  |  December 8th, 2007 at 10:37 am

    ^-^ 我修改了这个插件,使它可以选择生成最新或者随机N篇日志的缩略图。地址 http://www.lxooo.com/advanced-post-image-plugin.html

    [回复该留言]

  • 12. Andrea  |  December 16th, 2007 at 7:14 pm

    Your plugin is great, thank you. How do you make the images stay not in one long line, but in rows instead??? you did it in this page, one time in the sidebar and one time where it says”demo”. Pleeease explain how you did it. Thank you very much

    [回复该留言]

  • 13. 雪山飞猪  |  December 16th, 2007 at 7:54 pm

    @Andrea, the output of the plugin will be an unorder list, so you just need to use CSS to style the unorder list

    [回复该留言]

  • 14. Andrea  |  December 16th, 2007 at 9:03 pm

    Thank you for your fast answer. Do i have to change the general css file(style.css) or make a new one just for your plugin? what does your code look like for the honey piggy 3×2 exactely? thank you very very very much

    [回复该留言]

  • 15. 雪山飞猪  |  December 18th, 2007 at 12:22 am

    @Andrea you can add it to your style.css. becaue every CSS setting is different, I can’t simply copy my CSS code to you.

    [回复该留言]

  • 16. Andrea  |  December 18th, 2007 at 12:45 am

    i tried with display:inline and display:table-row , also tried with float, but none of them work….sigh…

    [回复该留言]

  • 17. 雪山飞猪  |  December 18th, 2007 at 1:26 am

    @Andrea if you like and trust me, I can modify it for you, you can send your admin account and password to my gmail
    honghua.deng#gmail.com (#=>@)

    [回复该留言]

  • 18. Andrea  |  December 18th, 2007 at 5:37 pm

    hey thanks a lot for your helpp, i really appreciated it. I’ll sure link to your website. thanks again

    [回复该留言]

  • 19. Joshua  |  February 25th, 2008 at 10:01 am

    Hello, this plugin is so good, thanks for making it.
    Is there a way to sort the images randomly from any of my blog entries instead of sorting the images from recent posts?

    [回复该留言]

    雪山飞猪 reply on February 27, 2008:

    I will add this function in the next version.

    [回复该留言]

  • 20. Miki  |  February 26th, 2008 at 5:46 am

    how can I enhace the quality of the pictures?

    [回复该留言]

  • 21. Miki  |  February 26th, 2008 at 6:07 am

    i mean the thumbnails sorry

    [回复该留言]

  • 22. Joshua  |  February 27th, 2008 at 5:35 am

    Hello?

    [回复该留言]

    雪山飞猪 reply on February 27, 2008:

    yes, you can, edit the plugin, and change the value of $thumb_height and $thumb_width.

    [回复该留言]

  • 23. bssn  |  February 28th, 2008 at 11:27 pm

    原来这是你的原创啊!

    [回复该留言]

  • 24. bssn  |  February 29th, 2008 at 2:10 am

    文章必须是本地的吗?

    [回复该留言]

  • 25. Maxx  |  February 29th, 2008 at 2:52 am

    I love the upgrade! Now I can order by random.
    Thanks so much for making this plugin so good.
    I noticed you have an extra semicolon on line 15.

    Again thanks so much for making this.

    [回复该留言]

    雪山飞猪 reply on February 29, 2008:

    haha, I always make mistakes :oops: , thanks for your help. I will correct it soon.

    [回复该留言]

  • 26. Gomus  |  March 1st, 2008 at 3:57 am

    New version, wohoo! Best plugin ever.

    [回复该留言]

  • 27. Joshua  |  March 16th, 2008 at 11:52 pm

    Thanks so much for this, it is awesome.

    [回复该留言]

  • 28. zzz  |  March 30th, 2008 at 11:38 pm

    I insist this one is much better than ur plugin.

    http://www.alakhnor.com/post-thumb/

    [回复该留言]

  • 29. Mar  |  April 20th, 2008 at 2:17 am

    I love this plugin but I’d like to show post title above or below thumbnails. Is it possible?

    [回复该留言]

    雪山飞猪 reply on April 21, 2008:

    yes, you should modify the source code.

    [回复该留言]

  • 30. Maxx  |  April 29th, 2008 at 11:52 am

    best plugin ever!
    thanks for developing this.

    [回复该留言]

  • 31. Matthias  |  May 7th, 2008 at 4:29 pm

    Thank you, nice plugin.

    But I got a short question: is it possible that i just get posts from a specific category and not just the latest posts?

    that would be perfect! :)
    greets

    [回复该留言]

    雪山飞猪 reply on May 7, 2008:

    I will try to implement this feature in next release

    [回复该留言]

  • 32. Matthias  |  May 7th, 2008 at 7:25 pm

    Thats nice, thank you very much :)

    [回复该留言]

  • 33. baron  |  May 8th, 2008 at 12:34 am

    hi there .thanks for plugin:

    Does anybody know if tis script is compatible with Wordpress 2.5.1 ?

    Thanks in advance for any help on this!

    best regards

    [回复该留言]

    雪山飞猪 reply on May 8, 2008:

    yes!

    [回复该留言]

  • 34. coldbo  |  May 9th, 2008 at 4:30 am

    为什么调用很慢,我就生成一个缩略图,每翻一次页,就得等半天,老慢老慢.是个好插件,请教怎么才能……….

    [回复该留言]

  • 35. florry  |  July 6th, 2008 at 9:37 pm

    Hello,

    In the thumbnail plugin the location of the image gets set to a folder. I pull in my images from flickr and other places how can I change the path to a URL.

    Thanks,

    F

    [回复该留言]

    雪山飞猪 reply on July 6, 2008:

    no idea what do you mean, sorry!

    [回复该留言]

  • 36. idea-cool  |  July 13th, 2008 at 3:21 pm

    怎么设置图片压缩质量,默认的质量比较低

    [回复该留言]

Trackbacks / Pingbacks

发表评论

必须

必填,打死不公开

:mrgreen: :neutral: :twisted: :arrow: :shock: :smile: :???: :cool: :evil: :grin: :idea: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad: :!: :?:

Wady — 一个准备转换所有 ASP 博客到 WP 的男人 T60 死机了


强烈推荐

PureCSS WordPress Theme 长期承接 WordPress 项目

订阅

本站推荐

分类

赞助商