Technical Tuesday

Setting Up CiviContribute Forms For Anonymous Users (ACLs and User Access)

Here is a little tip that will make your life easier, especially the first time you go down the road of setting up CiviCRM's CiviContribute forms for a website where anonymous users will be making donations (not anonymous donations, just users that are not logged in). When setting up CiviContribute you need to grant access via the Drupal User Access to "make online contributions" to anonymous users, AND you also need to add an ACL to CiviCRM for "Everyone" to access the profile you are using for online donations.

Aggregating Delicious Bookmarks From Multiple People

Last week Andy Laken asked me if there was a way to aggregate only select bookmarks from a group of users that would prevent an "unauthorized" user from posting a bookmark to the pool.  The aggregated bookmars would then be published ona  website.  After a little bit of thinking and some exploration while on the phone, we figured it out. Here is a quick and dirty recipe for creating a group bookmark feed from delicious.
  1. Get everyone delicious accounts

Creating A View To Display a Users Buddies to Other Users

I'm working on a site that will launch soon that features some social networking functionality, including friend lists. We are using the Buddylist2 module and while there are some default blocks for things like "My Buddies" that show a user their buddies, there was not a similar block that would show one user another user's buddies. We were able to create a custom view with the argument "Buddylist2: Nodes author is buddy of UID" that used the following custom argument handling code:
  • Continue reading
  • Customizing "View More" Links In Views 1 For Drupal 5

    A short, quick and easy tip for views theming and customization. To customize the text or the destination path/url of a 'view more' link in Views. Add this to template.php in your phptemplate theme and add cases.
    <?php
    /**
    * Override theme_views_more() to set custom link texts and destinations.
    * @param $path String
    *   The destination of the more link.
    */
    function _phptemplate_views_more($path) {
     
    $text = 'more';
      switch (
    $path) {
        case
    'foo/bar':
         
    $text = 'doh';
          break;
      }
      return
    "<div class='more-link'>" . l(t($text), $path) . "</div>";
    }
    ?>

    How To Rebuild The Menu In Drupal 6

    To rebuild the menu in Drupal 6 you have to go to admin/build/modules. In drupal 5 the menu is cached in the cache_menu table, so it is easy to invoke a menu-rebuild by emptying the table with a simple mysql command like TRUNCATE cache_menu;. (I have a handy script that empties all tables starting with cache_).

    Firefox Tip: Changing Default Browser URL Bar Behavior On Click

    A few months ago when I started using FF3 beta I was being driven mad by the default behavior of the browser when you clicked on the url in the address bar, a single click would highlight the entire url. Typically I click on the url with the intention of appending the url with something like "admin/build/views" and the entire url would get wiped out. Well, Owen heard my plight and taught me out to change this behavior:

    How to create a flexible events listing with views and panels 2 and CCK node reference

    Required modules: Panels 2 (which includes various sub modules), views, CCK: date, text, noderefence.
    Optional: pathauto, path, token

    Tech Tuesday: Clean URLS In CiviCRM Or How To Use Menus to Link to CiviCRM Forms

    Ron asked me for a little help on a side project where he was having trouble adding a link to a CiviCRM contribution form to a primary navigation menu. This is a pretty common requirement: you want a "donate now" link in your primary nav. You are using CiviCRM for donations. You figure, "I'll just add the civicrm contribution form url to the path field for my menu item." Well, unfortunately you figured wrong.

    Contextual Help in Module Development

    One of the findings of the Drupal usability testing at UMN in February was that users like, use and like to use contextual help. Many of the participants explicitly said that they would have liked more of it during their evaluations and in debriefing. As a developer it is difficult to anticipate where contextual help is appropriate, needed or perhaps why it's even necessary. While usability testing is possibly the only way to effectively determine exactly where contextual help is needed and useful and where it's not, I think this example might help developers understand when where and why contextual help is likely to be helpful. This is part of developing sympathy for the user.

    Tech Tuesday: Loading GMaps Asynchronously On The Witness Hub

    Last week the Witness Hub was updated with new enhancements and features -- most obviously, the Hub Map is now also on the home page!

    Here is a video demonstration:

    This feature required asynchronous loading of the Hub Map, including it's full-screen switcher and chunk marker loader code and features, on-load of the 'Map' tab (a Hub-customized version of jQuery tabs).

    Syndicate content