Latest posts

Browse topics

Home Remodeling - Season 2 starts now

Loyal readers of this blog are already familiar with the home renovation and remodeling process which we started a year ago, if not, make sure you check out article - How it all starts.

On April 14, 2016 we made a long and tired journey with our cats to get where we left this process at the end of Summer 2015. I was really glad that I had spent whole winter improving my photographer skills (see digital photography school), so it was just a matter of installing a tripod in meadow and setting my camera to capture HDR images.

There are two major things we did last year - replaced roof and landscaped surrounding territory - the results - looks amazing (if compared how it was a year ago). For this years plans - a water supply is a must have, in order to get water here, we need to dug a well at first. We plan to construct a bathroom (for that we will need to change few bearing beams and rebuild from scratch few walls). I believe a lot of effort will be put on territory improvement, one of the things we plan to do on this - to dug our small fish pond a bit bigger). But for now - take a look, how well Spring around our rural house looks through my camera lens.

Our rural house

Our rural house

There is some junk still in the from of house (old TV's), we plan to remove major junk, before grass have grown up. 

Our small fish pond and surrounding area

Our small fish pond and surrounding area

This autumn we are planing to dug a pond as well, let's see how does it will go.

Dog house and snow drops in front of hour house

Dog house and snow drops in front of hour house

In Spring it's just amazing how lovely it looks here - a snowdrops in front of your house, can things even get better? Speaking of dog house, take a look how I built it last autumn. Good folks (who kept an eye on house during our absence, have even made lovely entrance decor for dog house - curtains (well, it's more to keep house warm). Really good people are living in countryside. 

Back view of house

Back view of house

The major home renovation tasks are performed at this part of house, it's planned to change a few bearing beams, construct new walls, build a bathroom and plan a really cool outdoor terrace.

Pine coppice and our veggie garden

Pine coppice and our veggie garden

Apple orchard

Apple orchard

There is a lot still to do in garden. That Honda CRV in background is our vehicle for 2016. 

View towards house from garden

View towards house from garden

As you can see, there is still a lot to do, to build our dream house, but hey, we are here for another amazing summer. 

Drupal String Overrides For Comment form + Translated Month names

In yesterday's article How to hide Drupal comment Subject line and help text I talked about a simple and neat module Simplify, with help of whom I was able to get rid of confusing Subject line field and help area under Drupal comments. I was working with a Drupal for a non-English language website and had to translate some strings - of course I could go for Internationalization module, but since this site is just in one language - Internationalization might be too much - I didn't wanted to install Drupal in other language than English - I was left with few options to rewrite some of English language strings to other language. 

Luckily, some time ago I was working on Georgian language site, and I remember I used neat module String Overrides:

Provides a quick and easy way to replace any text on the site.

For todays challenge - I had to change (translate) strings on Drupal comment form and provide translated version for month names. Let's start with changing strings for comment form:

Download and install String Overrides module, from modules configuration page enter Original string, for example Add new comment, and Replacement string, Leave a comment, for example (as you can see, the original idea of string overrides module is not to use it as replacement for translation module, but to override existing Drupal strings, of course you can use it to add simple translations for smaller website also). Save configuration, clear cache and you should be done. 

Drupal string overrides configuration page

Drupal string overrides configuration page

Now, for the translating month names in other language, it was a bit trickier - and involves writing a new function in sites template.php file. I took following code from here.

function monthname_install() {
  $months = array(
    'January',
    'February',
    'March',
    'April',
    'May',
    'June',
    'July',
    'August',
    'September',
    'October',
    'November',
    'December',
  );
  
  $options['context'] = 'Long month name';

  foreach($months as $m) {
    t($m, array(), $options);
  }
  
  drupal_set_message(t('Month names have been made available for translation. The rest is up to the translation team :-)'));
}

function monthname_cron() {
  drupal_uninstall_modules(array('monthname'));
}

Add it to your template.php file, clear cache and from string overrides configuration page again enter Original string, for example April and Replacement string, Aprīls (translated in Latvian) in context field enter  Long month name

Here is the final Drupal comment form translate using string overrides module:

Drupal comment form translated to Latvian using String Overrides module

Drupal comment form translated to Latvian using String Overrides module

Hope it helps!

How to hide Drupal comment Subject line and help text

There are several ways of hiding Input format options for Drupal comments, the simplest (but the wrongest) way is by just hiding area with CSS (display:none), second -  you can use the hook_form_alter function to make changes to a form before it is rendered (See article: How to Theme the Comment Form in Drupal 7)  and third one is by using a simple module with simple name: Simplify.

In this article you will find how to hide help area for Drupal comments using module Simplify.

I must admit, I have always avoided using default Drupal comment system (which ships out of box for any Drupal site, you just need to enable it from modules page) - I don't now actually why I have been avoiding them, and opted to use third party comment providers (Disqus, for example)

