All pastes #804773 Raw Edit

Untitled

public php v1 · immutable
·published 2007-12-03 19:54 UTC
rendered paste body
<?phpfunction nationalpages_node($node, $teaser = 0, $page = 0) {    drupal_set_message('nationalpages_node is called');    if (module_exists('taxonomy')) {    $taxonomy = taxonomy_link('taxonomy terms', $node);  }  else {    $taxonomy = array();  }  $variables = array(    'content'        => ($teaser && $node->teaser) ? $node->teaser : $node->body,    'date'           => format_date($node->created),    'links'          => $node->links ? theme('links', $node->links, array('class' => 'links inline')) : '',    'name'           => theme('username', $node),    'node'           => $node,  // we pass the actual node to allow more customization    'node_url'       => url('node/'. $node->nid),    'page'           => $page,    'taxonomy'       => $taxonomy,    'teaser'         => $teaser,    'terms'          => theme('links', $taxonomy, array('class' => 'links inline')),    'title'          => check_plain($node->title), 	'locale' 		 => check_markup($node->countryname)  );//	$variables['jahan'] = 'Checking some content here also';  // Flatten the node object's member fields.  $variables = array_merge((array)$node, $variables);  // Display info only on certain node types.  if (theme_get_setting('toggle_node_info_' . $node->type)) {   // $variables['submitted'] = t('Submitted by !a on @b.', array('!a' => theme('username', $node), '@b' => format_date($node->created)));    $variables['picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', $node) : '';  }  else {    $variables['submitted'] = '';    $variables['picture'] = '';  }    return _phptemplate_callback('page-front', $variables);}?>