dblog is one of the handy features of Drupal. It's a core module that monitors your system, capturing system events to database (or to *nix syslog with syslog module). This is useful for site administrators who want a quick overview of activities on their site. It also records the PHP warnings and notices. Notices are often trivial and they could be ignored from logging, IMO.
While it is essential to keep your Drupal site free from throwing any PHP notices, but in the current trend where most of the Drupal 7 modules are in beta / pre-beta stage it has been hard to ensure.
Code in your database can not be version controlled and is also harder to find in general later on.
Eval()'d code is much slower than something hardcoded in a file.
If there is an error somewhere in that code, you will get a very unhelpful error message (error in eval()'d code at line 3) and you might even have go through your database manually to find and fix the error. If it is inside a block that is displayed on all pages and results in a fatal error all the time for example.
The above is also true when upgrading from Drupal 6 to 7 and whatever API's you used were changed.
Drupal modules are the ways to extend (or alter) Drupal's functionality. Modules convey their presence and metadata through an .info file (aka info file or dot info file). Info files defines a set of directives (or properties) that conveys module's name, purpose, compatibility with Druapl version, dependencies, PHP version requirement, etc. to Drupal.
hook_requirements() is a handy Drupal hook exists since 5.x. It helps to check the file permission, availability of external library or any prerequisites essential for a module before enabling it. See API doc. As mentioned in the API doc hook_requirements() can be triggered in different context. It is identified using $phase argument. It is better not to count on Drupal API like t(), l(), url(), etc. here as they could be unavailable when involved in phase "install".
I stumped upon an interesting bug with robotstxt module when I tried to enable it along Drupal core installation from a custom
I came across this case recently. I maintain the tiny module - uiplog which logs the IP address, user id and login timestamp of Drupal site users on login event. The logged details are exposed in a page using views module hook_view_data(). When the uiplog module is disabled the views offered by the module remains active and when the views page is accessed it throws PHP notices and warnings. I was wondering to fix it. After a bit of research I came up with the following snippet to disble views on disabling the module using hook_disable(),
Everyone is aware that CCK has been introduced into Drupal 7 core in the name of Field. A field can be attached to one or more content types (or any Drupal entities). When it is attached it is called as Instance. A field instance can have different properties across the entities and it is configurable from Field UI admin interface. Also it is possible to change from module hook_install() or so with API calls. Recently I had to do this as a part of quiz 7.x module development. Quiz module utilizes the benefit of node system where body field is used to store questions/instructions.
Quiz module has a very long history in the Drupal community. In fact it was one of the oldest projects in Drupal ecosystem. Some of its earlier committers are in very responsible position in Drupal community now. From my inference, in the recent times, I would say it is not far away from getting a place of its own in drupal abandoned modules list, given that we have 2663 recognized installations as of writing this blog post. It has been several months since Drupal 7 was officially released but the community has seldom felt the need of this module.
Recent we had to import a few thousands of users from our third party sites. The users details were available in a CSV file. We felt that user_import module was pretty much aligned to our requirement and the module does more than what we would infer from its name. A quick list of features that the module provides can be found in its project page at drupal.org. However one place where we felt the user_import was lacking is the enhanced support for token integration.
Every user account in our site has been associated to a content profile node. And the CCK fields of node has been mapped to user's