A new Case study of 2020Media installation of a reliable WiFi hotspot in Blighty Coffee shop in Finsbury Park.
Read the case study at http://www.2020media.com/internet-connectivity/coffee-shops-wifi-case-study
A new Case study of 2020Media installation of a reliable WiFi hotspot in Blighty Coffee shop in Finsbury Park.
Read the case study at http://www.2020media.com/internet-connectivity/coffee-shops-wifi-case-study
Source: WordPress › My Eyes Are Up Here « WordPress Plugins
When WordPress automatically generates thumbnails, it sometimes doesn’t crop them in a way that is suitable for the image you’ve uploaded. If your image isn’t the correct format, and let’s face it, you never know what images people are uploading – you’ll run the risk of a badly cropped image. Not good. If you have a full portrait image of a person that you’ve uploaded, but you need the image to appear landscape, you’re in trouble! WordPress will centre the image so that you end up with person’s crotch. Not good. Or let’s say you have a landscape image, with a person’s face on the right hand side, but you need it to display in a square thumbnail. You’ll end up with half a face as WordPress centres the image.
You can control how you want your WordPress thumbnails to appear on your website. Regardless of the image format you upload, you can either use the automatic face detector or if you want even more control, you can manually add hotspots.
A new resource for customers – the Website File Explorer. Here’s how it came about.
The item lists the files and folders in a customers webspace, giving information such as file size, modification time, folder structure and size, all in a responsive, attractive layout.
Based on the script created by Hal Gatewood at http://halgatewood.com/free/file-directory-list/ we made a modification to show the folder sizes and give a total for the space used entirely.
The single-file script can be placed in a web directory and loaded in a browser. It uses scandir to locate all the contents recursively, then filesize to get the properties of each item.
The script also displays a nice icon for each type of file, and the last modified timestamp.
Folders are shown initially closed but a simple click expands them dynamically to reveal the contents.
The script is used as a report for our web hosting customers, to give them more information about their accounts.
Most hosting control panels show disk quota and usage, but we were asked by customers to break down the usage in detail, so that they could get an idea where the space was being used. From personal experience we know webspace gets used over time for all sorts of random things – obsolete projects, testing space, a handy spot to dump that file you need to transfer one time only….
We had been providing this information manually, using the linux ‘du‘ command. This has useful parameters such as –human-readable and –max-depth which made it ideal. However translating this function into a customer-facing tool in a safe and secure way meant a different approach – in our case using PHP.
We continue to use ‘du’ “under the hood” to provide a daily report to customers via our customer portal. Automatic warnings are generated in case a customers is getting close to their quota.
One interesting thing we found is the different ways that file and folder sizes are calculated. There is also some differences in parameters for du (apparent sizes, rather than disk usage) that had to be taken into account when comparing PHP’s method of calculating file space usage with Linux’s (and our FTP server software).
We display the results in human-friendly units based on one Kilobyte being 1024 bytes.
Download the script here: file-directory-size.php.txt
Remove the .txt extension and upload to your webserver.
Caution: This script will display the names (at least) of all files in your site. Therefore caution should be used before putting it in a public location. Our use of this script is tightly locked down so that it is safe and secure to use.
We would not recommend this script is used at all where register_globals is active (e.g. older php versions).
With thanks to the original creator, Hal Gatewood and user khanvani on fiverr.com
Source: Passing data from PHP to JavaScript · A Beautiful Site
Ever needed to send a PHP variable, array, or object to JavaScript? It can get complicated trying to escape the output properly. Here’s a way that always works—no escaping necessary.
Have you ever needed to send a PHP variable, array, or object to JavaScript? It can get complicated trying to escape the output properly. Here’s a way that always works—no escaping necessary.
Let’s say we have the following variable in PHP:
And we want to pass it to a JavaScript variable called name
. Here’s the trick:
Using json_encode()
, you’ll always get a properly formatted JavaScript object.
Which web design trends have come to define 2015? And more importantly, is WordPress keeping up? We scrutinized a whopping 200 websites as part of an exhaustive search, revealing some obvious insights and a few surprises along the way.
Source: The Web Design Trends Dominating 2015 and How WordPress Stacks Up – WPMU DEV