Drupal

Creating a Subtheme of Bartik in Drupal 7

Drupal makes it very easy to modify a theme, and still be able to apply updates to that heme as they are released. This is done with a subtheme. Essentially, it is a level on top of an existing theme that changes that theme. Leaving the underlying theme untouched. Any updates to the underlying theme can be easily applied without having to repatch changes.

To implement a subtheme of, say, Bartik

Tags:

Drupal Modules:

Load a Node by Title in Drupal

You can load a node if you know its Node ID using

        $node = node_load($nid);

But if you know its title only, you can load the node as follows

Tags:

Modifying a Node before/after it is saved in Drupal 7

To modify a node before it is saved to the database, use the hook_node_pressave() function

Tags:

Drupal 7 Displaying an Image in Code

I have a Ubercart Product that is loosly linked to some data. I want to display the first image attached to that Product and I know the Node ID of the product.

Tags:

Drupal Modules:

Using AWS SDK for PHP

So I want to divide the raw data being collected in my current project from the administrative data. The situiation is there will be thousands of small devices gathering data and sending that back to a data repository. A series of polling servers will request ("pull") data from the dumber of the devices and place them in this database. The smarter devices will "push" straight to an "API" server that then does the same. There is going to be a massive amount of data and I don't want the front end site slowed down.

Tags:

Drupal Modules:

What Path is the current page in Drupal 7

When you are writing code that will fit into a page, how do you know the page you are on.

There are two (2) paths. The Real path that Drupal uses

node/147

Which can be found this function.

current_path();

And the Aliased path that you are actually using. PathAuto will do this for you or you might manually set a path.

Tags:

Add a "List" tab on a node to take you back to a list of records

I have a content type called "Personal Links" that have a list of URLs that I want to store - bookmarks. I also have a view that lists this links where the current user is the creator.

What I want is that when I am looking at the details page or edit page for a personal link, I have the option of a "List" tab that takes me back to the list of all my links.

I do this with Page manager

Tags:

Drupal Modules:

Write a Custom Panel for Page Manager in Drupal 7

Page Manager allows you to build up a "page" with smaller "panels", such that you can add fields, blocks and views into different layouts. But how do you write your own custom panel?

Page Manager is a part of the Chaos Tools module.

Register a Plugin Directory

Create this function in your modules .module file. This simply tells cTools where to look for additional plugins.

Remember that Chaos Tools uses the term "Content Types" differently to the Drupal Core.

Tags:

Drupal Modules:

View a node's data with Drush

drush php-eval "print print_r(node_load(109), 1)"

Tags:

Drupal Modules:

Saving Adhoc Data in Drupal 7

If you want to play with nodes, taxomony and comments, there is a process and set of functions that you should use to do that.

If you just want to drop some adhoc data into a table, then you can use the db_insert() function.

Here is an example.

Tags:

Pages

Subscribe to RSS - Drupal

Your IP Info

IP Address Locator

Speed Test

Test how fast your Internet connection really is.

DropBox

Use this link to get DropBox http://db.tt/iQHWaaF