Kategori: Webmaster Haberler | Yorum Yok »
Tarih Nisan 19th, 2008 Yazar admin
Bu plugin sayesinde yazılarımızın içindeki resimleri otomatik olarak boyutlandırabiliriz.Ör: yazı içinde büyük bir resim var siz boyutları ile uğraşaşmak yerine plugini kurun o otomatik boyutlandırsın.
WP-Imagefit
Orijinal jQuery Imagefit plugin, daha zeytine aitiyle Boermans'ı yazdı.
style.css dosyanıza en alta ekleyiniz:
.storycontent img {
max-width: 460px;
width: expression(this.width> 460 ? 460: true);
}
max-width: 460px;
width: expression(this.width> 460 ? 460: true);
}
Temanıza göre ayar vericez:
wp-imagefit.php dosyasını açın
function wp_imagefit_js() {
$wp_imagefit_script = "
<!-- begin imagefit script -->
<script type=\"text/javascript\">\n
jQuery(window).load(function(){\n
jQuery('div.post').imagefit();\n
});\n
</script>\n
<!-- end imagefit script -->\n";
echo($wp_imagefit_script);
}
$wp_imagefit_script = "
<!-- begin imagefit script -->
<script type=\"text/javascript\">\n
jQuery(window).load(function(){\n
jQuery('div.post').imagefit();\n
});\n
</script>\n
<!-- end imagefit script -->\n";
echo($wp_imagefit_script);
}
JQuery deki seçicilikten hatırlayacağımız gibi 'div.post' alanı, class ı post olan divleri seçer.Kendi temanıza göre değiştirmelisiniz.
