Get an element’s position with Javascript

Last month I posted how to get an element’s position relative to the document with jQuery and in this post show how to do the same thing but with native Javascript without the use of a 3rd party library.

Setting 503 Service Temporarily Unavailable headers with Apache .htaccess

When temporarily taking down a website to perform maintenance, it’s a good idea to return a "503 Service Temporarily Unavailable" header so search engines know to come back later. This post shows how to set this header using an Apache .htaccess file, and also how to show a response page to users with PHP so they know to try again later.

How to log into SilverStripe if you’ve lost the login details

If you have lost the admin login details for a SilverStripe installation and sending an email to reset the password is not working, there is a default admin account that can be enabled. After logging in, reset the regular administrator’s details and then remove the temporary login as shown in this post.

SilverStripe cache directory

SilverStripe by default creates a directory for caching the site manifest etc by using the PHP function getSysTempDir(). It is possible to locate this directory elsewhere by simply creating a directory called silverstripe-cache in the website’s root directory, or at any other location by setting the TEMP_FOLDER constant.