Month: June 2012
Media, Audio, Video Player for wordpress
function yyy_html5_audio($url) { if (preg_match(‘/Firefox/’, $_SERVER[“HTTP_USER_AGENT”])) { // For religious reasons Firefox does not support MP3 format in HTML5 audio tag, use Flash player instead $embed = ”; } else if (preg_match(‘/Opera/’, $_SERVER[“HTTP_USER_AGENT”])) { // Opera also does not support MP3 format in HTML5 audio tag, use Flash player instead $embed = ”; } else…
LINUX CP 命令详解
cp (复制档案或目录) [root@linux ~]# cp [-adfilprsu] 来源档(source) 目的檔(destination) [root@linux ~]# cp [options] source1 source2 source3 …. directory 参数: -a :相当于 -pdr 的意思; -d :若来源文件为连结文件的属性(link file),则复制连结文件属性而非档案本身; -f :为强制 (force) 的意思,若有重复或其它疑问时,不会询问使用者,而强制复制; -i :若目的檔(destination)已经存在时,在覆盖时会先询问是否真的动作! -l :进行硬式连结 (hard link) 的连结档建立,而非复制档案本身; -p :连同档案的属性一起复制过去,而非使用预设属性; -r :递归持续复制,用于目录的复制行为; -s :复制成为符号连结文件 (symbolic link),亦即『快捷方式』档案; -u :若 destination 比 source 旧才更新 destination ! 最后需要注意的,如果来源档有两个以上,则最后一个目的文件一定要是『目录』才行! 范例: 范例一:将家目录下的…
修复 next_posts_link & previous_posts_link 与 qTranslate 的兼容问题
If your having problems with qTranslate and the next_posts_link / previous_posts_link & next_post_link / previous_post_link template tags then I recommend dropping the following two functions into your theme’s functions.php file. /*************************************************************** * Function qtranslate_next_previous_fix * Ensure that the URL for next_posts_link & previous_posts_link work with qTranslate ***************************************************************/ add_filter(‘get_pagenum_link’, ‘qtranslate_next_previous_fix’); function qtranslate_next_previous_fix($url) { return qtrans_convertURL($url); }…