Tag Archives: Drupal 7

Drupal – Send mass email to node email field using Views Send module

The Views Send module integrated with Drupal Views such that you can select a group of email addresses with the Views filter and then send a batch of emails.

1. Download and enable the Views Send module module.

2. Create a new user view in Table format.

3. Add the User: E-mail as well as the Global: Send e-mail field.
Continue reading Drupal – Send mass email to node email field using Views Send module

Drupal – Ubercart and SMTP Authentication Support

Finally i could use the Go Daddy email account as relay using the SMTP Authentication Support module in Drupal. I can send the testing email but it doesn’t work for those email triggered by the Ubercart module. This is because Ubercart has it own mail system so you have to tweak the setting such that it use the SMTP module to send email. This can be done by the Mail System module.

1. Download and install the Mail System module.

2. Go to the setting page @ admin/config/system/mailsystem.

3. Update the Cart module class, Order module class and Store module class such that they all use the SmtpMailSystem rather than UbercartMailSystem.
Continue reading Drupal – Ubercart and SMTP Authentication Support

Go Daddy SMTP Server URL for email relay

Recently i need to setup the SMTP relay on a Drupal website. The client uses Go Daddy as the email service provider so i just setup a new email account for the SMTP authentication.

As from what i found in the Go Daddy Support

 

The SMTP server URL is

  • smtpout.secureserver.net

Continue reading Go Daddy SMTP Server URL for email relay

Drupal 7 – Export data using Views data export module with Drush command

Yesterday we talked about exporting data using the Views data export module.
Drupal 7 – Export view data CSV, XML, XLS by Views data export module

The module also provides a Drush command such that you can run the export command in the server which is convenient for backend integration.

The following command is stated in the project page.

  • drush views-data-export [view-name] [display-id] [output-file]

Continue reading Drupal 7 – Export data using Views data export module with Drush command

Drupal 7 – Several ways to get current URL

There are a few ways to get the current URL in Drupal 7. First, we can get the $_GET[‘q’] by the current_path() function. But it will ignore the language prefix if you are working on a multilingual site.

Examples of current_path():

http://example.com/node/306
returns “node/306”
http://example.com/drupalfolder/node/306
returns “node/306” while base_path() returns “/drupalfolder/”
http://example.com/path/alias
returns internal path such as “node/306” as opposed to the path alias
http://example.com/en/path/alias
returns internal path such as “node/306” as opposed to the path alias and language prefix is ignored

Continue reading Drupal 7 – Several ways to get current URL

Drupal 7 – Select node by language using EntityFieldQuery

Here is an example to select entities by the current language in EntityFieldQuery.

// Get the current language
global $language;

// Setup the EntityFieldQuery
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node')
  ->entityCondition('bundle', '<CONTENT TYPE>') // ex. article
  ->propertyCondition('status', 1) // published nodes
  ->propertyCondition('language', $language->language, '='); // filter by current language

// Execute the query
$result = $query->execute();

 

Done =)

Drupal 7 – Pathauto and Transliteration

Pathauto is the most common module which i think almost all Drupal websites use it to format the path alias. Sometime we want to use the node title as part of the path alias but if we are working on multilingual Drupal website, this may lead to non english URL.

So we have the Transliteration module to solve the problem. It takes Unicode text and tries to represent it in US-ASCII characters by attempting to transliterate the pronunciation expressed by the text in some other writing system to Roman letters. In addition, it also helps creating clean file name on file upload.

1. Download and install the Transliteration module.
Continue reading Drupal 7 – Pathauto and Transliteration

Drupal 7 – In-place editing using Edit module

The Edit module allows you to edit the node content directly on the node view page. It works with CKEditor and also it will be included in the Drupal 8 core. So see how it works in Drupal 7 first.

1. Drupal 7 >= 7.22 is required.

2. Download and install the CKEditor and Edit modules.

3. Grant the Access in-place editing to the relevant roles.
Continue reading Drupal 7 – In-place editing using Edit module