A homemade WordPress upload plugin for Chevereto image hosting
Uploading images to Chevereto is easy and saves bandwidth and other server resources. But I couldn't find a plugin for uploading directly from WordPress to the …
Using PHP to detect visits from WeChat's built-in browser
<?php if(is\_weixin()){ echo "这是微信内部浏览器"; }else{ echo "这是微信外部浏览器"; } function is\_weixin(){ if ( strpos($\_SERVER\['HTTP\_USER\_AGENT'\], 'MicroMessenger') !== …
Adding AJAX to Selected WordPress Pages Yourself
This picks up where the earlier article left off: Adding Site-Wide AJAX to WordPress Yourself. Modify ajaxcheck_ignore(): function ajaxcheck_ignore(url) { for (…
My homemade WordPress upload plugin for Luguo Image Hosting — Klink
Uploading images to Luguo Image Hosting saves bandwidth and space on my server. I couldn't find a WordPress plugin that did it in one click, so I wrote one = =
Use .htaccess URL rewriting to bind a domain to a subdirectory and create a subsite
Apache hosting generally supports .htaccess URL rewriting, which lets you map a domain to a subdirectory and host multiple sites under one account. Example: map…
Adding site-wide Ajax to WordPress yourself
Browsing a site that uses AJAX throughout feels different: you can move between pages without seeing the browser refresh. If the site is fast enough, clicking a…
Disabling text selection and copying on a webpage with CSS
To prevent dragging to select text with the mouse and disable selecting or copying page content, simply add the following CSS to the body's style.
Changing the Page Title When a Browser Tab Loses Focus, as Ele.me Does
Here's how to change a page's title with JavaScript when its browser tab loses focus. The API itself is very simple and consists of three parts. document.hidden…
How to change PHP's upload file-size limit
For this example, we'll configure php.ini to allow uploads under 512M. Find and change the following settings: file_uploads = On ;enable file uploads upload_max…
You’re all caught up. Thanks for being curious.
