Latest posts

Browse topics

How To Create Drupal Views Distance Filter using Location module

Drupal is a popular content management system that allows users to create complex websites with a wide range of features and functions. One of the most useful features of Drupal is its ability to create views, which are customizable displays of content that can be filtered and sorted in a variety of ways.

One useful type of filter is the distance filter, which allows users to filter content based on their proximity to a particular location. In this article, we will explore how to create a Drupal views distance filter using the Location module.

Drupal Distance Block

Drupal Distance Block

As you can see in above screen - I have listed Nearby Tourism sights in right sidebar displaying thumbnail, title, distance and category.

If you are looking for similiar functionality, here is what you will need:

  • Drupal
  • Views module
  • Location module
  • Gmap  module (recommended)

Enable Location module to be able collect geo data, be sure you enable it for your content type as well. You might want to use Gmap module as well for displaying geo data on Google Maps.

Now once you have some content type with Location enabled, and you have entered a few nodes with location information, you can create a "Nearby locations" view:

Drupal views: Nearby Locations

Drupal views: Nearby Locations

As you can see this is pretty basic Drupal view - though to make it work, you will need to pay attention to Contextual Filters, Filter Criteria and Sort Criteria.

Contextual Filters

Content:Nid

  • Provide default value: Content ID from URL

Under More tab:

  • Check next to Exclude

Drupal Contextual Filters

Drupal Contextual Filters

Filter Criteria:

Add a new filter: Location: Distance/Proximity

  • Origin: Node's Latitude / Longitude from views nid argument
  • Node ID argument to use: Content Nid

Drupal views distance filter

Drupal views distance filter

Sort Criteria

Add a new criteria: Location / Proximity (asc)

  • Change order of sort, so Location / Proximity filter is first of order

Now save your view and add a newly created block to your theme. 

Creating a Drupal views distance filter using the Location module is a useful way to allow users to filter content based on their proximity to a particular location. By following the steps outlined in this article, you can easily create a Drupal view with a location filter that meets the needs of your website or application.

Alternatively, consider hiring me as your Drupal website developer.

Hotel Hesperia Sant Just in Barcelona Review

We stayed at this hotel about a month ago, during our one week Catalonia trip, in which we actually drive even to Andorra, so this hotel was our last hotel in Spain before departing back to Georgia.

