One of our Drupal clients had requested us to look into the innards of their website and see if the site can contain the influx of new users without breaking a sweat. We went into action swiftly and while we were gathering the details of the site, we realized that we need to get the count of all users having a particular role. We used a simple query to get the details of the users. Read on to know how to get the count of all users having a particular role in a Drupal 7 website.
Drupal 7
We had a requirement to bookmark each user account of our Drupal 7 website in iPhone. In order to bookmark user accounts, first we have to save the bookmark name and image for each account. The bookmark image is added as a link to the head tag. The image path should be the absolute path to the image.
"My Drupal 7 view result is displaying a few records multiple times. How can I get rid of these duplicates?". The immediate solution that comes to our mind will be applying GROUP BY or DISTINCT by enabling views aggregation settings and simply remove the duplicate records.
Confirmation form is useful in cases where we do some action that needs confirmation from the user. Drupal provides a function called confirm_form() that provides a confirmation form.
Meta tags are used for page description, ever wondered on how to add meta tags for the custom pages in Drupal 7. Using hook_html_head_alter() or using hook_preprocess_html() we could add Meta tags and title.
If you want to display some custom text related to an entity (which are not part of the entities fields. Eg. Calculated sum based on some values of the fields) in your apache solr search result, you can do it in two simple steps.
Facebook OAuth module helps to extract data from user's Facebook account details and map that user's Drupal account during registration. The user details will be extracted directly from the Facebook account details and user can define the custom field types to be extracted with validations. Validations means the mandatory field info's that should be present in the Facebook account details before extract using the FBoauth API.
In one of the Drupal sites were working on, the members of the site frequently found that the nodes they had created were crashing. They would enter content into the node fields and try to save the node. The node would appear to save with apparently no error message. They found that it was not accessible at all afterwards. This wasn't occurring for everyone. We checked the dblog and we saw that the users were getting the error PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect string value:. Read on to know how we solved this issue.
This article is on how to add images to Amazon S3 in a drupal site(D7) via code. For this, download drupal module Amazon S3 (https://www.drupal.org/project/amazon_s3). The purpose of this module is to get the s3.inc file (the file which define all s3 functions defined in Amazon)
SimpleAds module allows advertisement in Drupal websites. I had a requirement in one of my Drupal sites to add advertisements in the site contents area. I came across a Drupal module- SImpleAds which helped me to solve the fix and the below the details on the configurations to done to use SimpleAds module
An entity is a useful abstraction to make grouping together of fields. Here I am giving you a brief view about how the custom entities created, adding extra fields, adding bundles etc all things attached to entity.
What is htaccess ? The .htaccess file in Drupal is Powerful configuration file for web server. The .htaccess file loaded and executed when Apache server starts. .htaccess file in Drupal is used for varied functionalities such as Authentication, Redirect pages, Rewrite URL ,Directory Index and Limit access etc.
The first thing to get started is a theme folder. In this case, we’ll call it “base_theme.” The only file actually required to create base_theme is an .info text file which is saved as base_theme.info
In Drupal there is a lot of interesting modules. One of interesting module is the quiz.module. It is a framework for create interactive quizzes for your visitors. Also it allows for the creation of questions of different types, and to collect the questions into quizzes.
Effectiveness of digital marketing has always been a controversial subject. For some businesses, it is a winning proposition while for others, it is a loss making machine. The reason for this may be the perspective with which one approaches digital marketing. It is like a weapon which can be used to conquer your enemy's territory. If you use it well, then you will win. If not, it can back fire, that too dramatically.
Today, people are looking for free and easy to use content management systems to run their website. Drupal is an open source content management system (CMS) which help users create, structure, and publish content. From a company perspective the priority will be on saving costs and shifting attention back to customers. Here is a useful checklist for developers, to meet the above needs for building a small business website without compromising the quality.
In Drupal 7 by default we can't send html mail, since Drupal will convert all emails to plain text before sending. This could be overridden using Drupal 7 htmlmail contributed module. We may also need i>mailsystem module for implementing htmlmail, which is a dependency. The module also give html mail template, which could be customized as well in same way of theme templates.
We had faced an issue with invoice sent by authorize.net, for anonymous purchase a product in ubercart in one of our Drupal 7 site. After the purchase is completed, the user receives an invoice from authorize.net. But if the user is anonymous, the invoice's customer id is set as zero. We had sorted out the issue and fixed it. Read on to know how to solve this problem
This article describes a checklist on some of the important data to be collected before migration and how to collect the data. This may seem like a trivial task but just like it is important to have a manual for an electronic device before you take it apart and put it back, it is important to have a technical manual of the site. If it is a complex site, with a lot of data, then this is mandatory.
This is an article about how you can create a custom color switching theme with the help of Drupal 7 color module. Color module is a Drupal core module comes with Drupal and you can use this module to colorize your theme. Garland is a Drupal theme which uses color module to colorize its various content. If you want to know more about how to create a colorized theme by using Drupal 7 color module read on.