Latest posts

Browse topics

How To Insert Node Reference in Content Using Views

I this article I'll cover some details on how to programmatically reference nodes in content using Drupal views.

Such behavior I've already implemented in this blog, see for example 83 reasons to Visit Georgia This year article to see it in action. Today I was working on one of my side projects - a laptop buying guide - laptop500.com and decided to implement a new feature - best selling items of the month, by programmatically referencing laptops (nodes) from archive.

Here is how - at start you will need to download and install references module, then visit Content type you would like to add such behavior and under manage fields (admin/structure/types/manage/article/fields) add a new Node Reference field

Node Reference field

Node Reference field

I will set widget to Auto complete text field as later it will be much easier to enter just first letters of title to find and reference nodes.

In the next window (Field Settings) select Content types that can be referenced, articles for example

In the next window, under REFERENCED ITEMS FIELD SETTINGS Number of Values, make sure you select unlimited

Next go and create a new article to whom you just add a new node reference field, you should see new field enabled and you could start referencing nodes

Referencing nodes in Drupal

Referencing nodes in Drupal

Now, after you will save your content all referenced items will be listed unformatted under content area, you could leave this as it is, or you could use manage display section from content type and hide referenced item field, and instead build a new views block to style those items

Referenced items under content

Referenced items under content

I'm going to hide default display and build a new views block. 

Create a new view, add Contextual filter nid, and add Relationships - referenced nodes, then add your fields and make them related to relationship, then just put block in your content area. 

Node reference views display using relationships

Referenced nodes displayed as views block

Referenced nodes displayed as views block

See live demo here: Top 20 Best Selling Laptop / Notebook Computers in April 2017

Hiking Route in Georgia - Norio Village - Martkopi Monastery

Hiking from Norio village to Martkopi monastery is about 10km long distance (forth and back), best done in Spring, Summer, or early Autumn. The route is pretty steep, though covered with asphalt, there are parts of the damaged surface and some agility is needed. 

Update: We originally did this hiking path back in 2017. in 2020 there is a new asphalt road built reaching the monastery complex

The route offers a kind of Wilderness in Georgia views, with ruined bridges, tumble asphalt, and livestock with a really nice Martkopi monastery at the end of the route.

Tip: You could get to the Norio village just for 1.5 GEL in about 30 minutes from  Samgori metro station in Tbilisi

We decided to take this hiking route at the end of February 2017, here are a few shots from our route

At the start of route in Norio Village

At the start of route in Norio Village

It was a nice and sunny Saturday in February 2017. With help of Google Maps we started our route just after left marshrutka

First obstacles - mud puddle

First obstacles - mud puddle 

It was a good test for my Aldo leather shoes I bought in NYC few month before.

It also reminded me another hiking route we did and failed to complete because of landslides in Tbilisi - Failed attempt to complete Tskneti - Turtle lake hiking route

Livestock

Livestock

It wouldn't be Georgia without cows crossing your path

View towards Martkopi monastery

View towards Martkopi monastery

It will ask about one more kilometer to reach our final destination - Martkopi monastery, and that will be the toughest mile (kilometer). As snow is still keeping in the upper ranges of mountains - the rest of the path is kind of mud puddle hell.

We did it - at top at Martkopi monastery

We did it - at top at Martkopi monastery

Yes, it's time to buy new Aldo shoes.

View near Martkopi monastery

View near Martkopi monastery

This was an intermediate hiking route, but I guess it would be easy to handle in Spring (after the snow has melted), Summer, and early Autumn. In total (forth and back) it took us about 4 hours to complete this route and we had a very good sleep at night

How To Remove HTML Elements From Drupal 7 Feed

In this article you will learn how to style RSS feed in Drupal 7 (not sure, but most bellow written should apply to Drupal 8 as well)

I'm using RSS feeds to power up e-mail newsletters, see How To Sync Drupal RSS Feed to Mailchimp, and everything would be fine, except I had to stop automated email marketing because of amazon affiliate links included in feeds, which is against Amazon Associates TOS. 

