One of our members asked an interesting question about Views.
They had a file field on their user profiles. In that field, the user could upload an image, an audio file, or link to a YouTube video. So far, so good. However, in Views, they only wanted to show that field if it contained a video.
Here's the solution to that problem. We're going to show you how to filter Drupal content based on the type of file that's attached to it.
Views is a very powerful tool that allows you to pull information from your database in many flexible ways.
However, there will be situations where the default options in Views aren't enough. The Views PHP module allows you even more flexibility.
In these two videos, Robert Ring, one of our Drupal teachers, shows you how to re-write a View using PHP.
Alphabetical sorting is one of the most common ways people want to sort content in Views.
You may want to sort many types of content from A to Z, from staff members to business listings.
Here's how to add alphabetical sorting to your Drupal views.
Services is really popular and works with formats such as REST, XMLRPC, JSON and SOAP.
However, when asked about Services during a training class last week, I was realized that the students were asking me because there was little-to-no clear documentation available.
So, I sat down and decided to write a Beginners guide to the Services module.
Here's a 5-step guide to using Services creating a REST API for your Drupal site.
I wasn't sure whether to publish this review or not.
One of our members wanted a really simple shopping cart for Drupal. They found the Basic Cart module and asked me about it.
So, I set up and tested Basic Cart. Everything worked great, until the end when I realized there was no payment gateway. None. Basic Cart is a great little e-commerce store ... except it has no way to pay.
The Quiz module is a sophisticated and flexible way to create quizzes in Drupal.
Quiz has many nice features such as Views integration, a jQuery-based timer, drag-and-drop ordering of questions and the ability to give weighted grades for answers.
Quiz allows you to create questions with multiple formats and has an API that allows you to add more.
If you weren't able to update your Drupal site within a few hours on October 15th, you may be worried about your site.
Even under normal conditions, it's almost never possible to prove that a site is 100% safe.
But by checking your site, you can either give yourself some additional peace of mind, or you can confirm that you were hacked.
However, although Views is powerful, it is too complex for many users. For this reason, Node Gallery remains very popular.
So we've realized that it's time for an updated tutorial that covers Node Gallery in Drupal 7.
Node Gallery is still the easiest way to build a photo gallery in Drupal. It requires very little set-up and almost no configuration.
We're accustomed to the Drupal security team releasing security fixes.
Fortunately, most of the fixes were relatively minor. They either impacted a small group of sites, or they were unlikely to lead to your site being hacked.
Let's take a brief look at the 4 previous Drupal security advisories in 2014:
However, Drupal Commerce is an enterprise-quality solution and a good number of OSTraining members have asked for simpler solutions.
For those members, we often recommend the Payment module, which makes it easy to add e-commerce fields to your content.
Payment supports about half-a-dozen gateways (PayPal, Stripe, iDEAL, Authorize.net, Ogone, Rabo OmniKassa).
In this tutorial, we'll show you how to use the Payment module, together with PayPal.
Over the last few months, Dave Reid, one of the most active Drupal developers, has been giving a presentation called "Future-proof your Drupal 7 site".
Dave talks about decisions you can make now on existing or new Drupal 7 sites to make transitioning to Drupal 8 easier. He comes up with a list of modules that have been backported to Drupal 8. Using those modules means you won't have to re-train your staff for Drupal 8.
Dave also has some recommendation for modules not to use, because they've been replaced by alternative solutions in Drupal 8. Here are 6 modules that may be worth avoiding if want an easier update to Drupal 8 in years to come ...
DrupalCon Amsterdam takes place this week.
Nearly 2000 people are going to be at the venue itself, but even more will join remotely.
If you're sitting at your desk next week and can't be in the Netherlands, there's still plenty of opportunity to join DrupalCon Amsterdam.
Here are three ways you can take part ...
Last year, we wrote about 4 social sharing modules for Drupal: Service Links, Social Share, AddThis, AddToAny.
ShareThis is another useful option for adding Facebook, Twitter and other social buttons to your site.
The ShareThis module is really easy to set up. Here's how the ShareThis module works:
One OSTraining member told us that they had a database error on their site.
Here's the error that was showing:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cache_rules' doesn't exist
Fortunately, a solution was provided on the Drupal forums. However, the solution was an update to the database, and our member wanted some advice on how to run that update.
If you've been to Drupal events recently, there's a very good chance that you've heard the phrase, "Headless Drupal".
The phrase brings up thoughts of dead horsemen and horror movies.
But, is Headless Drupal scary? And what in fact is Headless Drupal?
We're going to answer that question in this blog post. Let's try and understand what Headless Drupal is and who's using it.
Drupal Commerce is popular amongst our members, because it's the most reliable way to build an e-commerce site with Drupal.
Drupal Commerce empowers you to build any type of eCommerce website, making as few hard-coded assumptions as possible about your business needs.
One of our members wanted to create a taxonomy of Countries, Provinces and Districts.
For example, you might choose England, then Yorkshire, then Leeds. Or you might choose Canada, then Ontario, then Toronto. You get the idea.
In this tutorial, we'll use the Hierarchical Select module to make that happen.
There are some sophisticated and flexible ways to add video to Drupal.
But, by far the simplest option is the Video Embed Field.
If all you want to do is easily add Youtube or Vimeo videos to articles, then this module is probably your best option.
Here's how Video Embed Field works:
We recently published a tutorial explaining how to build a business directory with Drupal.
Questions about directories have been a popular topic lately and some of our members have had more advanced questions.
For example, one member wanted to show all of the restaurants in a certain city.
In this tutorial, we're going to use a module called Views Field View to show you one approach to getting that done.
CKEditor is a powerful editing tool that makes content creation in Drupal far more flexible and enjoyable.
However, CKEditor has some drawbacks. For example, CKEditor wasn't originally designed to work with Drupal and doesn't have a way to easily link to other Drupal content.
Linkit is the solution to CKEditor's limited linking options. If you install Linkit on top of CKEditor, it will be a breeze to create accurate internal links.
Here are 3 videos showing you how to use Linkit. The videos do assume that you already have CKEditor installed.
Until now, when people asked us how to handle media in Drupal, we recommended a couple of solutions:
- A WYSIWYG module with the IMCE module
- The Media module
However, lately we've started to experiment with Scald which promises to be a really interesting and powerful option.
Here's our quick-start guide to help you start exploring the power of Scald.
With all the discussion of Drupal 8, we've heard more and more questions from nervous people with Drupal 6 sites.
In truth, the status of Drupal 6 is still in flux. Security plans for Drupal 6 were released last month, but they depend on when Drupal 8 will be released, which is unknown.
So, how can good, honest Drupal 6 site owners know what to do?
Never fear, we're here to help. Here are 8 questions and answers to help you decide what to do with your Drupal 6 site.
It's been 8 months since our last overview of Drupal 8.
A good number of OSTraining members went to DrupalCon Austin or to DrupalCamps this summer and came back with questions about Drupal 8.
So, here's an update on Drupal 8 and when you can plan on using it.
One of the most common questions we get from new Drupal users is, "Which modules do people normally use?"
That's a big question, with over 20,000 modules, but some are far more popular than others.
Webchick, one of the Drupal core developers, has used the statistics available on Drupal.org to make a list of the most popular Drupal 7 modules. This is different from the public stats on Drupal.org module pages, which show the popularity of modules across all versions.
Here's an introduction to the 20 most popular Drupal 7 modules:
Over the last couple of weeks, several different OSTraining members have asked me about creating a directory in Drupal.
I'm going to recommend a 4-step process for creating a basic directory.
Using default Drupal, plus the Display Suite and the Search API modules, we can create almost any type of directory.
Drupal comes with a lot of options. For some users, all those options can be overwhelming.
One of our members asked for our advice on cleaning up the content form so that only the essential options remained.
Here are three steps to clean up your Drupal content form:
If you want a calendar on your Drupal site, the FullCalendar module is one of your very best options. Some of the advantages of the FullCalendar module include:
- It can look as professional as a Google Calendar
- If you've got an existing Google Calendar, you can import to FullCalendar
- FullCalendar makes it easy to move scheduled events; all you have to do is drag and drop.
- You can color code events on many different criteria such as content type, date or taxonomy.
If you are interested in learning about the FullCalendar module, watch our three video introduction below, which is part of our much longer FullCalendar class.