Tag: PHP


Create node with php in Drupal 7

January 29th, 2012 — 6:39am

Creating a node with PHP in Drupal 7 is easy. This can be used to insert one node from a custom form or to insert a batch of nodes from an array of data.

Just follow these instructions to populate a node with PHP.

// start with a blank object
$node = new stdClass();
$node->type = 'node-type';
// adds defaults for node type
node_object_prepare($node);

$node->title = 'Any title';
// set language to default 'und'
$node->language = LANGUAGE_NONE;

// sets node author (can use $node->name instead)
$node->uid = 1;

// set the body field
$node->body[$node->language][0]['value'] = 'text';
$node->body[$node->language][0]['format'] = 'filtered_html';

// most other fields can be added this way
$node->field_name[$node->language][0]['value'] = 'value';

// updates author and publish date
node_submit($node);
node_save($node);
FacebookTwitterRedditDeliciousDiggMixxStumbleUponShare

1 comment » | Programming

Nice to Speed You pt 2

June 2nd, 2011 — 1:17pm

For the Nice to Speed You site I re-created the templates for the new designs. Again created with Jessica (www.interactivexperience.nl). This is a fast paced video dating site.

You can see the new design here: www.nicetospeedyou.com

FacebookTwitterRedditDeliciousDiggMixxStumbleUponShare

Comments Off | Programming

Tablets Plugin

April 12th, 2011 — 6:21am

On this WordPress site I modified the theme and added some custom pages to handle the tablets comparisons. First, there is a page to show all the tablets for selection. Second, once selected another custom page shows the tablets details side-by-side.

www.tabletvergelijker.nl/tablets/tablets/

Once again working with Interactive Xperience

FacebookTwitterRedditDeliciousDiggMixxStumbleUponShare

Comments Off | Programming

Natalia Kosk

February 21st, 2011 — 2:25pm

I did this WordPress site some time ago for a local (Chicago) writer and photographer. It’s a basic WP theme set up to manage her site.

www.nataliakosk.com

FacebookTwitterRedditDeliciousDiggMixxStumbleUponShare

Comments Off | Programming

Maxine Sapulette

January 21st, 2011 — 6:43am

This site was created in conjunction with Interactive Xperience.

I installed and modified the WordPress theme. I updated the header and removed it from non-home pages. The sidebar was also filled with custom widgets.

FacebookTwitterRedditDeliciousDiggMixxStumbleUponShare

Comments Off | Programming

Back to top