If you are sending out RSS feeds via email and you are not concerned breaching some rules with links included, this article is not for you, but if you are on Drupal, using Amazon Associates for product reviews and sending out e-mail newsletters powered by RSS, keep reading.

Solution turned out much easier than I thought at start.

Visit your content type, under Manage Display scroll down to Custom Display settings and enable RSS feed

Custom Display Settings for Drupal 7 Content types

Custom Display Settings for Drupal 7 Content types

Next under RSS display settings manage fields you would like to keep, and set body to plain text (or some other predefined text format)

Rss Display settings for Drupal

Rss Display settings for Drupal

For powering Mailchimp newsletters I'm using a custom built RSS view

Add a Feed view to default content view (you can use some of your existing views, for example frontpage, or create a new content view with a feed display)

Feed settings:

  • Path: rss.xml

Format:

  • Format: RSS Feed
  • Show: Content: RSS

Now make sure you change content display settings to RSS you enabled at content type manage display section (see above). Save your view and here you go, you just stripped out all html elements from your feed. Now, if you want to keep some html elements like line breaks or paragraphs and most probably images, you should go to text format settings and enable custom html elements for plain text. 

As I'm using several RSS feeds, with just one stripping out <a href> attributes, I created a custom Text format especially for these kind of feeds - Amazon RSS Feed.

Review of Mintos Peer to Peer Lending After One Month of Investing

End of the February 2017, marked one full month since I've been investing to Mintos peer to peer lending platform. In this article I'll share some of my findings.

The idea to invest in Mintos Marketplace first arise at the start of 2016, when I was looking for a passive investment opportunities in Georgia (country). Back in these days a newly built platform popped up on my radar, see: Invest in Georgia - Peer-to-Peer (P2P) lending - Mintos.com

Both individuals and entities can invest through Mintos. Individual investors must be at least 18 years old, have a bank account in the European Union or third countries currently considered to have AML/CFT systems equivalent to the EU, and have their identity successfully verified by Mintos. At the moment, US citizens or taxpayers cannot register as investors at Mintos.

Affiliate link here: Signup to Mintos.com here. By using this affiliate link for registration both you and I will receive — 1% of our average daily balance which should be paid in 3 installments for the first 90 days.

Now I was slow on actually starting to invest there for about 8 months, when finally after the New Year, I made a resolution to save million dollars until I will turn 60, see: Road To Million Dollars in Saving Account, my goal for 2017 is to invest about $8,561 during several batches, and different investment portfolios, with peer to peer being just a part of the broader portfolio.

In January 2017 I deposited first amount on Mintos. See: My Start at Investing on Mintos Peer to Peer Lending Platform: Depositing Funds

As I'm located in Georgia, while Mintos Marketplace default EUR bank account is located in Latvia, I was offered to deposit funds in GEL currency to Paysera at local Georgian bank (Liberty) which then is deposited to Mintos Marketplace. In January Mintos platform introduced - currency exchange, at start for free, then it increased to 1% fee and as on March 1st even to 3.5% for EUR/GEL or GEL/EUR currency exchange. 

In total I've deposited GEL 3300 (EUR 1238 / USD 1305) in three batches - at the end of January, at the start of February and in the middle of February. 

My investment strategy

I invest in loans only with buy back guarantee, which means, at least theoretically, that in case if loans go past due, loan originator would buy back bad loans, helping investors to avoid losing money. I tend to invest in short (30 day) loans in Georgia.

In February I had following currency portfolio: 579.53 EUR and 1,665 GEL, if exchanged forth and back, that would mean I have split in half my initial GEL 3300 deposit. In currency exchange fees I've paid GEL 3.65, which equals to about EUR 1.41.

Investments in Georgian lari

Most of the loans in Georgian lari have been late

Investments in GEL

Investments in GEL (as on March 1st, 2017)

Although I bought first short payday loans already at the end of January, I didn't received a single payment in February. Now speaking about investments in GEL currency, there were two loan originators issuing loans in GEL - Creamfinance and Lendo. I invested GEL 1300 in loans issued by Creamfinance - and all of them were late. 

