12/20/2023 - 23:44

When we was implementing a customer relationship management for a local client using Drupal, we faced this challege:

  • The client wanted to manage records of his patients with many treatment images captured by his iPhone
  • Each iPhone images can be large, 5 to 10MB depending on resolutions
  • While we can't hold so many large images to the web server, the disk space will soon run out

So we have to find a way to resize and compress images quality on the client side before uploading so they won't place burdens to the web server.

After googling around, we found a tip on this thread mentioning DropzoneJs. So w...

09/15/2023 - 04:32

On our directory theme BizReview showing listings and their reviews, we need a rating mechanism so users can leave their votes on comments and the parent listings will calculate average ratings.

BizReview rating in Drupal

BizReview rating in Drupal

We believe this rating mechanism is popular among listing and shopping websites, so we wrote a tutorial for setting it up on Drupal 9 (and probably Drupal 10).

The good news is this kind of setup is quite straightforward in Drupal using Fivestar module.

1. Install Fivestar and its...

06/08/2023 - 06:48

Do you feel annoying when CKEditor in Drupal keeps on changing your HTML code?

Sometimes you have HTML code that must be preserved in order to work. You are as the administrator, have no problems with code security. But when you paste your code, CKEditor in Drupal filters or alters your code structure, and it does not work as expected.

Some of the examples of HTML code altered:

  • <a> can't wrap around <div>
  • <img> tag can't stand alone, it is wrapped with <p>
  • empty <span>, <i>, <div> is not allowed
  • and etc ...

The workaround is quite simple:

  1. Please browse Admin - Configuration - Content Authoring - Text formats and editors, select + Add text fo...
08/25/2021 - 22:44

On our theme BizReview and Listiry, now available in Drupal 9, we have to solve the common problem with displaying nodes on maps.

Here are what we have used in our themes and have verified it is working. Please see the result as below:

Demo of maps on Drupal

Now please follow our tutorial on how to display maps on Drupal with Geofield, Address and Geocoder modules:

1. Install Drupal and Geofield

Install Drupal core:

composer create-project drupal/recommended-project my_site_name_dir

cd my_site_name_dir

Install...

04/25/2021 - 03:27

Slideshow is one of the most essential part of any Drupal websites. It is basically the first thing that attracts your eyes when you visit a website. It is large enough and it has many cool transition effects that you can't help take a look at it. Having a long time working with Drupal, I collect and present in this article some of the best Drupal slideshow modules.

There are alot of Drupal slideshow modules, however, I only pick the modules which are in high usage, under active development and support Drupal 7. I downloaded and tested them all to see what are pros and cons of each module.

Now these are best Drupal slideshow modules in my opinion: 

1. PhotoSwipe

In the mobile first trend nowadays, being responsive is not the favorable. When we developed a local project named Ecoparker and found out 70% traffic is from mobiles.

It requires us to choose a slider module that must be mobile friendly.

PhotoSwipe is the answer, it is very fast, excellent UX on mobiles and s...

12/11/2020 - 04:23

On a local project with the business directory site Ecoparker, we experienced the struggle of displaying a long list of products in small display screens ie mobiles.

On this particular landing page, showcasing Solforest a vertical forest real estate project, we need to present 10 types of apartments in two categories with sizes and selling prices.

Solforest list of apartments

On another page, we have 6 categories, each category has more than 10 products. If we just display them all o...

01/03/2020 - 00:22

Ok, the problem is clear:

  • Your composer based Drupal site puts your code base to the /web folder
  • You are using a shared hosting which maps your primary domain to /public_html, and you can't change that

Now your users will have to browse your site as http://example.com/web . And it is not cool.

So how to serve your site from the subfolder /public_html/web but removing the /web suffix so it becomes transparent to users?

Here are the steps, as I learned from this thr...

10/28/2019 - 04:43

Lazy load images in Drupal with BLazy

Recently, we involved in a local project with Ecoparker.com. It is a directory of restaurants, cafes, entertainments, services, real properties ... in Ecopark Hanoi, Vietnam. This site is based on our best selling directory theme BizReview.

On this site, there is a page which lists all kindergartens around the area. It has 20 listings and will continue to grow. It is a very typical page built with Drupal views.

...