Latest posts

Browse topics

Exploring Tbilisi on Two Wheels: A Journey Through the City's Streets with a Mountain Bike (2013)

I recently went on my first mountain biking excursion of the year on December 23rd.

Although it wasn't a true mountain biking experience, I rode my bike along the streets of Tbilisi, crossing over the Mtkvari river on the Queen Tamar Mephe bridge and back.

Here are some candid photos from my ride that showcase the city's streets and scenery.

Apartment blocks in Tbilisi

Apartment blocks in Tbilisi

New skyscrapers been built in Tbilisi

New skyscrapers been built in Tbilisi

Traffic jam in Tbilisi

Traffic jam in Tbilisi

​Tbilisi, December 23rd

Tbilisi, December 23rd

Does it look like a Christmas?

My newly acquired mountain bike

My newly acquired mountain bike

I bought this bike at Kidobani market

Mtkvari river in Tbilisi

Mtkvari river in Tbilisi

How to automatically add watermarks to uploaded images in Drupal

Drupal is a powerful content management system (CMS) that allows users to create and manage websites with ease. One of the features that make Drupal popular among users is its flexibility and extensibility. Drupal's module system allows users to add functionalities to their websites, including automatic watermarking of uploaded images.

If you are making photos and publicizing them to the internet - sooner or later you will find that you want to protect them somehow.

Protect yourself from people stealing your artwork and re-publishing pictures in other places. One way to protect images is to add watermarks. Well, it doesn't mean someone still won't steal your pictures, but at least your watermark will be on. 

I have found one solution in Drupal 7, using the ImageCache action module:

As you can see on picture above - I have added simple watermark on bottom right corner. And it's done with Drupal Image Cache actions module.

  • Download ImageCache actions module
  • Extract to sites/all/modules
  • Enable Imagecache Canvas Actions

Now go to your image style settings (admin/config/media/image-styles) and add new or edit existing image style.

Here you can see I have added new Effect Overlay (watermark) and added image on that.

You can use some photo editing software to create your image to add on image, or you can use your existing logo, for example. I created simple .png transparent file with text on that, and rotated it 90°

Image Cache actions give you some options for where to place a watermark. I have chosen to place it bottom right. 

I would call this a foolproof solution, to protect your images. The negative aspect is that, if you are familiar with Drupal file upload path settings you can easily take the original image, which came without a watermark. On the other hand, I guess you can use some permissions, to disallow users to access original files. Not sure, right now.

If you need help with Drupal website development, consider hiring me. 

Image hover effects - how to change background on mouse over

Today I faced again some interesting thing to create - on hover image to change the background and display text over it

Here is how it looks:

On the left side, you can see the default image, while on the right side with mouse over. To achieve such behavior in Drupal is pretty simple, a little bit CSS and you are done.

Here is my view with div tags and Drupal fields:

<div class="image-hover">
[field_images]
<span class="image-overlay ">Read Full Article</span>
</div>

And here is CSS:

.image-hover {
display: inline-block;
position: relative;
background: #000;
line-height: 0px;
}

#image-hover:hover img {
opacity:0.3;
filter:alpha(opacity=30);

}
.image-hover span.image-overlay {
display: table-cell;
position: absolute;
z-index: 3;
background: transparent;
width: 100%;
top: 50%;
left: 0px;
color: transparent;
text-align: center;
vertical-align: center;
margin-top: -23px;
line-height: 20px;
}
.image-hover:hover span.image-overlay {
color:#fff;
text-shadow: 0px 0px 1px black;
}

Easy, right? 

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?