Skip to main content

drupal

Feeds Tamper

Posted in
Feeds Tamper provides a small plugin architecture for Feeds to modify data before it gets saved. Several plugins are available by default and are described in the examples section below. Additional plugins can be added in separate modules or through the issue queue.

Varnish with Authenticated Users

Resources
Pressflow 6.14.64 and Authcache
Authenticated User Page Caching
Cache Control - sandbox module for controlling Varnish cache for authenticated users

Varnishing Polls

Accepting votes from anonymous users on Drupal polls is complicated when you use caching. By using Edge Side Includes (ESI), you can dynamically load some parts of a Drupal page while caching the rest of it. The addition of the Poll Enhancements module allows multiple anonymous users to vote on polls by using cookies to track who has voted.

Edge Side Includes integration
The ESI module includes two Varnish VCL files (located in the docs directory of the module:

  • docs/esi_blocks.vcl - custom sub-routines to handle ESI-block integration.
    Copy this file to the Varnish config directory, /usr/local/etc/varnish/

Varnish Module

Posted in

The Varnish HTTP Accelerator Integration module provides integration between your Drupal site and Varnish. This module provides admin-socket integration which allows Drupal to dynamically invalidate cache entries, and also lets you query the Varnish admin interface for status, etc.

Requirements

  • PHP must be compiled with --enable-sockets
  • Edit /service/varnish/run and add -T 127.0.0.1:6082 to start the admin interface on the default module port.

Varnish

Accelerate your Drupal/Pressflow site using Varnish

The primary reason for switching to Pressflow is to use an HTTP accelerator such as Varnish
Apache Configuration
Adjust your Apache configuration to server the Drupal site on port 8080. Edit your Apache conf file and add:

Listen 8080
NameVirtualHost *:8080

Restart Apache and make sure you can access your site on that port.

Varnish Configuration

Pressflow

Posted in

Pressflow is a distribution of Drupal with integrated performance, scalability, availability, and testing enhancements. It can integrate with a web proxy such as Varnish

Add Pressflow base to your Drupal SVN repo
Assuming you have your Drupal repo checked out in /tmp/drupal, create a base folder for Pressflow:

cd /tmp/drupal
svnmkdir pressflow
svn commit -m "Pressflow folder added."

Add/Upgrade the current version of Pressflow to your Drupal repo
Then download the current version of Pressflow and load it into the repo:

cd /tmp
wget http://launchpad.net/pressflow/6.x/6.20.97/+download/pressflow-6.20.97.tar.gz
tar zxf pressflow-6.20.97.tar.gz
rm -f pressflow-6.20.97.tar.gz

Get tid

Posted in

$storyVid = <vid of the taxonomy you want to match the term to>
$storyTerms = taxonomy_get_term_by_name($termName);
foreach ($storyTerms as $storyTerm) {
  if ( $storyTerm->vid != $storyVid ) {
    $storyTid = $storyTerm->tid;
  }
}

Syndicate content