When developing a website we might often come across situations where we have to limit the entry into each text fields to a certain type. One of the common scenarios we run into when developing Drupal websites is to limit text fields to accept only numbers as its input. If you want to know how to limit a text field to accept only numbers as input then read on to find out more.
Drupal Technical
In one of my recent Drupal projects I needed to add some extra classes to the body tag. Usually classes are added to the body tag in one of our template file namely html.tpl.php. The classes can be added via an implementation of hook_preprocess_html. Now let's see how it can be done.
In one of our Drupal projects we were requested to create a Drupal module through which you could upload and extract a zip file and store the extracted files into the files directory in the Drupal site. If you are faced with the same task and wanted to know how to unzip a zipped file from within Drupal.
If you are a Drupal Developer you will often encounter situations where you have to use the node_save() function to add a new node to your Drupal site. Drupal does not need you to specify the nid in the standard node object. However there will be situations where you need the nid of the saved node for performing additional operations. If you are looking to know how to get the nid from a newly added node using node_save() then read on.
Most Drupal developers know about writing theme functions in Drupal 7. Likewise we can create theme templates too. However Drupal developers rarely create their own templates. Read on to know how to create a custom template in Drupal 7.
Triggers and Events are very important concept in the Drupal world. If you want to get your hands dirty tweaking Drupal or dive into Drupal development or simply configure a Drupal website properly you need to be familiar with the Drupal Actions and Triggers. If you want to know more about Drupal Triggers and Actions then read on to find out.
We had discussed about the basics of Drupal Actions and Triggers in our previous article. Have a look at the article How to create Drupal Triggers and Actions - Part I if you have not done so. In this article we are going to show you how to define Actions and Triggers in code.
In Drupal 7 Image module offers an image field which makes available an image widget for file fields that can be added to content types. This will allow for upload of images to the image field which can then later be processed by the image module and be presented using the different image styles as configured. This means that image module should have the ability to process files uploaded using this field.
A Drupal user using running a Drupal website in another language encountered a situation where the Double-quote (“) character is retained in the URL aliases generated by the Drupal Pathauto module. If you happen to be running a Drupal website in a language other than English and encountering such characters in the alias generated by the Drupal Pathauto module then proceed down below to know the solution.
A number of Drupal users using the Drupal Pathauto module in their Drupal site had reported that Google was indexing node-urls of the pages of their Drupal site instead of the url-aliases. If you are a Drupal user facing the same dire situation in your Drupal site then continue reading to know the solution to the above issue.
A number of Drupal users were encountering a scenario in their Drupal site where the Drupal Pathauto automatic alias checkbox was coming up on all pages by itself. If you are a Drupal user facing the same situation in your Drupal site then read on to find out to know the cause of the issue and the easy workaround for the issue.
A number of Drupal users were facing a scenario in their Drupal site where the Drupal Pathauto automatic alias checkbox is visible to anonymous users. If you are a Drupal user facing the same scenario with Drupal Pathauto in your Drupal site then read on to find out the solution.
A number of Drupal users wanted to know how to hide the URL path settings fieldset in a Drupal 7 website. If you are a Drupal user facing the same question in your Drupal site with your Drupal Pathauto module even after using hook_form_alter then read on to find out the solution.
A number of Drupal users were encountering a "PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT * FROM {menu_links}... " error message when clicking on the Drupal Pathauto Patterns tab of their Drupal installation. If you are encountering the same situation in your Drupal site then read on to find out the solution.
Many Drupal users have wanted to know how to prevent the path alias from being changed when editing the title. If you are facing issues when the path alias changes after editing the node title in your Drupal module then read on to find out the solutions.
A Drupal user wanted to know how to disable Pathauto for migrated nodes in their Drupal site. If you are a Drupal user who is facing the same issue while migrating nodes in your Drupal site and would like to know how to disable Pathauto for migrated nodes then read on to know the solution.
Multisite concept allow us to run multiple sites in single drupal core installation . Each site in the multisite will have it's own modules and themes as well as files folders. Setting up multiple sites like this will save on patch administration, permissions administration, setting up APC etc. Follow the below steps for running multiple sites in single drupal installation.
If you want to send out mails from your Drupal website hosted on an Amazon AWS you would want to install a mail server on the AWS instance. Sendmail is an easy mail server to install and set up. Read on for knowing how to install sendmail on your Amazon AWS if it was set up using a Bitnami AMI based on Ubuntu.
One of the errors we come across in a Drupal 6 installation is "htmlspecialchars() expects parameter 1 to be string, array given in /includes/bootstrap.inc on line 860". This is an issue with the Internationalization and Taxonomy translation modules. This issue can be fixed by adding a line in the bootstrap.inc file. If you want to know how to solve the warning, continue reading.
Drupal uses a variety of caching systems to improve the site performance. However in certain scenarios they may not be sufficient and more powerful external caching mechanisms are required to improve the performance. One such mechanism is memcached. If you want to know how to install memcached in CentOs then read on to know the steps.