I was working on non-profit Drupal site (voluntary) and wanted to build it without involving any third party plugins, the site involves blog posts and for a comment system I opted in for default Drupal comment system. Just shortly after enabling them - I really didn't like them, because of - confusing Subject field and filter tips area.

Default Drupal Comment form

Default Drupal Comment form

It was easy to disable Subject field - just visit your content type, and under comment settings uncheck - Allow comment title

For disabling help area under Drupal comments - it was tempting to use CSS trick - display:none, to get fast results, but as you already know - that's a bad practice, which might end you penalized by Google (Google don't love hidden texts). I almost started with hook_form_alter, but that involved a little research and testing, luckily I found Simplify module and was able to get what I was looking for.

Simplify allows particular fields to be hidden from the user interface. This helps to de-clutter forms and present a more user-friendly experience to content editors.

After I installed and enabled Simplify module, from modules configuration page (admin/config/user-interface/simplify) , under comment settings I checked next to Hide - Text format selection, and I was done. Took me less than five minutes, here is the final result of Drupal comment form:

Formatted Drupal comment form

Formatted Drupal comment form

Hope it helps!

Drupal - How To Add Read More Link To Copied Text (addtocopy)

Time after time I have received negative comments on my blog, where users were complaining about disabled copy functionality from my blog - For a very long time I had disabled to copy any text and images from my blog using simple but neat Drupal module: Copy Prevention. See case study here: How To Protect Drupal Content (Articles and Photos) From Being Copied

My main concern was at least to somehow protect my digital artworks (I have a few gigabytes of my photos uploaded and stored in this blog).

Following words I used to describe my situation around a year ago:

Some time ago I noticed some website has copied my content including all texts and photos. I immediately contacted the website owner with a request to take down this copy/pasted content. This simple approach worked this time and indeed my content was taken down.

Although in next morning I found another website has just copy/pasted my content with text and images, again I contacted them with request to take my content down, because of I have not given such permission to re-publish my contents and photos.- Read more: https://www.reinisfischer.com/how-protect-drupal-content-articles-and-photos-being-copied

Did you noticed that Read more link at the end of quote? That's feature I will discus later in this article.

Copy Prevention module offers to disable only right-click on images and also offers to overlay it with a transparent .gif image - but I find it hard to implement it to my current Drupal custom built theme, and so I enabled complete copy ban (no text selection, no right click and so on)

On the other hand, there are few how to articles on my blog (what a paradox most covers Drupal Development) with some code examples, then there are few larger tutorials on some server configuration examples, and then there are few but very popular articles about minimum and average salaries in EU.

Copy prevention has helped me to fight 95% of digital thieves (I find it disappointing seeing my photos, without any attribution, shared across Facebook or used in other websites - trust me - digital thieves are a huge problem, especially in country I'm currently living - there was a time, some rival bloggers scrapped each and every article from my blog - since it might hurt Google Rankings - Copy Prevention was the only solution at that time, even with a sacrifice to those who wanted to make legitimate copy (copy code or table, for example)

So after receiving another comment from another unsatisfied visitor - I decided to find out solution - how to allow text to be copied, but still keep images disabled from copying. I spent a few hours debugging existing Copy Prevention module - and finally achieved what I was looking for.

But now - I still feel insecure of possible content plagiarism threats, now everyone can copy paste and re-use my articles. To somehow, at least, get some use of it - I decided to add a link back to my articles after the copied text, once some visitor will decided to re-use my content. I will admit, I'm doing that for selfish purpose as well - a link back to my blog could help a bit in never ending fight for Google Traffic.

Enough talking, here is solution for Drupal websites:

Download and enable addtocopy module, download jQuery addtocopy plugin and place it into 'sites/all/libraries/addtocopy' directory. Don't forget to say friendly hi to this module author Andrew Berezovsky (By the way he is the author Copy Prevention module as well)

Configure module from admin/config/user-interface/addtocopy

Add to Copy configuration screen

Add to Copy configuration screen

Inspect your Drupal theme to find out jQueryr selector, by default it is set to #content, but you might need to reconfigure this.

Piazza Square in Batumi

Piazza square in Batumi is one of the landmarks of city - square features luxury and boutique hotels, cafeterias and interesting architectural elements. A small Italian renaissance in Georgian sauce. 

The visiting - card of Batumi, local peoples and tourists favorite place of meeting. Batumi Piazza was built in 2009 in Old Batumi. Square was designed by famous Georgian architect Vazha Orbeladze and it is a mixture and an unique ensemble of different styles and trends.

Clock tower at Piazza square in Batumi

Clock tower at Piazza square in Batumi

Inside the tower building there are lovely restaurant and a boutique hotel located

Piazza Square in Batumi

Piazza Square in Batumi

Visit www.piazza.ge to learn more