Helping Others Help Others

More than one module has defined the node-url token

The problem is located within the Notifications 6.x -2.2 module. Open up /sites/all/modules/notifications/notifications_content/notifications_content.module and comment out lines 847 and 867. // $tokens['node']['node-url'] = t('The node view url for read more links.'); // $values['node-url'] = url('node/'. $node->nid, array('absolute' => TRUE) A patch is also available in the Notifications issue queue.

CiviCRM and Google Apps email

How to get CiviCRM and Google Apps to play along? To set up outbound email in CiviCRM using Google Apps enter the following under Administer CiviCRM › Global Settings › Settings - Outbound Mail: Select Mailer: SMTP SMTP Server: ssl://smtp.gmail.com SMTP Port: 465 Authentication?: Yes SMTP Username: user@domain.com SMTP Password: xxxxxxxx Save & Test Email to verify the settings. Beware that standard Gmail and free version of Google Apps has a limit of 500 sent emails per day, while Google Apps for non-profits and educational institutions has a limit of 2,000 per domain per day. Don't forget to

Embedding Google Maps

Recently a client inquired about incorporating a map within their event calendar. For relevant events they already provide the address in a field, so how can we provide the visitors with a navigable map? The robust solution involves combination of Location and GMap modules. But this simple application does not pull complex database location queries, nor is it combining multiple locations onto the map. Effectively, it's a matter of stringing the address field into a Google Maps URL and embedding the iframe. The simple solution assumes you have CCK module installed, which you'd also need for the

Presenting at OpenCamp

OpenCamp is southwest’s first multi-platform web conference taking place August 27-29, 2010 in Addison, TX. Hundreds of attendees will participate in WordPress, Drupal, Joomla!, and .NET sessions throughout the weekend. On Saturday, August 28, 2010 at 10:30 AM I will be presenting CiviCRM for Non-Profits and Small Businesses in the Drupal track. Join in and learn about what a CRM system can do for your organization! If you are following on Twitter, use #OCDFW.

Node Title for Custom Pagers

Custom Pagers module adds useful navigation to chosen nodes. The navigation can be displayed at the top and/or bottom of node's content, allows selection of specific node types, and further tweaking can be done with views. By default, however, custom pagers can only print <previous next >. How to display the node titles instead? Add this function to the template.php of the chosen theme: function phptemplate_preprocess_custom_pager(&$vars) { $nav = $vars['nav_array']; $prev = 'prev'; if (!empty($nav['prev'])) { $nodeObj = node_load($nav['prev']); if ($nodeObj) { $prev = node_page_title($nodeObj

Disable Google Analytics by Role or User

Update: new code to allow excluding individual node as well as roles and users. Google Analytics module allows for tracking by selected roles. What it does not natively provide is a mechanism to exclude specific roles. To disable tracking for a particular role or even a specific user, edit Page specific tracking settings section. Choose Add if the following PHP code returns TRUE and enter the following code, adjusting the role names and the user IDs (uid). This could be also used for control of block displays, when displaying content to authenticated users but excluding a particular role. <

Simple Rotating Block Content

There are a number of solutions available for management of content display within a block, creating slideshows, tabs, etc. Sometimes a simple rotating message is needed, and can be accomplished with a few lines of code. This example has 4 quotes with css classes that can be further styled in the theme's css. One of the pre-requisites for entering php code into blocks is enabling PHP filter in admin/build/modules and setting appropriate user permissions. Once in the block edit mode, be sure to choose PHP code as the Input Format. <?php $quotes[] = "<div class=\"front-quote-text\">Text1.</div>"

View advanced visitor data in Statistics Advanced module

View advanced visitor data through a view. Follow the instructions below, or download and import stats_access_log.txt Download and import the view as described at http://drupal.org/node/398184 Edit the view Change path in the following displays as follows: Page: admin/reports/stats-view/main Page-Hostname: admin/reports/stats-view/hostname/% Page-PageTitle: admin/reports/stats-view/hostname/% For the Default display: Select Access log: Page title under Fields Check Output this field as a link and set Link path: admin/reports/stats-view/pagetitle/[title] Click Update Select Access log: Hostname

Gushing over Drush

One of the best Drupal modules yet - Drush. Actually it's not a traditional module - it's a command line toolset. In other words, if you enjoyed UNIX, DOS, or BASIC (working without GUI), this is for you. If you have no idea what the above means, stop now. The video below shows installation of views, context, token, cck, and drush module manager. Final times: Manual Method: 2:38:75, Drush Method: 1:17:57. Multiply those savings by 20-30 modules and weekly updates. This will be the first tool I will have in any future installs. To take advantage of Drush, you must have SSH access to your web

Multisite Drush

The Drush enjoyment doesn't stop with single site installations. To ensure typo-free commands in multi-site environments, I have set up additional aliases in .bashrc. alias drush1='/home/account/drush/drush -l http://example1.com/' alias drush2='/home/account/drush/drush -l http://example2.com/' This allows for a command like drush1 status or drush1 update to quickly work on the first web site, while drush2 update automagically knows to only update modules on the second web site. Add aliases as desired!