11月21日
- 去Eastland逛街逛了一上午
- 收获一瓶Jurlique水一瓶
- 吃了两种鸡料理快餐,Red rooster和Nando’s。两相比较,Nando’s的Grilled chicken胜出。有点酸,有点甜,又香又脆,真够回味的。好像回家自己学着做~~~
Thumbnail Generation PHP Memory Limit in NextGEN Gallery
Original Link: http: http://www.visser.com.au/blog/thumbnail-generation-php-memory-limit-nextgen-gallery/
When uploading a set of admittedly large images using NextGEN Gallery to my WordPress site I exceeded my web hosts default memory usage allocation for PHP applications. The error was:
Follow thumbnails could not created. sample.jpg (Error : Exceed Memory limit. Require : 80.65 MByte)
This issue can be resolved by increasing the memory usage allocation at a per-plugin level for PHP applications that require more grunt than others. It’s quick and easy!
- Open an FTP connection to your root WordPress directory
- Open
/wp-content/plugins/nextgen-gallery/lib/thumbnail.inc.php(mine is gd.thumbnail.inc.php) with your favourite text editor (e.g. UltraEdit, etc.) - On line #168 un-comment (remove the
//) from before@ini_set('memory_limit', '128M'); - Save and upload changes
- Delete image/s that failed to generate a thumbnail and re-upload using NextGEN Gallery’s standard Upload Images feature
If you find 128MB is too ‘conservative’ this can be increased again to any figure of your liking, I find 128MB appropriate for most commercial and personal usage but if you’re a HD photographer then you’re going to hit this limit very quickly… that’s it!
11月12日
- 置业成功,晋身为房东兼房奴
- 新装了Quicken 2010,可以同时记录个人现金流,业务账目及房贷等。更多详细功能还有待开发。。。
- 登陆澳洲之后第一笔收入进账
NextGen Gallery IE Bug – missing middle line of images
I found a bug of NextGen Gallery in IE (not in Firefox, Opera and Safari).
When I added “letter-spacing:1px” for the div container of NextGen Gallery (either in ablum view or gallery view), the middle line of the view disappearred. After removing letter-spacing, the problem was solved.
Change Class Attribute in Firefox and IE
Firefox and IE act differently when change class attribute. I used below codes to do this:
<SCRIPT LANGUAGE=”JavaScript”>
function locateHome() {
curUrl=location.href;
homeUrl=”<?php bloginfo(‘url’)?>/”;
homeEnUrl=”<?php bloginfo(‘url’)?>/?lang=en”;
homeZhUrl=”<?php bloginfo(‘url’)?>/?lang=zh”;
if(navigator.userAgent.indexOf(“MSIE”)>0) {
if ((curUrl==homeUrl) || (curUrl==homeEnUrl) || (curUrl==homeZhUrl)){
homeClass=nav.getElementsByTagName(“li”)[0].getAttribute(‘className’);
homeClass=homeClass+” current_page_item”;
nav.getElementsByTagName(“li”)[0].setAttribute(‘className’,homeClass);
}
}else {
if ((curUrl==homeUrl) || (curUrl==homeEnUrl) || (curUrl==homeZhUrl)){
homeClass=document.getElementById(“nav”).getElementsByTagName(“li”)[0].getAttribute(“class”);
homeClass=homeClass+” current_page_item”; //alert(“2″+homeClass);
document.getElementById(“nav”).getElementsByTagName(“li”)[0].setAttribute(“class”,homeClass);
}
}
locateHome();
</SCRIPT>
Flash mp3 player plugin
Flash mp3 player plugin I have used:
- Javascript Sound Kit
Just souce code. No player interface. Bug: cannot auto repeat; always need to load sound first before perform other operations - Enhanced XSPF Player With Autoresume Support
Enable continuous background music between pages and pages but the music has intervals not smooth - getID3()
A PHP script that extracts useful information from MP3s & other multimedia file formats. I used it with Javascript Sound Kit together to create continuous background music for ida website.
用php获取当前URL
$url_this = “http://”.$_SERVER ['HTTP_HOST'].$_SERVER['PHP_SELF'];
echo $url_this;
