Skip to main content

Drupal 7

knackforge blog knowledge base

Drupal 7: Invoking custom callback in maintenance mode

In a Drupal site, if we have any module upgrade or configuration related work to be done in our live site, it is recommended to put the site in maintenance mode, so we can prevent end users from experiencing glitches.
 
When the site is operating in maintenance mode, any page request would return only maintenance message. Some pages are allowed to access though. The login functionality for instance will work in the maintenance mode.
knackforge blog knowledge base

How to add contextual link on a block

Contextual link is a nice addition made into Drupal 7 to favor usability. It offers, quick links to pages performing administrative operations. By default it is available for core block and node teaser view. But designed to be made extendable for other items too - Views, panels, and so.
 
Custom contextual link (aka ccl) module is the best choice for adding custom link items.
 
But I have faced some problems in ccl module while adding a custom contextual link for a block.
drupal themeing

Leveraging CKeditor template to theme Drupal contents

WYSIWYG (a.k.a HTML Editor) has become a De facto for quickly formatting and publishing contents from dynamic site like Drupal. This is certainly a time saver and prevents from getting hands dirty with HTML.

In this connection, CKEditor has been a pioneer and around in use and development cycle for a decade (first release was on March 2003, in the name FCKeditor).

onfirmation emails from simplenews

Make confirmation emails from simplenews obey newsletter settings

Simplenews is one of the solid Newsletter management modules for Drupal. It allows a Drupal site to have multiple newsletters at once, nodes can be sent out as newsletter to multiple recipients on a single cron run. It plays well with HTML emails as well with Editors like WYSIWYG, Drupal mail system and other contrib modules like Mime Mail. Besides these, it allows to have specific sender name and email address per newsletter.

Custom drush command

Creating a custom drush command

No Drupal Developer needs introduction about Drush. The power and features of Drush has made the job easier for many developers. Drush by default has a list of commands that we can make use of, the entire list can be seen here. But apart from that, the Drush does has the feature to allow custom commands. 
 
These custom commands can be used as per our need and scenarios. In my case, I had the need to list the users in site using a Drush command.
bootstrap  form tabs

Creating horizontal form tabs in Drupal 7

Creating Vertical tabs in Drupal 7 forms is an easy task, but to accommodate the design needs we at times have to use different style. For instance, horizontal tab might be needed. The same makes more sense for shopping cart check out like pages. And here the need for looking solutions outside the Drupal core arises as horizontal tabs are not readily available in core.

wysiwyg editor

Alter WYSIWYG's form height

Once the installation of a Drupal instance is done, I guess almost 90% of the developers would first download "What You See Is What You Get".  Inline formatting, Text format options, Hyperlinks, Media and iframe support all these makes WYSIWYG a heaven to opt first after installation. No developer would have the heart to say any shortcoming in this feature rich but yet simple module, I am no exception to this too !

knackforge blog knowledge base

Make panel's title translatable

Panels provides great salvage to those lost in the sea of page partition and block placement. It might take more than one blog to completely explain all the concepts, merits and advantages of using panels module in our site. But those who use Internationalization might differ a bit with my statement ! Yes, One of the shortcomings that I noticed recently in the panel's module is its ability to deal jointly with the Internationalization.

Subscribe to Drupal 7