Latest posts

Browse topics

Drupal pathauto + transliteration

Are you writing in different language than English, languages like Russian, Greek, Georgian, Hebrew or maybe Latvian? You find it's not attractive URL generated? In this article you will learn how to fix this using Drupal CMS and a neat module - Transliteration.

Take a look at these screenshots:

Here is Latvian URL in Chrome:

Chrome handles special characters nicely.

The same URL in Mozilla Firefox:

First problems detected - special characters have been converted to %C%4 - not nice.

And here is IE:

Yes, IE cannot handle them either,

The good news are - the URL will be shown nice in Google search in all browsers: Take a look at this screen made on IE.

In case you are concerned taht your URL looks ugly on Google, don't - everything is fine. But if you still find it unattractive how your language is outputted in Drupal install Drupal Transliteration module.

After you have enabled transliteration module - you can configure it here - admin/config/media/file-system/transliteration

Now - if you have pathauto already enabled (and I guess you do) - you should go to admin/config/search/path/settings and make some adjustments:

You must check box next to Transliterate prior to creating alias.

Still, if you want your existing path to be transliterated you must delete existing path and generate new ones:

  • Delete: admin/config/search/path/delete_bulk
  • Update: admin/config/search/path/update_bulk

And here is the result with transliterated path in IE:

Drupal: Sending Confirmation Emails from Your Webform

Today, I encountered a problem that at first seemed like a pain, but in the end, turned out to be simpler than I thought. I needed to send a confirmation email to the submitter of a webform, letting them know that their email had been received, along with some plain text instructions.

A while back, I wrote about how to add a contact form to Drupal, and today I want to share with you how to send a confirmation email to the submitter.

This is the screenshot for webform I have on my site. As you can see, I have a field called - Your email. Now if we go to E-mails tab, we can add some componet to send confirmation mesagge to value of email field:

Click next to Component value, and choose from dropdown your email field. Next click Add.

Now change E-mail to address value, to Component yiur e-mail field. Add some customization and message. And you are done. Save your form. And next time, someone will leave a message to your webform. He/she will recieve confimation e-mail as well. Simple, right?

How To Upgrade Drupal 6 to Drupal 7: Step by Step

Before proceeding with the upgrade, it's important to make a backup of your Drupal 6 site. This includes both the database and the files. This will ensure that you have a restore point in case anything goes wrong during the upgrade process.

Once you have made a backup, it's time to put your Drupal 6 site into maintenance mode. This will ensure that no users can access the site while you are upgrading. To do this, go to the site maintenance page (admin/settings/site-maintenance), select "Off-line" and save the configuration. If you have defined a custom maintenance theme in your settings.php file, it is recommended to comment it out before proceeding.

Next, disable all non-core modules. This is to ensure that any conflicts that may arise during the upgrade process can be easily identified and resolved. To disable modules, go to the module administration page (admin/modules) and uncheck the boxes next to the non-core modules.

After disabling the modules, delete the old Drupal 6 files. This will make sure that you have a clean slate to work with. Once you have deleted the files, it's time to run the upgrade. To do this, download the latest version of Drupal 7 and extract the files to your server. Overwrite the existing files with the new Drupal 7 files.

Finally, run the update script. This script will update your Drupal 6 database to Drupal 7. The update script can be found in the update.php file in the root directory of your Drupal site. To run the update, simply navigate to the update.php file in your browser (e.g. www.yoursite.com/update.php). Follow the instructions on the screen to complete the upgrade process.

In conclusion, upgrading Drupal 6 to Drupal 7 is a multi-step process that requires careful planning and preparation. By following these steps, you can ensure that your upgrade is successful and that your site continues to run smoothly.

Configuring Nginx to Display 404 Page for Unconfigured Domains and Server IP Address

In today's digital age, it is crucial for website owners to have a properly configured web server.

This not only ensures a smooth and seamless user experience but also protects the website from potential security threats.

One common issue that website owners face is incorrectly indexed links in search engines like Google. In this article, we will provide a simple guide on how to configure Nginx to display a 404 page for unconfigured domains and your server's IP address.

The first step in this process is to create a dummy or default domain folder. This folder will serve as a redirect for all incorrect requests made to the website. To create this folder, open the terminal and enter the following commands:

sudo mkdir -p /srv/www/default sudo usermod -a -G www-data admin sudo chown -R www-data:www-data /srv/www sudo chmod -R 775 /srv/www

Once the dummy domain folder has been created, the next step is to configure Nginx server blocks for this folder. Open the Nginx configuration file by entering the following command in the terminal:

sudo nano /usr/local/nginx/sites-available/default

In the Nginx configuration file, paste the following code:

server{ listen 80 default; root /srv/www/default; }

Next, enable the domain by creating a symbolic link between the available and enabled folders in Nginx:

sudo ln -s /usr/local/nginx/sites-available/default /usr/local/nginx/sites-enabled/default

The final step is to create a basic HTML index.html file and upload it to the /srv/www/default folder. This file will display the content that will be shown when accessing the server's IP address or an unconfigured domain.

After uploading the index.html file, restart Nginx by entering the following commands in the terminal:

sudo /etc/init.d/nginx stop sudo /etc/init.d/nginx start

Now, try accessing the server's IP address in a web browser. You should see the content from the index.html file that you created.

In conclusion, configuring Nginx to display a 404 page for unconfigured domains and server IP addresses is a simple process that can help to protect your website from potential security threats and ensure a smooth user experience.

Improve User Experience with Image Hover Effects for Drupal Thumbnail Images

Drupal is a powerful and flexible content management system that enables you to create visually appealing and engaging websites. One way to enhance the visual impact of your Drupal site is to add image hover effects to your thumbnails.

In this article, we'll explore how to use Drupal to create image hover effects for thumbnails.

Step 1: Install and Configure the Image Hover Effects Module

To create image hover effects for your Drupal thumbnails, you'll need to install and configure the Image Hover Effects module. This module allows you to apply a variety of hover effects to your images, including zoom, rotate, flip, and more.

Once you've installed the module, you can configure it by going to the module settings page in the Drupal admin interface. From there, you can choose which hover effects to enable, customize the settings for each effect, and apply the effects to specific image fields on your site.

Step 2: Create a Thumbnail Image Field

To add thumbnails to your Drupal site, you'll need to create an image field for your content type. This can be done using the Drupal core Fields module, which allows you to create custom fields for your content types.

Once you've created the image field, you can configure its display settings to show the image as a thumbnail. You can also choose the size of the thumbnail and any other display settings you want to apply.

Step 3: Apply the Image Hover Effect to Your Thumbnails

Now that you've created your image field and enabled the Image Hover Effects module, you can apply the hover effect to your thumbnails. To do this, you'll need to go to the display settings for your image field and choose the hover effect you want to apply.

You can also customize the settings for the hover effect, such as the speed of the animation, the color of the overlay, and other options.

Step 4: Preview and Test the Image Hover Effect

Once you've applied the image hover effect to your thumbnails, you can preview and test it to make sure it looks and works as expected. You can do this by viewing the content on your Drupal site that uses the image field and hovering over the thumbnail to see the effect in action.

If you're not happy with the result, you can go back to the module settings or the display settings for your image field to make any necessary changes.

Conclusion

Adding image hover effects to your Drupal thumbnails is a great way to enhance the visual appeal of your site and make it more engaging for visitors. With the Image Hover Effects module, it's easy to apply a variety of hover effects to your images and customize the settings to suit your needs. By following the steps outlined in this article, you can create stunning image hover effects for your Drupal site in no time.