To book this hotel we chose hotwire.com (they offer secret deals - you kinda buy a cat in a sack - but you don't need to worry about a bad product, you could get - there are major hotel brands, that are not willing to tell others - they are selling it low). After booking a hotel on hotwire - we got this one, located somewhere close of driving in to Barcelona from Andorra, and next to the road heading to Barcelona El Prat Airport.

We got this hotel for 2 nights for price of EUR 113.50. 

Result - see it yourself:

Hesperia Tower Barcelona

Hesperia Sant Just Barcelona

Hesperia Sant Just

Hesperia Sant Just

Bathroom at Hesperia Sant Just

Bathroom at Hesperia Sant Just

Bedroom at Hesperia Sant Just

Bedroom at Hesperia Sant Just

Bedroom at Hesperia Sant Just

Bedroom at Hesperia Sant Just

Mini Lounge at your room at Hesperia Sant Just

Mini Lounge at your room at Hesperia Sant Just

Flat Screen TV at Hesperia Sant Just

Flat Screen TV at Hesperia Sant Just

About Hesperia Sant Just hotel

Charming and stylish, the Hesperia Sant Just hotel in Barcelona has everything you need for a memorable stay in this fantastic city! Whether visiting for business or pleasure, you'll love our quiet location that is convenient to the airport and city center via public transportation. The new tram stops just 200 meters from the Hesperia Sant Just and can take you to the tour bus in just 20 minutes. 

Guest rooms are spacious and stylish and feature the finest amenities including a plasma screen TV, free wireless Internet access, and pillow à la carte menu. A private Conference Center at the Hesperia Sant Just hotel offers 10 meeting rooms filled with natural sunlight and the latest technology.

Our Alambí Restaurant is renowned for its wood-fire oven in full view of guests. Enjoy delicious old-fashioned homemade cakes as well as a complete wine list. The cozy cafeteria provides healthy à la carte meals and the piano bar features live music Mondays through Fridays.
 
Frederic Mompou, 1. 08960 Sant Just Desvern.Barcelona (Spain)
Tel. +34 934732517 
Reservations:  +44 (0)870 80 71 235 
Email: hotel@hesperia-santjust.com 
 
 
 

Drupal App - How to Make a Native Android App Using DrupalGap

It has been a while since I decided to build my first Android app powered by Drupal.

Actually, I haven't built any other kind of app yet. But I have investigated a few options though.

My findings to the day are DrupalGap.org

I'm still investigating this tool, so for reference, I will list information from drupalgap.org. In the coming days/weeks and months, I will do my best to complete my first App built on the surface of Drupal. I'm planning to make a simple travel app, with geolocations and other useful tools, that a travel app could use.

I'm not sure where my path will lead me - but I'm confident I to make this journey using drupalgap.org

What is DrupalGap?

An Open Source Mobile Application Development Kit for Drupal websites.

DrupalGap has two parts...

  1. Drupal Module
  2. Mobile Application Development Kit

The Drupal Module opens up communication possibilities between a mobile app and the website. The Mobile Application Development Kit is used by developers to create custom mobile applications.

How does the module work?

The DrupalGap module uses the Services and Views Datasource modules to help mobile apps communicate with a Drupal website using JSON.

How does the mobile app dev kit work?

The DrupalGap mobile application development kit uses jQueryMobile to build the user interface and PhoneGap to compile the App for installation on mobile devices.

How does PhoneGap work?

PhoneGap takes HTML, CSS, and JavaScript and compiles it into a mobile application for iOS and Android mobile devices (and many others).

PhoneGap provides access, via JavaScript, to mobile device features such as the Camera, GPS, File System, Contacts, Compass, Accelerometer, etc.

This means, if we know the basics of web development (html, css, javascript), then we can build mobile applications. This also means, our single set of code (HTML+CSS+JavaScript) can be used across multiple mobile platforms.

1. Set up a Drupal 7 Website

To build a mobile application, we first need a Drupal 7 website. For starters, we'll want our Drupal 7 website to be available online. This means, we should be able to visit the website online by using our mobile device's web browser.

Chances are if you are reading this, you already have a Drupal website online (or several). If that is the case, go ahead and jump to step #2. If you are new to Drupal, don't worry, there are plenty of great resources on getting a Drupal 7 website up and running.

2. Enable the DrupalGap Module

For our mobile application to be able to communicate with our Drupal website, the DrupalGap module needs to be enabled. Please refer to the DrupalGap Module Documentation for more information.

3. Set up a Mobile Application Development Environment

Since DrupalGap utilizes the power of PhoneGap, we need to set up a PhoneGap mobile application development environment for DrupalGap, before building and testing our mobile application.

4. Done!

We're now ready to run our mobile application!

If you haven't already, we'd recommend completing the "Hello World" for DrupalGap next. Otherwise, feel free to head back to the Getting Started Guide for various topics on developing mobile applications with DrupalGap.

Hire me for your upcoming Drupal website or native app project!

My Barcelona Travel Guide - La Rambla, La Boqueria Market, Park Guell and even La Sagrada Familia

This happened at the last days of October 2014, when after a week long travels around Catalonia we finally returned back to our starting point - Barcelona.

And so we decided to visit some local attractions. We all probably are familiar that one of the must have attractions in Barcelona is La Sagrada Familia cathedral, though we find this famous attraction, we refused to stay on a very long queue to get there in.

Another attraction we decided to visit was something  Park Guell (again, though we find it  - there was no parking place to park our car, and a person guarding parking lot - ordered us to drive away - we did, and didn't returned. 

We had a chance to visit a market called La Boqueria, and most pictures you will find in this article, has been made there. In short  - that's our Barcelona experience.

Bicycles on streets of Barcelona

Bicycles on streets of Barcelona

Souvenir shops

Souvenir shops

La Boqueria Market in Barcelona

La Boqueria Market in Barcelona

At La Boqueria Market in Barcelona

At La Boqueria Market in Barcelona

Fresh juices at La Boqueria Market in Barcelona

Fresh juices at La Boqueria Market in Barcelona

Olives at La Boqueria Market in Barcelona

Olives at La Boqueria Market in Barcelona

La Boqueria Market in Barcelona

La Boqueria Market in Barcelona

La Boqueria Market in Barcelona

La Boqueria Market in Barcelona

La Boqueria Market in Barcelona

La Boqueria Market in Barcelona

Kakis at La Boqueria Market in Barcelona

Kakis at La Boqueria Market in Barcelona

Eggs at the market

Eggs at the market

Cheese stand

Cheese stand

Some street art in Barcelona

Some street art in Barcelona

El Gran caffe in Barcelona

El Gran caffe in Barcelona

Queue at Palau Guell museum

Queue at Palau Guell museum in Barcelona

Old-timers getting fun near La Sagrada Familia

Old-timers getting fun near La Sagrada Familia

Queue to La Sagrada Familia

Queue to La Sagrada Familia

Author of this blog captured near La Sagrada Familia

Author of this blog captured near La Sagrada Familia

La Sagrada Familia from distance

La Sagrada Familia from distance

A verly long queue wanting to enter La Sagrada Familia

A very long queue wanting to enter La Sagrada Familia

About Park Güell

The Park Güell is a public park system composed of gardens and architectonic elements located on Carmelo Hill, in Barcelona (Spain). Carmelo Hill belongs to the mountain range of Sierra de Collserola — the Parque del Carmelo is located on the northern face. Park Güell is located in La Salut, a neighborhood in the Gràcia district of Barcelona. With urbanization in mind, Eusebi Güell assigned the design of the park to Antoni Gaudí, a renowned architect and the face of Catalonian modernism. The park was built between 1900 and 1914 and was officially opened as a public park in 1926. In 1984, UNESCO declared the park a World Heritage Site under “Works of Antoni Gaudí”.

http://en.wikipedia.org/wiki/Park_G%C3%BCell 

About La Boqueria

The Mercat de Sant Josep de la Boqueria, often simply referred to as La Boqueria, is a large public market in the Ciutat Vella district of Barcelona, Catalonia, Spain and one of the city's foremost tourist landmarks, with an entrance from La Rambla, not far from the Liceu, Barcelona's opera house. The market has a very diverse selection of goods.

http://en.wikipedia.org/wiki/La_Boqueria

 

About Sagrada Familia

The Basílica i Temple Expiatori de la Sagrada Família  is a large Roman Catholic church in Barcelona, Spain, designed by Catalan architect Antoni Gaudí (1852–1926).

Although incomplete, the church is a UNESCO World Heritage Site, and in November 2010 Pope Benedict XVI consecrated and proclaimed it a minor basilica, as distinct from a cathedral which must be the seat of a bishop.

Construction of Sagrada Família had commenced in 1882 and Gaudí became involved in 1883, taking over the project and transforming it with his architectural and engineering style, combining Gothic and curvilinear Art Nouveau forms.

Gaudí devoted his last years to the project, and at the time of his death at age 73 in 1926 less than a quarter of the project was complete. Sagrada Família's construction progressed slowly, as it relied on private donations and was interrupted by the Spanish Civil War, only to resume intermittent progress in the 1950s.

Construction passed the midpoint in 2010 with some of the project's greatest challenges remaining and an anticipated completion date of 2026, the centenary of Gaudí's death.

http://en.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia

TBSC consulting - upgrade from Joomla to Drupal

TBSC consulting approached me for help - to help them out to secure their existing site, which was built on Joomla.

As a true Drupaller I offered them - can we switch CMS from Joomla to Drupal? And they agreed. Here is what we got:

TBSC Consulting Front Page

TBSC Consulting Front Page

This site is built with help of some standard Drupal modules, and is availiable in two languages (English and Georgian)

TBSC Georgian

TBSC Georgian

Although work on this site didn't request a lot of creativity - we were doing just migration of site, technical things were pretty harsh - main problem was to extract content and users from existing Joomla site, and then import it to Drupal site. But before that - here is a scenario which led me to suggest Drupal over Joomla:

So I got another Joomla site request to perform a Joomla major Upgrade from 1.5 to 2.5. 

I thought, hell, why not - let's fix this site, by not converting it to Drupal (As I usually do), but let's stay on Joomla.

Site works, there has been no hackers yet. So I started to do Joomla upgrade. At first I made a minor upgrade, to update Joomla database to latest stable. I was reading a lot Joomla developer forums and blogs, what are they suggestions. In order to perform major upgrade for Joomla, you have to install some mystic upgrade extension... Ok, i did, I followed to all the best practices from Joomla community for upgrading Joomla site... And then.. It sucks.

There is no native way to upgrade multilingual support in Joomla. I spent 2 days figuring out, how the hell get that site back working with multilingual, and no progress. 

Joomla is using some really fishing plugin for i18n, called joomfish... Name says everything - it's some fishy plugin...

So screw you Joomla - I set up a new Drupal site, added a Joomla migration module, to import all Joomla articles to site, recreated menus, re-themed theme in less than 6 hours in Drupal.

Some might say - that's because I'm working with Drupal on my everyday basis, that's right. But for me it seems strange - it's easier to perform Joomla to Drupal convert, than perform Joomla - Joomla upgrade.

I have written a longer article of how to perform Joomla to Drupal, where (if you are interested) you will find more about technical stuff.

About TBSC Consulting

TBSC Consulting is a boutique management consulting firm located in Tbilisi, Georgia.

TBSC helps organizations make better strategic and tactical decisions by performing detailed analysis needed to support those decisions. Hence our tagline: Better Decisions Through Analysis. The steady increase in the scope of our services, clients and projects demonstrates the high value of our advisory services to local and international clients.

Over the past ten years, TBSC has helped nearly 100 organizations to make better decisions including the largest Georgian banks, highly diversified Georgian companies, foreign investors, international financial institutions, the Government of Georgia, diplomatic missions, donors and non-governmental organizations. TBSC’s President and Founder has advised senior managers, boards of directors and supervisory boards in North America and Western, Central and Southeast Europe for more than 25 years. Local staff represent the cream of graduates from Georgian and Western universities and have significant experience of working with Georgian and international clients. Through a strategic alliance with Larive Group, TBSC successfully bridges the link between local and international companies in Western and Eastern Europe and Asia. This way, TBSC not only assists western companies in expanding into the Georgian market, but also helps Georgian companies expand into other markets, find foreign partners and benefit from modern technologies and know-how transfer.

Learn more about TBSC Consulting: www.tbsc.ge