How To

Zyxware default image2
| 2 min read
This article covers, how to send email programmatically in your Drupal 8 site. There are two main steps to send an email using Drupal 8. First we need to implement hook_mail() to define email templates and the second step is to use the mail manager to send emails using these templates. Let's see an example for sending an email from the custom module, also the following name spaces.
Zyxware default image3
| 2 min read
This article covers, how to send email programmatically in your Drupal 8 site. There are two main steps to send an email using Drupal 8. First we need to implement hook_mail() to define email templates and the second step is to use the mail manager to send emails using these templates. Let's see an example for sending an email from the custom module, also the following name spaces.
Zyxware default image2
| 3 min read
Reading or writing CSV file in Selenium Java can be done using a simple csv parser library called opencsv. Opencsv is free and is available under a commercial-friendly Apache 2.0 license. Opencsv contains classes to read and write csv files. For reading or writing csv files using Selenium, we need to import opencsv.jar to the java project.
Zyxware default image2
| 2 min read
In Drupal 7 we can upgrade a module in many ways but we fail on upgrade feeds excel module. The reason being the newer version of the module is entirely different from the old version folder structure and file naming. We can overcome this situation by uninstalling the older version and installing the new version. Sometimes we cannot uninstall the module due to the module dependency and data lock. We can achieve this manually using the following steps.
Zyxware default image4
| 3 min read
Most of the operations that are done when developing sites in Drupal deals with enabling and configuring modules that are to be saved for future use. This is most certain times a time consuming process. But what if we could automate these tasks by developing a deployment module. Let's find out how we could achieve this goal.
Zyxware default image3
| 3 min read
One of our project requirement was to transfer files from our server to an external storage space. This could be basically done by connecting to the server using SSH or FTP and then transferring files. We initially decided to use the libssh2-php library for creating SSH tunneling with the server and transfer file. Our server was hosted in Acquia server and libssh2-php was not available in Acquia stack. Read on to know how we tackled the problem of file transfer to an external storage space in Acquia environment.
Zyxware default image4
| 4 min read
As part of form creation process in one of our recent project we came across one module called 'Client side Validation'. As the name implies the module supports basic as well as most advanced sort of validation methods. Validating the form user inputs is the one task we could not ignore on developing forms for a web project. Let's find out how the 'Client side Validation' will make life easy.
Zyxware default image2
| 3 min read
One such feature used widely throughout the site is the use of popups for alerting users. Popups are nothing new to web development. In fact Drupal provides multiple tools to create popups including the more widely used Colorbox plugin. For this project we chose to go with Ctools modal popup as it provided more options than Colorbox. Read on to know how to implement popups using Ctools. Follow the steps below to implement the pop-ups
Zyxware default image4
| 4 min read
A Payment gateway tends to offer multiple types of payment services, that provides onsite and offsite options. Onsite payment is processed by a third party API using web services with the information gathered from our site through a checkout form (For example : Credit card/Debit card credentials). Offsite payment method, on the other hand, processes data entered in the payment gateway page. It redirects the users to the processing page of the payment gateway using the checkout form. After the payment is completed, the user will be redirected to the payment page, from where the user can move forward or backward in the checkout process. Here, let's take a look at the creation of custom offsite payment gateway module.
Zyxware default image3
| 2 min read
One day my client came to me and asking about something which I was not so familiar of. His requirement can be simply put like this. He has an amazon account and have couple of S3 buckets. He has created a new S3 bucket and a new user. He needs this user to only access this new bucket. Let's call this user "new-user" and the bucket "new-bucket". I was not sure how to do this, but eventually I was able to. Read on if you want to know how to do this.
Zyxware default image4
| 2 min read
In one of my recent project I had a task to create a content type with a select list field of all image styles. But how can we get all image styles in Drupal? In Drupal there is an option to create different image styles using a module 'image'. Image module allows users to upload images into Drupal with proper permissions along with this its thumbnails and additional sizes are created automatically. Image module also gives an image_styles() function that can be used to get all image styles and their settings.
Zyxware default image1
| 3 min read
SSH keys are a way to identify computers, without using passwords. If you have used git, or if you are an active participant in the open-source community, you will be definitely familiar with the important role of SSH. In the case of remote servers, when using SSH logins, the server will ask for password each time you try to login. This could be avoided by adding public key to server's authorized_keys.