Latest posts

Browse topics

Postcards from Florence, Italy

Florence is a destination to head for if you are looking for renaissance art. 

Florence is famous for its history: a centre of medieval European trade and finance and one of the wealthiest cities of the time, it is considered the birthplace of the Renaissance, and has been called "the Athens of the Middle Ages"

In today's Piece of Life photo series - Postcards from Florence, taken at the end of 2015

View towards Florence

View towards Florence

If you are new to Florence and might wonder where are the best points to photography the city, get to the Michelangelo Square, from this place all Florence is on your palm. I installed a tripod here and played a bit with camera here - above image is final HDR I rendered using Photomatix.

Panoramic view towards Florence

Panoramic view towards Florence

Some magic with photo stitching and in result - lovely panoramic view of Florence.

Next we headed by our rental car straight into the heart a city, parked our car near a cathedral and went in a few hour wandering tour around Florence

Mime in the streets of Florence

Mime in the streets of Florence

Basilica of Santa Croce, Florence

Basilica of Santa Croce, Florence

Turns out the Michelangelo is buried in Santa Croce, and also the Rossini, Machiavelli, Galileo Galilei and who was tried by the Inquisition and was not allowed Christian burial until 1737, after 95 years of thanaato. There is also a monument to Dante, but the sarcophagus is empty. 

The Basilica di Santa Croce (Basilica of the Holy Cross) is the principal Franciscan church in Florence, Italy, and a minor basilica of the Roman Catholic Church. It is situated on the Piazza di Santa Croce, about 800 metres south-east of the Duomo. The site, when first chosen, was in marshland outside the city walls.

Sculptures in Florence

Renaissance sculptures in Florence

Renaissance sculptures in Florence

Renaissance sculptures in Florence

Florentines

Florentines

I actually bough a pajama at that H&M store seen in the background (above image)

A chariot

A chariot 

Mime posing for a shot in Florence

Mime posing for a shot in Florence

Sergos Duqani restaurant in Akhaltsikhe

Sergos Duqani is a lovely restaurant in Akhaltsikhe, serving traditional Georgian cuisine. Located just in the footsteps of Rabati Fortress complex.

We first discovered and met lovely owners of this place, when stayed in hotel in Rabati (Hotel Rabath & Gino Wellness) and were looking for some local place to have dinner. Frankly speaking sashlik served here is among the best I have ever tried in Georgia (and price for them are ridiculously low  - about 6 lari per skewer.)

Segos Duqani restaurant in Akhaltsikhe, Georgia

Segos Duqani restaurant in Akhaltsikhe, Georgia

Menu items at Sergo Duqani restaurant

Menu items at Sergo Duqani restaurant 

Inside interior

Inside interior 

Turkish coffee

Turkish coffee

Soup Ostri

Soup Ostri

Sashlik on grill

Sashlik on grill

Sashlik on plate

Sashlik on plate

How to Prepare Traditional Dolma (Grape Leaves Roll)

Hello everyone and welcome to another post from my experiments being a food blogger. OK, for following recipe I wasn't actually preparing that tasty dolma, instead I experiment with new food photography technique.

About food photography: Today I decided to experiment with 100mm lens and used long exposures (obliviously from a tripod). Find more tutorials on Digital Photography School

About Dolma (Grape leaves roll) - Dolma is a family of stuffed vegetable dishes common in the Middle East and surrounding regions including the Balkans, the Caucasus, Russia and Central Asia. Common vegetables to stuff include tomato, pepper, onion, zucchini, eggplant, and garlic. The stuffing may or may not include meat. Meat dolmas are generally served warm, often with egg-lemon or garlic yogurt sauce; meatless ones are generally served cold. Stuffed vegetables are also common in Italian cuisine, where they are named ripieni ("stuffed").

