Tutorials

Environment Specific settings.php Overrides

caschbre's picture

Throughout a development life-cycle code may move between various environments (e.g. Development -> Integration -> Staging -> Production), however we may not want every environment to have the exact same setup. An example of this might be that on Staging and Production we have CSS / JS aggregation enabled along with caching. On a Development environment we may want both of those disabled. The database connection is also going to be different on each environment.

Positioning the User's Profile Picture on the Manage Display Screen

caschbre's picture

It's been a while since I've had time to share my Drupal experiences with the community. New additions to the family, moving, and a large / length Drupal project have taken up my time. Hopefully things are easing up a bit and I'll be back to sharing.

Have you ever noticed that not all elements rendered on the user account page are visible on the user account -> manage display configuration page?

Integrating home grown and feed content with the #drupal aggregator module

caschbre's picture

On a project that I'm working on, a situation has arose where the client wants to display content that is both generated directly on their site and sourced from external sites (i.e. feeds).  To the end user this should be a fairly seamless experience and there are a couple of solutions that should satisfy this requirement.

Concepts to keep in mind.

  • Integration of home grown content and content from external sources.
  • Provide as seamless a user experience as possible.
  • Some sourced content (via feeds) may only contain titles and / or teasers.

Twitter widget using the Computed Field CCK module

caschbre's picture

In an earlier article I described how we can create a drupal block to display a twitter profile widget.  This earlier method would use PHP in the block to evaluate the node each time and check if a twitter account existed.  It works great but there are other alternatives I wanted to explore.

Yesterday I started using the computed field module.  This is a CCK add-on module that executes PHP code during a node insert/update and (optionally) stores that value in the database.  I say optionally because I believe you can also set it to evaluate PHP on the fly, however for something like a twitter widget we don't need to do this dynamically.  Once the widget information is stored in the database we only need to display it.

So the objective here is to use the computed field to check if the node contains a twitter account.  If it does then we simply compute the widget code and save it.  If not, we leave it blank.  So let's get started.

A different twitter widget for each #drupal node

caschbre's picture

I'm putting together a site that has a content type called Company.  Each company may or may not have a twitter account where they broadcast updates.  The requirement is to display a twitter widget on each company node if one exists.  

My first thought was to search through the list of custom modules instead of trying to reinvent the wheel.  I found several twitter-related modules, however nothing seemed to fit the bill.  The closest module was the twitter module but that connects users accounts to their twitter accounts.  I need something to connect companies (as nodes).

Later through a google search I found that twitter.com offers widgets, and specifically a profile widget.  The profile widget, which you can now see on the right side of this blog, provides the html/script code to place inside of your website to display the twitter feed of any account.  We can use this widget and create a drupal block with some PHP code to pull the twitter account from the company node and display this widget.

An alternative method to role management in #drupal

caschbre's picture

I'm putting together a small drupal site for a group of very non-technical users.  There are three departments that together make up the whole team.  Each department has different responsibilities (i.e. roles / permissions) on the site.  I needed to find an easy way for this role management to be handled by department heads and not the site administrator (user #1).  

A couple of modules exist that provide role management capabilities / permissions.  These include the RoleAssign and Roll Delegation modules.  These modules were not ideal however.  

How to create tabs within groups with friendly URLs

caschbre's picture

I've had several folks ask about how I created group home pages that included tabbed content.  I had several threads on the Drupal forums that discussed how to accomplish this but I had always intended to follow up with an actual tutorial. 

Modules used in this tutorial

The following are the main modules I'll be discussing, however several of these modules depend on other contrib modules like token.

Subscribe to RSS - tutorials
© 2010 PortalDNA. Drupal theme by Kiwi Themes.