Aug, 2014
Pathirakaliappan's picture

0 Comments | Submitted by Pathirakaliappan

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. I would like to share the problems and how I overcame the same.
ccl relies on hook_contextual_links_view_alter() which will only alter or add links if there is already a #contextual_links element in the renderable array. The main content block doesn't get the default Configure block contextual link (see _block_get_renderable_array()), and therefore ccl doesn't affect it by default. 
In my case I have added the block on a panel, So the ccl modules doesn't affect my block. So I had to find a workaround. Problem explained in detail below,
I needed to create a contextual link for my follow block (from Follow module). The destination of the link is admin/config/services/follow. Then we have to create a menu for contextual link with the path in hook_menu()

Read more →

May, 2014
selvam's picture

0 Comments | Submitted by selvam

Joyride, the nice guide/tour library based on jQuery, does not work in older version of jQuery (like 1.3 or 1.4). We had a Drupal 6 project, where we wanted it. Our Drupal 6 site used jQuery 1.3 version.  We tweaked the joyride code to make it work in jQuery 1.3. Basically,

1. We included a function that is not a part of 1.3 version (isEmptyObject) 

2. Older versions of jquery seems to differ in the way constructor context are being utlized. Hence we had to find the correct next li item using a bit of code,

  1. var index = settings.$tip_content.index(settings.$li);

You can download the modified Joyride code from here. We hope this helps someone in need :)

Read more →

May, 2014
sivaji's picture

2 Comments | Submitted by sivaji

At KnackForge we use Drush more often as a part of Drupal development projects. As Drupal developers, we frequently feel the need for getting the most recent database dump from live site. When I did this recently, it was relatively a big site, thought it would be nice to skip a few tables that are not essential. At least to avoid unnecessary time spent on I/O operations. This is one of the few things that I have least tried with Drush.

Quick Google Search led me to Drush project issue in drupal.org, mostly outdated posts. Had to connect the dots found here and there to get eventually what I needed, hence writing this blog post.

To skip specific tables when using drush sql-dump and sql-sync, in drushrc.php need to have the below code in place,

Read more →

May, 2014
sivaji's picture

0 Comments | Submitted by sivaji

Alternative PHP Cache (APC) is one of the best PHP accelerators around for a while.

Wikipedia ideally describes the same as below,

Alternative PHP Cache is a free, open source (PHP license) framework that caches the output of the PHP bytecode compiler in shared memory, thus reducing parsing and disk I/O overhead for later requests; and a shared memory cache for user data. For an application consisting of a large source code base such as Drupal, a 3x increase in page generation speed is possible as a result.

As mentioned the complied bytecode is loaded into the RAM to speed up the execution of consecutive requests.

Almost for every Drupal sites we use APC to keep the response time within the ideal range. But knowing how much of RAM to block for APC helps to leverage best of framework and possibility prevents from under utilizing the expensive resource (RAM).

While working in my recent projects, I came across a script, apc.php which helps to find answer for this question. Since it is being shipped with official framework package, it is trustworthy and needs no configuration to get started.

We prefer Ubuntu LTS for our Drupal servers. In our case, apc.php was found at /usr/share/doc/php-apc/apc.php.gz.

Utility commands like locate (# locate apc.php) could help to return its absolute path, in case it's different in your distribution.

Read more →

Apr, 2014
sivaji's picture

2 Comments | Submitted by sivaji

Ardent team at KnackForge always love to get hands dirty with challenging projects. In this connection we recently took an interesting newsletter sending project from one of our potential clients who is doing relatively big in Internet marketing.

In brief, we were asked for a custom system for sending out newsletter emails, based on Drupal. Tentatively 600k emails to be sent per month. A newsletter list shall have up to 80k users and limited to a couple of lists to begin with.

After a few rounds of discussion we arbitrated to go with Mandrill email service. Sendgrid and AWS SNS were the other items we had in our list of service providers.

We got started with a site from client that already had simplenews, mandrill, mimemail, ckeditor, etc. pre-configured for us. I have covered in length about this in my previous blog Leveraging CKeditor template to theme Drupal contents and needs no much explanation for anyone who has already done newsletter site in Drupal. Everything looked straightforward until this point :)

On top of it, we did introduce a few features,

Read more →

Subscribe to RSS - Drupal planet