Category: Development

Displaying a menu title in Joomla

Use the following code to display a menu title in Joomla.

Read More
Joomla web design

Get the menu ID

Use the following code to get the MenuID in Joomla

Read More
Joomla web design

Get an Article ID

Use the following code to get the ID of an article:

Read More
Joomla web design

Display the main Joomla content

Using the following code to display the main Joomla article content.

Read More

Use the following code in Javascript to scroll #Anchol links to #Anchor points

//scrolling jQuery(‘a[href*=#]:not([href=#])’).click(function() { if (location.pathname.replace(/^\//,”) === this.pathname.replace(/^\//,”) || location.hostname === this.hostname) { var target = jQuery(this.hash); target = target.length ? target : jQuery(‘[name=’ + this.hash.slice(1) +’]’); if (target.length) { jQuery(‘html,body’).animate({ scrollTop: target.offset().top }, 1000); return false; } } });

Read More

Remove blue focus lines around links or selections

Add the following code to you CSS to remove the blue outlined when focusing on an object.

Read More

Adding SSH Keys in GIT to pair up BitBucket Repositorys

It was getting a bit frustrating doing GIT Pulls and entering the BitBucket password every single time. So using an SSH key became a lot more convenient. Use the following steps to establish a connection with a repo using an SSH key:

Read More

DigitalOcean WordPress Droplet – Unable to upload to uploads folder issue

perform the following commands in SSH on your droplet. sudo chown -R www-data:www-data /var/www/wp-content/uploads and sudo chmod -R 774 /var/www And then give access to the relivant linux user sudo usermod -aG www-data $USER

Read More

Unable to upload files, NGINX / Ubuntu / WordPress

I could not upload images on a new droplet created in Digital Ocean. Specifications of the droplet: Ubuntu server running NGINX. I ran the following script to change permissions of the uploads folder: sudo chown -R www-data:www-data wp-content/uploads/

Read More

Script to create basic calling link to website

Simple script to create a call back link, that will mainly be useful on mobile devices.

Read More
Joomla web design

Check login status of user in joomla

Use the following script to check if the user is logged into or logged out of Joomla <?php if(JFactory::getUser()->guest) { //do user logged out stuff echo ‘Login’; } else { //do user logged in stuff echo ‘Logout’; } ?>

Read More

Create a New directory

User the following code in terminal to create new directories

Read More