Due to the scarcity of plugins for Typecho, I couldn't find one that displays commenters' countries and browsers, so I had to implement it myself. The code is modified from the WordPress plugin Show UserAgent. Download page: https://wordpress.org/plugins/show-useragent/ Prerequisite: Your theme uses custom comment code instead of Typecho's default comment display. Generally, themes meeting this requirement will have code like the following in comments.php or functions.php: <?php function threadedComments ( $comments , $options ) { //blablabla ?> After downloading the Show UserAgent plugin, extract it. Rename the "flags" folder to "country", the "browsers" folder to "browser", and the "ip2c" folder to "lib". Upload these to your theme folder on the server. (Renaming is optional,...
OpenSSL "Heartbleed" Vulnerability Causes Huge Impact
On April 8, 2014, Microsoft officially discontinued support services for Windows XP. On April 8, 2014, the renowned open-source SSL support software OpenSSL exposed the "Heartbleed" vulnerability. Against this vulnerability, nearly all current IDS systems and firewalls are defenseless. SSL, fully known as Secure Socket Layer, is a widely used encryption protocol on the internet that prevents data from being eavesdropped during transmission between users and servers. OpenSSL is an open-source SSL support software. By invoking it, any software can easily implement SSL encrypted connections without needing to research SSL from scratch. The HTTPS protocol utilizes SSL to protect user data, and major websites redirect users to HTTPS pages during login to safeguard user information. However,...

【In My Lifetime】Typecho 0.9 Alpha Finally Released
Yesterday afternoon, I got home and opened Feedly, and saw an article about Typecho 0.9 on Jiang's Blog . What? Typecho actually updated in my lifetime!? I immediately opened the Typecho Official Website and saw that clean default theme of TE. I remember the official site didn't look like this before. The post started with just one sentence: "Yes, you haven't entered the wrong website. This simple place is indeed the official website of Typecho."... So I immediately downloaded, updated, and installed. The update method is simple: log in to FTP, delete the admin and var directories and index.php , upload these files from version 0.9, and then update the database in the backend. When I opened the login page, I instantly felt it was high-end, grand, and classy. It's said that TE 0....
Adding HTML5 and CSS3 Support for IE
Since I started this blog, I never considered the experience of IE users. At that time, my browser was Firefox, and the only use I had for IE was to download Firefox. Now I use Chrome on Windows, Chrome on Mac, and Opera on my phone. I thought I could bid farewell to IE compatibility forever. But I didn't expect to be defeated by the electronic reading room at Hangzhou No. 2 High School. Firefox installer: 20MB. Chrome installer: 30MB. They don't seem large, right? But the electronic reading room apparently uses QoS for smoother web browsing. QoS is fine, but it has bugs—the average speed per machine there is 50Kbps. With only half an hour of internet access per visit, spending over ten minutes downloading a browser is truly frustrating! Additionally,...

Host1Free Strikes Again to Prevent VPS Idling: Monthly Renewal Required
Eight months ago, Host1Free cleaned up a large number of idle users by shutting down their VPSes . Now, H1F has introduced another tough measure: requiring users to enter a verification code monthly to renew their service, or risk VPS deletion. Two weeks after each renewal, you'll receive an email for the next month's renewal. You must complete the renewal within two weeks of receiving the email, otherwise your VPS will be suspended. If you fail to renew within an additional week, your data will be permanently deleted. Additionally, this notification email was once again found in the spam folder......
Hitokoto: One-Sentence Quotations
Hitokoto is a one-sentence quotation website. The so-called "one-sentence quotation" is a way to record what you said, did, or thought in a single sentence and share it with others. Hitokoto provides a platform for everyone to share these quotations. But obviously, the purpose of this article isn't about that. I'll focus on its API – how to display these quotations on your own website. PHP Server-Side Fetch Note: I don't recommend this method as it slows down page loading, especially if your server isn't in North America or Canada (Hitokoto's main server is in Canada). If your website happens to suffer a CC attack... when your upload/download bandwidth is saturated, you'll have no choice but to accept the consequences. <?php $hitokoto = json_decode ( file_get_contents ( 'https://api....

ImageOptim: Compressing Images for Web Use
First off, I did a quick search online. It seems that all MacBook series, whether Pro or Air, regardless of the OS version, have CPU overheating issues, especially when watching Flash. According to online reviews, the highest recorded temperature for a MacBook is 101 degrees Celsius. Next time I need to boil water, I'll just use it. As for frying an egg, the temperature might not be sufficient yet, but there's still room for improvement. Laptops are also called "lap-top computers." Next time, see who dares to put an Apple laptop on their lap when it's running at full load. Oh, and don't forget to delete smcFanControl—don't think I don't know you've cranked the fan speed to the maximum. ---------- End of Rant, Main Content Begins ---------- A website cannot lack images,...
Building Your Own CDN with Sina App Engine and Baidu App Engine
Warning: Due to my oversight, there was a mistake in a line of the SAE CDN index.php code. Please refer to the comment in the code below to correct it, otherwise it will cause issues with fetching remote images. Most people host their blogs abroad for reasons I won't elaborate on. However, SAE and BAE servers are located in China and offer fast speeds (though SAE, being in the China Telecom Access Network, experiences occasional instability). Therefore, we can use them to accelerate our blogs. Building CDN with SAE This method uses SaeLayerCDN, available in SAE's App Store for one-click installation. After installation, just modify a few simple settings....
JS Check-in for Social Comment Systems
Inspired by WP Blog One-click Check-in JS , I modified the JS code to implement one-click check-in functionality for Youyan and Duoshuo comment systems. Youyan Version: javascript : try { document . getElementById ( 'uyan_l_uname' ). value = 'Your Nickname' } catch ( err ) {} var myDate = new Date () var mytime = myDate . toLocaleTimeString () document . getElementById ( 'uyan_comment' ). value = 'Checked in today! Time: ' + mytime UYAN . addCmt ( document . getElementById ( 'uyan_cmt_btn' )) void 0 Usage: Open a page with Youyan and click once. Can be used without login, or after logging in via Weibo first. Duoshuo Version: javascript : var myDate = new Date () var mytime = myDate . toLocaleTimeString () document . getElementsByName ( 'message' ). item ( 0 )....

Image Zoom Effect on Mouse Hover
Image zoom effect on hover - Original by Maomihz , Modified by Lan Tian Last night Maomihz asked me to modify a jQuery script to achieve an automatic HD image display effect when hovering over thumbnails. There were two initial bugs: the enlarged image would flicker when hovering over the frame, and the image would exceed the top edge of the screen. My solution was to place the enlarged image under the thumbnail and set a semi-transparent effect for the thumbnail. The top-edge overflow issue was easily resolved by implementing a max() function. Here's the jQuery code: $ ( function () { var x = 22 var y = 540 var a = 0 $ ( 'a.smallimage' ). hover ( function ( e ) { if ( a == 0 ) { $ ( 'body' ). append ( '<div id="bigimage"><img src="' + this . rel + '" alt="" /></div>' )...