Web Development

You are here

Installing Xdebug on Ubuntu

Need to install xdebug on Ubuntu so you can test that really cool PHP web app that will wow users for a decade? The first thing you need to achieve that goal is have Ubuntu installed and the lamp stack ready to go. Next open the terminal and install xdebug by using the following command.

~$ sudo apt-get install php5-xdebug

Next open the php ini file on Ubuntu so that we can ensure that xdebug is being seen by the PHP engine, again from the terminal ensure you have vim installed or you can use gedit and open php.ini file

Drupal module URL shortening service

I wanted to shorten a url for social media reasons but all the providers of url shorteners have one issue, they don't allow you to keep your brand. But that does not affect the Drupal community there is a module called shurly it allows the user with the right permissions to create a shortened URL

 

How to use Drupal module Shurly

To use this module after it has been enabled is really easy, just log into your Drupal installation and then navigate to http://<your url>/shurly

Install and test PHP_CodeSniffer on Ubuntu

The PHP code sniffer is used to test the php code inside a php file to see if it meets the PRS-0 coding standard by default. It will test the following code types PHP, JavaScript and CSS. You can test any file from the command line.  Here is an example on installing and testing a file in Ubuntu.

Install PHP sniffer

Install the the PHP sniffer library using PRS-0 installation tool from the command line. Make sure that you have the root privileges (sudo) to install the new package

Drupal 7 preprocess tutorial adding variable to template

Understanding how to use preprocessor in Drupal can be very confusing. In this post we will explore how to achieve adding a variable to a node template file using the preprocessor hook (function). The first thing we need to create is the preprocessor function that has mandatory elements so that Drupal can see the hook (function) when called.

 

Small smtp email server client on desktop

I need a small smtp client so I could send emails from my Drupal development machine. By using the package msmtp-mta this can be achieved. Firstly install the software, in this example Ubuntu will be used but from what I can see all Unix flavours have this package

~$  sudo apt-get install msmtp-mta

After it is installed then configuration is needed this can be by creating a file called msmtprc and adding some configuration.

After installing it we need to create a configuration file for it. Create a new file by opening vim or nano in the terminal

Drupal development environment

As a Drupal click monkey I came away from Drupalcon Sydney determined that I was going to contribute back to Drupal in some way. The big push in the community is to help with core development and the issue cues if you are able. But to a new Drupaler it is like looking at a mountain you need to climb and the only tool you have is a toothpick.

JavaScript and JQuery, What is the difference?

Have you ever walked down a hallway in the dark and found yourself lost? JavaScript and JQuery create the same sense of loss and confusion. When discussing JavaScript and JQuery people will say the funniest things about the two, one quote I heard a long time ago on the subject:

 JavaScript I hate, what we should do is get rid of it. But JQuery I love!

Pages