Some tips on wordpress & archlinux

Just backup for next upgrade or reinstalling. All TIPs are from the great search engine “google” and sharing by people glad to share their experience.

WordPress:
Change the “email” form optional in the comment template.
Source codes are as these:

if ( get_option(‘require_name_email’) && !$user->ID ) {
if ( 6 > strlen($comment_author_email) || ” == $comment_author )
wp_die( __(‘Error: please fill the required fields (name, email).’) );
elseif ( !is_email($comment_author_email))
wp_die( __(‘Error: please enter a valid email address.’) );
}

Just change these to the follows:

if ( get_option(‘require_name_email’) && !$user->ID ) {
if ( ” == $comment_author )
wp_die( __(‘请填写昵称后再发表评论 :-) ’) );
if ( “” != $comment_author_email) {
if ( !is_email($comment_author_email))
wp_die( __(‘邮箱格式不正确,不小心填错了? 请返回更正它吧 :-) ’) );
}
}


Archlinux:

Vim config for Chinese character:

set fileencodings=utf-8,gb2312,gbk,gb18030
set termencoding=utf-8
set fileformats=unix
set encoding=prc

This is just used for editing the fcitx config file, because i don’t know how to use the simplest editor “nano” to edit the gb/gbk encoded files.

UTC time:
Choose the right timezone in /etc/rc.conf, like Asia/Shanghai.
#hwclock //man hwclock to show how it works.
Use ntpdate to correct the time from time server, but it depends the internet.
#pacman -S ntp (?)

» 转载请注明出处:圍牆 » Some tips on wordpress & archlinux
» 本文链接:http://lujok.com/?p=341
» 订阅本站:Via FeedSky

发表评论