Seems some shift have happened on platform, as Creamfinance stopped issuing new short day loans in GEL currency, instead Lendo pushed a massive amount of GEL loans, offering high 17% annual return. 

I don't tend to invest more than 2,000 GEL as I wouldn't call lari a strong currency, see: My Savings Report January 2015 - GEL Loses It's Value Against USD For 14% Since September

Now, as I told - 0 earnings from lari in February, seems I will need to wait until April (earliest) to see how buy back is actually working. With delayed interest rates it still should be profitable. 

Investments in EUR

Before investing both in EUR and GEL I made some calculations with what to expect during February. I was looking for about GEL 16.2 and EUR 4.5. At the end of the month I got flat 0 in GEL and humble 0.82 EUR. Not at all what I was looking for. 

Investments in EUR (as on March 1st, 2017)

Investments in EUR (as on March 1st, 2017)

In mid February a major push happened with Georgian loans, Creamfinance halted short pay day loans in GEL, while Lendo exchanged most of it's loans from EUR to GEL, pushing investors to exchange EUR to GEL, though offering a really tempting 17% annual return. Short day loans from Georgian in EUR currency just disappeared. I was left with no other option as to look on other "markets" beyond Georgia and extended my limit from 30 day loans to 3, 6 and even 12 month loans. Yes, the yield decreased as well from some 11.2% to 9.5% for Banknote pawnbroking loans and 8% for Mogo car loans.

Martkopi monastery

Martkopi monastery complex is located some 30km from Tbilisi, Georgia. This place is best reached by car, but some could get here by hiking too, see: Hiking Route in Georgia - Norio Village - Martkopi Monastery

We first discovered it the end of February 2017 with one goal - to make stunning photography, as I've seen some really nice shots from this place, the truth turned out to be a little bit complicated, it took us about 5km hiking (each way) from Norio village, and once on site, I did find it hard to make that stunning photography. But here is what I think could work - there is another tower atop of Martkopi monastery, take that extra mile and you could produce nice aerial photography or use a drone.

Update: We returned here again in 2020 and this I was equipped with a DJI Mavic mini drone, and I managed to take some cool photography and video

During our latest trip to the monastery, we met priest Dato, with whom we are now friends on Facebook. We have been told that the place shelters about 100 people, disabled persons, and homeless people. Now, that's the true spirit of a church.

Martkopi monastery complex

Martkopi monastery complex

See that tower in the background? That's the place you should climb to make that special photo if you are not among lucky drone owners.

Martkopi church

Martkopi church

That's the best I could frame this time - the object is too close, so you are left wither using a wide lens or panoramic photography technique.

Here is some information about Martkopi monastery

Martkopi monastery was founded by father Anton of Martkopi in the 6th century AD. He spent the last 15 years of his life there. He lived as a hermit, what is implied by the "of Martkopi” designation in Georgian. From this designation came the name of the Georgian village Akriani, which initially was called Martodmkopeli and later Martkopi.

The monastery itself is situated on the most beautiful slope of Mount Ialno. The main building is the church of the Divine-Made Icon. The remains of an ancient foundation indicate that on the place of the contemporary cathedral there was an ancient cathedral of greater size, but for some reason in was destroyed.

On the threshold of the XVII-XVIII centuries it was reconstructed and the belfry, which was constructed in 1629 by master Akhverd, belongs to this period. In the XVII century the ancient frescos were destroyed and in 1848-1855 under the leadership of Ivane Arjevanidze, the monastery was restored.

For a long time, a Divine-Made image brought by St Anton of Martkopi from Edessa was stored at the monastery. But in 1395 it was lost during the Tamerlane invasion. The most sacred place of the monastery is the tomb of St Anton of Martkopi, which has been preserved to this day and is considered miraculous. East of the monastery there is a tower where evidently resided the saint.

Inside church

Inside church

A chamber with skulls and bones

A chamber with skulls and bones

I wouldn't say I'm a huge admirer of things like that, but I did find it interesting seeing skull and bone chamber for the second time in a short time, see: Green (Mtsvane) Monastery