Blog Page
Blogs
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 thePresenting 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 . 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($nodeObjDisable 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[] = "Text1.
"?>