Drupal Planet

[Drupal-8] How to send a mail programmatically in Drupal-8

August 24, 2016 - 18:03

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.

[Solved] Drupal 7 Feeds Excel module Upgrade from 7.x-1.0-beta1 to version 7.0-2.x

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.

How to Transfer files from Acquia to an external server

April 20, 2016 - 17:42

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.

Standardized curriculum for Drupal Developers - Phase 1 - completed publishing content

We are happy to inform that, we have completed the the first phase of the project on creating a standardized Drupal curriculum for Drupal companies as planned. We have compiled and published our Drupal training curriculum on the groups.drupal.org wiki under the Curriculum and Training group. We are now looking to get feedback from other Drupal companies and Drupal developers on the curriculum and the training materials. We also would like to invite developers from the community to contribute towards making this curriculum better.

[Drupal] How to create custom offsite payment gateway module in Drupal 7

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.

Towards building a standardized curriculum for Drupal Developers

As one of the largest exclusive Drupal agencies in India and having trained close to 200 employees over its 10 year history we are probably one of the very few Drupal firms in India in a position to take this effort that could in turn help a lot of other Drupal companies. We are looking to compile and publish our Drupal Training Curriculum in an effort to come up with a standard approach towards training developers in Drupal companies. We are looking to complete this exercise by March 31, 2016 and will be publishing the learning objectives, syllabus and curriculum under GFDL license.

SSH for password less logins on remote server

December 08, 2015 - 10:28

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.

Exploring Symfony2 in Drupal 8

With Drupal 8 just around the corner, every Drupal developer is in a nirvana of excitement and eagerness. Drupal keeps getting better and better every day and Drupal 8 will make website development and management a five-finger exercise, because this latest version of Drupal has included some amazing and potent Symfony components to serve the big businesses better.

[Drupal] How to retain the default values of step 1 form after successfully submitting the step 2 form of a two step form

November 18, 2015 - 09:41

To keep the default values of the step one form after successfully submitting the step 2 form, here is an easy way. Just pass the form state values of step 1 form as query parameters to the same page on submitting step 2 form. Set the default values of step 1 form as, first check whether the form_state value is set. If yes, set the default values of step 1 form fields with the form_state values. Else check the URL query parameters, whether this variable is set. If yes, then set the default value with that value.

[Drupal] How to set destination as the link value in the l(), in case of urls with parameters

October 20, 2015 - 19:15

We can use l() to add links in our Drupal pages. However, while using the output of drupal_get_destination() in the l() as link, it might end up in the wrong functionality. If the drupal_get_destination() returns a url with parameters involved, then using it directly in the l() would cause the link to redirect to the wrong page.

Pages