How To Get To A Value From An Array

I'm trying to figure out how to get the value "[name] => Washington" from below. field_an_events_state is a D7 field type "Term reference" that looks up the state from a taxonomy vocabulary. For a normal field, I can just do

print $content['field_event_country']['#items']['0']['value'];

But everything I've tried to get "[name] => Washington" from here fails me. This is in a node tpl file.

Removing Core and Module CSS in template.php

Had a hard time finding an answer to this so I thought I would post my findings here for the next developer.

Now it's not always the best idea to remove Drupal's core or module CSS but frankly. I can only think of rare occasions where I would want Drupal to have anything to say about it. I pieced together bits and pieces of code that I found here and there and came up with this.

Connect to MSSQL DB via Provider

Can anyone help me translate an ASP.net connection to a Microsoft SQL Server database through a provider? I know how to add database connections via settings.php but it's imperative for this task we connect through our provider. Below is the code:

Controlling user ability to post to specific paths

I'm looking for a means to control users' ability to post (and edit or delete) content within a specific path. Essentially, the client wants a group of subsites each with their subdirectory. All subsites should allow view access to all users, but only specific users would be able to create new content or manipulate the content in a given subsite.

For instance, everyone can view the content in clientsite.com/region1, but only users with the Region 1 Author role could post new content to appear there and only Region 1 Managers could edit or delete any content there.

My initial thought was the Domain Access module, but that won't work for subdirectories.

The next logical choice is to use the multisite functionality and set up each subsite as its own site. To get the access controls we need, though, would require sharing some tables and having some in different databases and could cause problems with searching for content across the subsites.

Drupal 7: Display summaries on front page?

I'm sure this has to be pretty simple, but as I play around with Drupal 7 and try to familiarize myself with the features and admin overlay screen, I can't figure out how to have the summary/teaser (are the two terms interchangeable?) of an article displayed — instead of the entire article — on the front page.

Can anyone point out how to handle this most basic of tasks? If it's any incentive, you can be sure I'll feel quite foolish when I realize how simple this is.

How to include added fields in New User created by user_save()

I wish to be able to create users using data from an external database.

I have managed to do the basics with user_save() but I can't work out how to include a value for an added field in the creation process. In this case the extra field is an employee number whch is used as a foroegn key back to the extrernal database.

In it's simpllest form I have:

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x