Skip to main content

Blog

Node ID as View Argument from SEO-friendly URL Path

Scenario: two content types - department, employee. Employee has a CCK node reference back to department, with a Pathauto setting for URL generation in the format of department/employee. Within the Views page views we want 2 or more separate lists, perhaps one displaying current associated employee projects, and another one all past projects. The respective page displays would have paths set to department/%/current and department/%/past, with % being the employee argument used within the view. Normally, that's not a problem as the argument can be set to Provide default argument ...
Read more

Disable Google Analytics by Role, User, or nid

If you utilize the code to disable Google Analytics by role or user within the module, it leaves you no easy way to exclude individual nodes. Getting the node id (nid) and adding a few extra lines of code that will check against a predefined array results in new code: <?php global $user; // These are the roles, uid, and nid which should not see this module $notallowed_role = array('Administrator','Contributor','Forum admin'); $notallowed_uid = array(1,8); $notallowed_nid = array(1,2,3); // Assume they can see it to start $valid=TRUE; // Go through each ...
Read more

Inaugural Dallas / Fort Worth CiviCRM Meetup

Following the great response from OpenCamp and the recent Dallas Drupal User group meeting, the Dallas / Fort Worth CiviCRM Meetup is a reality! Join us on October 11 at this inaugural meeting to find how you can use this open source solution in your non-profit organization or a small business. We'll cover the basics of CiviCRM and explore the newest features released in version 3.2.3. We'll hold an informal open floor for people to present how they use CiviCRM and for others to ask questions about the CRM system.
Read more

Presenting at Dallas Drupal Meetup

Following up the significant response to CiviCRM at OpenCamp, I will be presenting a brief overview of this tool at the Dallas Drupal Meetup on Monday, September 20, 2010 at 7:00 PM. There is already some talk about starting a local CiviCRM Meetup group. Come up on Monday and stay tuned to possible regular meetings.
Read more

Remove Tabs and Elements from CKEditor Dialog Window

Sometimes having too many options confuses the end users, or it allows them to play with functions you would rather not expose. This came from a futile attempt to communicate the relevance of using site contact forms instead of exposing email addresses with mailto:// links - bots and spammers harvest these automatically, and then your (and your company's) inbox are overflowing with spam. Here is how to remove tabs and elements from the heavily JavaScripted CKEditor dialog windows. This approach works with the standalone editor, with Drupal's WYSIWYG module, or ...
Read more

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.
Read more

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 ...
Read more

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 ...
Read more

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.
Read more

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); } } $next = 'next' ...
Read more