Log


Building a website is much more complicated than I have thought. There are many trivial things to handle and it’s often the case that you can’t find specific solutions on the Internet. Go on, try to figure it out on your own.

This article records the problems I faced and the solutions I came up with in building this website. Hope my experience may help some other poor guys who faced the similar problem as I have.

1. The comment manage system I am using, Disqus, doesn’t support guest comment, which means users have to login via Disqus, Facebook, Twitter, Google before commenting on my posts.

Possible solution: 1. add Sina weibo, Renren and Tencent QQ to the available login platform list.

2. Try another comment manage system.

2. The drop down menu is blocked by the title of slide photos.

Possible solution: 1. Modify the CSS file manually.

3. The read more tag in HTML can not be shown correctly.

There is a solution here, but it does’t work on my site.

4. How to control the HTML layout?

Yes, I have to use CSS. For example, the alignright image in Biography page has no left margin with the text. I modified the style.css file. Add a margin-left: 1.5em to the .alignright block. And all goes smoothly now.

Kindly reminder, Chrome doesn’t reload css style files unless you reopen the browser. Open another browser such as IE to see the effects after modifying.

5. How to remove “Briefly unavailable for scheduled maintenance. Check back in a minute.” message from my website?

Delete .maintainance file in the wordpress root folder. It is the folder which contains wp-admin.

6. How to set the color of link title to blue automatically?

7. Loading speed is hindered by the large photos in many pages of this website.

Crop and compress the photos. But users in America can open the page smoothly.

8. How to let WordPress send emails?

http://stackoverflow.com/questions/11418661/cant-send-emails-with-php

9. “Undefined offset” message shows on the top of my website?

There is a bug in a plugin I used – “open-social”.

$languages = $_SERVER[“HTTP_ACCEPT_LANGUAGE”] returns “en, zn-CH; …”

$languages = explode(“,”,$languages);

$languages = explode(“-“,$languages[0]);

$_SESSION[‘WPLANG_LOCALE’] = strtolower($languages[0]) . ‘_’ . strtoupper($languages[1]);

However, $languages[1] may be empty.

I set $languages[1] to ‘us’ manually, then all went seamlessly. There do exist some subtle bugs. But it may not mess up your website so far.

10. Open a VPN proxy server (shadowsocks) and How to run scripts in background

http://wuchong.me/blog/2014/10/17/digitalocean-vps-experience/

11. How to Install PHP mcrypt module

http://php.net/manual/en/mcrypt.installation.php