Development

The upgrade path from Drupal 9 to Drupal 10 depends on the modules and themes you have installed and on the custom ones your team have developed.

Following the official guide of this upgrade will hopefully take you through the process and resolve all the issues you might encounter.

In our case we had a custom built theme started on...


When programming and working with your preferred version control system, Git of course, you might find yourself committing a change with a misspelled or wrong message.

Luckily for us developers, there is a simple Git command to change the most recent local commit which is usually the one you want to modify. Just run the below...


During web development and testing you might need to setup redirections from one domain name or URL to another. Google Chrome will cache those redirects for a long time and if you need to change them you'll need to clear the HTTP 301 redirections first and then setup new ones if still needed.

Below we present three methods you can...


Introduction

During the development and testing phases of a website's frontend, finding and fixing horizontal overflow issues can be challenging.

In some cases, it might be easy via DevTools to find and select the element that is wider than the document is and then fixing its CSS accordingly.

Most times though such elements are...


Introduction

As a web developer, you often set your JavaScript files to open with a text editor instead of being executed. As a result, such files open for code reading and editing do not pose any security threat.

However, the operating system still thinks that JavaScript files are run when double clicked and tries to protect you from...


Introduction

Custom website theme development in Drupal 7 is, basically, where you define how each element and part of the website will look to the end user. This is done via manipulating theme files and writing our own custom web theming code in HTML, CSS, and JavaScript.

Luckily for us, Drupal is a well organized framework and...


This is a little tip to help programmers and system admins shave off a few milliseconds from their daily command line interface workflow. For the uninitiated, please note that some programmers, including yours truly, have been reported to spend hours or even days trying to automate a repetitive task that takes 5 seconds to execute....


Introduction

If you want to declare an array as a constant in PHP, you need to look further than what PHP provides as standard. Technically, if you look at PHP's Constants Syntax, it's not possible to define an array as constant, except from PHP 5.6 onwards. As of this writing, PHP 5.6 is still not widely available, and hence here's...


Introduction

Source code management, also known as code version control, source control, and revision control, is essential to say the least. For programming, it was and it always will be even more than essential. For other types of documents, it is becoming more and more essential and we are seeing business managers and graphic...


Introduction

In a previous blog post, we explained what hierarchical paths are, gave examples, and solved a problem with the pathauto module of Drupal 7 that caused certain links to contain a buggy "front" slug.

In this blog post, we will go deeper into all the issues that come with implementing a proper URL paths hierarchy in Drupal...


Generating hierarchical paths in Drupal 7 based on the pathauto module is not an easy task. First, in a nutshell, hierarchical paths are ones that follow a certain hierarchy, a tree structure, or even called multi level or multi depth. For example...


Introduction

As soon as you start developing reliable websites in Drupal 7, the need to create custom modules arises. There will be plenty of situations where you need to create custom hooks to handle certain business requirements for your Drupal website; and those hooks have to live inside a custom module. For example, check our...


Preventing your Drupal 7 website editors from deleting content, under certain conditions, is not that difficult if you know the proper Drupal hooks to use. However, finding those hooks isn't easy and we're sharing this blog post with you in the hope that it will save you a few programming headaches...


If you're looking for a well written and tested function to recursively retrieve all child menu items in Drupal 7, you've come to the right place. All you have to do is pass it a valid node path such as 'node/123'.

The terminology you use might differ. You might call them sub menu links, deeper level menu links, sub nodes, or links...


The time() function in PHP returns the current Unix timestamp; which is the time measured in the number of seconds since the Unix Epoch. Very useful in certain cases, but not always. This function, like most other PHP functions, is also cross platform compatible as it works on Unix, Linux, Windows, and Mac.

PHP's microtime()...


Open source is the future and is a main driver for development on many levels including but not limited to technical, social, and economic development. In our part of the world, we're not playing an important role in open source, we're not benefiting from it to the maximum, and Arabized features are still lacking in many areas. My lightning talk will hopefully persuade developers to take action, contribute more and more to open source, and assist in taking the whole ecosystem to the next level.

 


Securing Zend Framework

If you have a PHP web application built using the Zend Framework, securing all its pages becomes very easy. You just go ahead and add the following tiny function to your Bootstrap file:

[CODE]

What this does is that it captures any non-secure request (Over plain HTTP) and redirects it to HTTPS (HTTP Secure). As...


Introduction

Generating ANSI (or ASCII) command line colors, or terminal colors, or whatever you call them, is easy with PHP. As I have said in my previous post, ANSI Command Line Colors under Windows, having colored text in the command line is a great help for spotting error or success messages. So here’s a quick and dirty function...


Steps

Having colored text in the command line is a great help for spotting error or success messages. Unfortunately, those of us developing under Windows do not have this feature by default. Here’s how to enable it.

  1. Download ANSICON from: https://github.com/adoxa/ansicon
  2. Extract the proper files (Depending on if you have a 32 or...

Why change the default Look and Feel?

Aesthetics apart, every developer should change the default Look and Feel of NetBeans. Why? because it has an annoying bug. Here’s what happens: you’re pumping code in the NetBeans code editor like crazy. You need to switch to another window for a quick copy / paste from your eternal library...


Introduction

You are programming in PHP and you have an array variable that you'd like to explore at different execution paths. Of course, the best way is to use a PHP debugger like xdebug or Zend Debugger, but, what happens when you're too lazy to install a debugger? What happens when you don't want or can't install a debugger and...


What is URL Rewriting?

URL rewriting provides shorter and more relevant-looking links to web pages on your site. This improves the readability and the search rankings of your URLs. For example, URL "a" can be rewritten as URL "b".

[CODE]

There are many articles on the web discussing the benefits of shorter and more relevant URLs. Let...


Hello World!
August 02, 2010

We are Online!

The ubiquitous Hello World post is here to stay. For the sake of programming traditions, we're not removing it. But we do promise that our next posts will be more useful.

Below is a list of Hello World program examples in our favorite programming languages. Consult Wikipedia's Hello world program page if you're...