*** ImageForHomepage ***

Plugin Name: Image For Homepage
Wordpressҳͼʾ
Plugin URI: http://www.wangzhongyuan.com/tag/image-for-homepage
Description: This WordPress Plugin can help you show image on your homepage automatically. ԰ҳԶʾÿƪеĵһͼƬͼ
Version: 1.3
Author: Zhongyuan Wang ()
Author URI: http://www.wangzhongyuan.com/

ͨWordpressҳֻʾժҪԶ˵HTMLǩӶʹҳڵʹImage For Homepage(IFH)ܹҳԶʾÿƪµĵһͼƬͼƬվǱ˵վӶḻҳϵݡ޸ݿֶΣõݱ޸ĵĿȫǡͬʱܹԶͼļӶСҳСҳٶȡ



** IFHɫ&汾ʷ **
2008-12-21 1.3
1ʹôļиΪܣܹԶΪװվĳһĿ¼µWordpressҲԶɻļ
2ͼ
3ָѹʱ²ü̫bug
4òõbug
5Ӷʵõĺò磺
image_for_homepage(true, 1, 0, 200, 'center', 'IFHL', '<div>', '</div>');
centerʾҳͼƬʾ
IFHLʾͼƬԶϸµӣΪIFHL_blankͼƬ´д¡

2008-12-14 1.0
1޸ݿļֻһд뼴ҳԶʾͼ
2еͼƬǱվģվģܹʾ
3ΪҳͼĺôǼСҳҳʾαͼȣܹҳٶ
4ܹԼͼĴСҲͼƬ
5Ĭṩͼ󡱣ͼҡʾʽ



** IFHװ **
1رZipļѹ
2ļimage-for-homepageϴĿ¼Уͨwp-content/plugins/
3
4ģҳindex.phpУҵthe_exerpt()֮ǰif (function_exists("image_for_homepage")){image_for_homepage(true, 1, 200, 0, 'right', '', '<div>', '</div>'); } 



** ߽˵ **
1Ϊҳɵͼwp-content/uploads/ZhongziImageCacheУwp-content/upload/Ŀ¼дȨޣ޷ʹáʱҪֶwp-content/uploads´ZhongziImageCacheĿ¼ΪдȨޡ

2ģindex.phpûзthe_exerpt()ĺã෴the_content()ĺã˵ҳģУʾȫģthe_content()滻the_exerpt()the_exerpt()ǰif (function_exists("image_for_homepage")){image_for_homepage(true, 1, 200, 0, 'right', '', '<div>', '</div>'); }

3ӵĺ£

﷨Ϊ:

image_for_homepage($resize=false, $resize_type=1, $width='', $height='', $class='', $id='', $prefix='', $suffix='')

:
1 resize: ǷҪΪʵͼ仺wp-content/uploads/ZhongziImageCacheļСtrueʾҪfalseʾҪ
2 resize_type: Сͣ0ΪֱͼͼǷʧ棻1ΪСʱԭͼԡֵͨΪ1
3 width: ͼĿȡ
4 height: ͼĸ߶ȡ
5 class: ָɵ<img>ǩclassԵֵ
6 id: ָɵ<img>ǩidԵֵ
7 prefix: ָɵ<img>ǩǰ׺
8 suffix: ָɵ<img>ǩĺ׺

÷
image_for_homepage(true, 1, 200, 0, 'right', '', '<div>', '</div>'); 
ʾԶΪÿƪµĵһͼͼʾҳϣͼĿΪ200߶ָ0ζűԭͼƬıͼrightʾͼҳоʾԲ鿴ЧͼZipѹеscreen.png<div>Լ</div>Ϊimgǩǰ׺

Է޸еĲΪҳͼƬʾСԼλã磺
(1)ҳʾÿƪ־ӦͼΪ200ֱС
image_for_homepage(true, 1, 0, 200, 'right', '', '<div>', '</div>'); 

(2)ҳʾÿƪժҪӦͼΪ200ҲΪ200ǿС
image_for_homepage(true, 1, 200, 200, 'right', '', '<div>', '</div>'); 

(3)ҳΪÿƪʾͼƬԶ
image_for_homepage(true, 1, 200, 0, 'left', '', '<div>', '</div>'); 

ϣܸϲ

 

