I know. Trying to find great free stock photos isn’t easy. Complex license schemes makes it even harder. I’ve been using mostly unsplash.com for truly free images but here’s a list of 14 other free stock photo websites that provide some really amazing images. Travel Coffee Book photos.joshnh.com FancyCrave Negative Space Superfamous SplitShire Gratisography StockSnap […]
WPUGL brings together London’s community of WordPress users to share knowledge, tips, ideas and inspiration, helping each other get the most out of WordPress.
The organisers run free evening events in central London with an informal atmosphere, encouraging everyone to share their knowledge and learn from others.
Each event focuses on a specific aspect of WordPress. Meetups can include hands on ‘peer to peer’ workshops, advice from WordPress professionals and the chance to network with other WordPress users.
This meetup group is specifically for people who use WordPress in their business, jobs or personal projects and want a supportive local community to help them achieve their goals. WPUGL is not a developer meetup but typically there are developers and industry professionals at events and who support the user community.
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.
What does the plugin do?
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.
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.
Responsive, Dynamic, Modern
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.
Putting the Customer in Control
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.
How big is that Folder in the Window?
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.
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