Today we are going to prepare traditional dolma with meat stuffing. Most of the ingredients will be available at your closest shop, but for grape leaves and yogurt you might need to head to specific store (which we actually did, here in Georgia, we bought leaves and yogurt (for dressing) at Turkish store in Didube (neighborhood of Tbilisi)

Stuffing for dolmas

Stuffing for dolmas

onions, garlic, species (on your taste), rise (not fully boiled), carrots, minced mix meat( lamb and pork)

Grape leaves

Grape leaves

Yoghurt sauce with garlics

Yogurt sauce with garlic

Now its time to put stuffing in grape leaves, wrap them up and put in the pot.

Wrapped dolma rolls in pot

Wrapped dolma rolls in pot

Pour some water over dolmas (about 3cm above) and cook slowly for some 45 minutes

Cook slowly

Cook slowly

It is a good idea to add some pressure over dolmas, so they don't destruct

Dolmas dressed with garlic yogurt sauce

Dolmas dressed with garlic yogurt sauce

DrupalGap Native App - Part 2: Creating And Linking Custom Views Listing Page

I was working on my blog's native Drupal app, and decided to share my discoveries on how to create additional custom Views Json listing page and how to link it in  your apps menu.

For the content on this page I decided to list all articles from my blog whose location are set to Georgia, and give it name - Georgia Travel Guide. Georgia and Drupal is special for me, so this was just logically the most "urgent" task I wanted to achieve next while building my native Drupal app.

Read more: How to develop Native Drupal app using Drupalgap - Part 1: Custom Front Page Using views - Images and Date

DrupalGap app in Ripple Emulator

DrupalGap app in Ripple Emulator

Creating Views Json 

I have some specific fields for my content types, most probably they will differ from your setup, use with caution

  • Create new view - I named it Sakartvelo (Name of Georgia in Georgian language)
  • Path: sakartvelo
  • Format: Json data document
  • Fields: Title, Images, Nid, Post date, Total views
  • Filter criteria: Location:Georgia
  • Sort criteria: Total views desc

I wanted to add additional exposed filer to allow visitors change categories, but seems DrupalGap is net yet compatible with views selective filters.

Here is Json data output for my view

"nodes" : [
    {
      "node" : {
        "title" : "Shopping in Georgia: Tbilisi Mall",
        "field_images" : {
          "src" : "http://www.reinisfischer.com/sites/default/files/styles/front/public/tbilisimalls.jpg?itok=8ehAyVDO",
          "alt" : ""
        },
        "nid" : "936",
        "date" : "12/14/2014 - 06:56",
        "total" : "4,169"
      }
    },

Creating Custom Page (Module)

In apps/modules/custom create new directory - Georgia, place inside it a .js file georgia.js

/**
 * Implements hook_menu().
 */
function georgia_menu() {
    try {
      var items = {};
            items['georgia'] = {
              title: 'Georgia Travel Guide',
              page_callback: 'georgia_sakartvelo'
            };
     
      return items;
    }
    catch (error) { console.log('hook_menu failed - ' + error); }
}
 
/**
 * The page callback to display the view my_module_article_images.
 */
function georgia_sakartvelo() {
  try {
    var content = {};
       
    content['my_articles_list1'] = {
      theme: 'view',
      format: 'none',
      path: 'sakartvelo', /* the path to the view in Drupal */
      row_callback: 'georgia_sakartvelo_list_row',
      empty_callback: 'georgia_sakartvelo_list_empty',
      attributes: {
        id: 'article_listing_items1'
      }
    };
       
        return content;
  }
  catch (error) { console.log('georgia_sakartvelo - ' + error); }
}
 
/**
 * The row callback to render a single row.
 */
function georgia_sakartvelo_list_row (view, row) {
  try {
        
      var image_html = theme('image', { path: row.field_images.src });
      var title_html = '<div class="mobile-title"><div class="inside"><h2><span>' + row.title + '</span></h2></div></div>';
      var total_html = '<div class="mobile-date">' + row.total + ' views</div>';
      var link = l('<div class="mobile-wrap">' + image_html + title_html + total_html, 'node/' + row.nid) +'</div>';
      return link;
            
  }
  catch (error) { console.log('georgia_sakartvelo_list_row - ' + error); }
}
 
/**
 * Callback function for no results.
 */
function georgia_sakartvelo_list_empty(view) {
  try {
    return '<p>Sorry, no articles were found.</p>';
  }
  catch (error) { console.log('georgia_sakartvelo_list_empty - ' + error); }
}

Next add path to your module in settings.js file

Drupal.modules.custom['georgia'] = {};

How to add menu link in DrupalGap

​DrupalGap menu

DrupalGap menu

I just replaced existing links from Main Menu in settings.js file

// Main Menu
drupalgap.settings.menus['main_menu'] = {
  options: menu_popup_get_default_options(),
  links: [
    {
      title:'Georgia Travel Guide',
      path: 'georgia',
      options:{
        attributes: {
          'data-icon': 'star',
          'class': 'ui-btn ui-btn-icon-right'
        }
      }
    },

What's next?

Hopefully I will finish my development works on my native Drupal app anytime soon, from now the next big thing I'm planing to touch in DrupalGap is the way it renders taxonomy pages. I will keep you updated

How to develop Native Drupal app using Drupalgap - Part 1: Custom Front Page Using views - Images and Date

There was a time when I was really eager to develop native Drupal app, back then I decided to stick with Drupalgap. Now, more than a year has already passed since, and I haven't achieved my goal (s) yet.

Until recently, I decided to finish works on native Drupal app I started back in 2014. Speaking of my app -  nothing fancy here, just my latest blog posts, with ability latter to extend functionality adding more native app features (geo location, for example) . As I like to call it - minimum viable product approach.

I installed DrupalGap module and all its dependencies on my site, I must admit I had some problems actually getting it alive, but they were more server related rather problems with module itself. In short I experienced problems with server permissions to upload files, so I had to install DrupalGap library manually (instead of a one click installation), and then turned out that DrupalGap is not very friendly with php 5.2. version, so I had to patch it a little bit.

Ok, when I was setup and mobile-application folder was created on my server, I straight went to explore how to get a front page for my app listing latest articles with images and date, and here is how I achieved it:

Custom front page for Native Drupal app using DrupalGap

For most of the documentation I followed on DrupalGap Docs. Almost all from written bellow is taken from DrupalGap documentation: Article Titles with Images and Image Lists. I modified a little bit views and .js file to achieve results I was looking for. It took me several hours to get this done, and hopefully I can spare you some time. For previewing my app online I installed Ripple Emulator (Google Chrome Extension) and disabled Cross Domain Proxy

App preview on Google Chrome Ripple Emulator

App preview on Google Chrome Ripple Emulator

​Creating Json Views for DrupalGap

  • Create a new view - Article Images
  • Set view to Json data document
  • Add fields: title, images, nid and post date

Preview your view:

{
  "nodes" : [
    {
      "node" : {
        "title" : "Tortuga Snack Bar in Portofino, Italy",
        "field_images" : {
          "src" : "http://www.reinisfischer.com/sites/default/files/styles/front/public/tortuga.jpg?itok=dgcNmioC",
          "alt" : ""
        },
        "nid" : "4407",
        "date" : "01/21/2016 - 00:22"
      }
    },

Next create a new custom module in your DrupalGap folder: (How to create custom module in DrupalGap)

  • In /app/modules/custom (you will have to create those directories as well) I created a new folder - front, in which I created new .js file front.js.
/**
 * Implements hook_menu().
 */
function front_menu() {
    try {
      var items = {};
            items['front'] = {
              title: 'Article Images',
              page_callback: 'front_article_images'
            };
     
      return items;
    }
    catch (error) { console.log('hook_menu failed - ' + error); }
}
 
/**
 * The page callback to display the view my_module_article_images.
 */
function front_article_images() {
  try {
    var content = {};
       
    content['my_articles_list'] = {
      theme: 'view',
      format: 'none',
      path: 'article-images', /* the path to the view in Drupal */
      row_callback: 'front_article_images_list_row',
      empty_callback: 'front_article_images_list_empty',
      attributes: {
        id: 'article_listing_items'
      }
    };
       
        return content;
  }
  catch (error) { console.log('front_article_images - ' + error); }
}
 
/**
 * The row callback to render a single row.
 */
function front_article_images_list_row(view, row) {
  try {
        
      var image_html = theme('image', { path: row.field_images.src });
      var title_html = '<div class="mobile-title"><div class="inside"><h2><span>' + row.title + '</span></h2></div></div>';
      var date_html = '<div class="mobile-date">' + row.date + '</div>';
      var link = l('<div class="mobile-wrap">' + image_html + title_html + date_html, 'node/' + row.nid) +'</div>';
      return link;
            
  }
  catch (error) { console.log('front_article_images_list_row - ' + error); }
}
 
/**
 * Callback function for no results.
 */
function front_article_images_list_empty(view) {
  try {
    return '<p>Sorry, no articles were found.</p>';
  }
  catch (error) { console.log('front_article_images_list_empty - ' + error); }
}

What I did in this file:

First - I setup display format to none, so I can apply my own custom CSS, instead of using ul li elements, then I added date field and finally applied some custom CSS classes for wrapping results page, here are the CSS styles for them, I added them to drupalgap.css file (but you should probably add them to your theme css file). N.B. CSS styles in this example are not perfect, you should use them just as a reference. 

.mobile-title{
    position:absolute;
    bottom:0px;
    left:0px;
    background:black;
    width:100%;
    height:40px;
    filter: alpha(opacity=90);
  /* IE */
  -moz-opacity: 0.9;
  /* Mozilla */
  opacity: 0.9;
}
.inside{
    position:absolute;
    bottom:25px;
    left:10px;
}
.mobile-title h2{
    line-height: 12px;
    font-size: 12px;
    display: inline;
}
.mobile-title h2 span { 
padding: 0.4em; 
 background-color:orange; 
 }
.mobile-wrap a{
    color: #ffffff!important;
    border-color: #bbb;
    text-shadow:none!important;
    text-transform:uppercase;
}
.mobile-date{
color:orange;
font-size:10px;
position:absolute;
bottom:5px;
left:10px;
}

Make changes in settings.js file

  • Add Drupal.modules.custom['front'] = {}; 
  • Change front page drupalgap.settings.front = 'front';

What's next?

I hope this is a good starting point if you are struggling finding out how to theme your custom frontpage in DrupalGap. Speaking of me - I will fine tune this app to make it look better, and hopefully will move to the stage two - actually finishing it and publishing online. I will keep you updated.