wordpress-display-a-message-or-other-text-in-a-page-or-post-only-to-logged-in-users.jpg

WordPress: Display a message or other text in a page or post only to logged in users

You can use this to post advice or reminders to logged in users when they need to perform different tasks. All you have to do is add the following anywhere in your theme you want to display the message. ​ Create a shortcode to detect logged in users To turn this into a shortcode so you can use it in your posts you can just use the below snippet add this into your functions.php page. To use...
Read More
fixing-photo-orientation-on-images-uploaded-via-php-from-ios-devices.jpeg

Fixing photo orientation on images uploaded via PHP from iOS devices

Below is a great function (created by Wes over on Stack Overflow) that can be used to automatically correct the image orientation when uploading images (the main culprit for weird orientation related glitches being iOS based devices) - simple call the correctImageOrientation() function after uploading the image and voilla the rotation/orientation of the image is corrected! The...
Read More
resolving-the-numeric-value-out-of-range-1690-bigint-unsigned-error-in-magento.jpg

Resolving the “Numeric value out of range: 1690 BIGINT UNSIGNED” error in Magento

Recently when making some changes on a Magento based store we encountered a mySQL error in the Magento administration pages when trying to delete products which prevented any further products from being deleted.  The error message SQLSTATE : Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in ‘(`YOURDB`.`q`.`items_count` – 1)’ Resolving the error Log...
Read More

Customising the “Submitted by” text in Drupal 7

Customising the default "Submitted by..." text used in Drupal 7 is pretty simple, and just required a single edit to your theme's template file. Go to your ./themes/yourtheme folder and open the template.php file in your text editor. Add the function below at the end of the template.php file (remember to replace "yourthemename" with the actual name of your theme).
Read More