0) {
    $robots_meta = isset($robots_meta[1]) ? implode(', ', $robots_meta) : $robots_meta[0];
    $robots_meta = '\n";
  }
  else {
    $robots_meta = '';
  }
  return $robots_meta;
}
/**
 * Generates the HTML to insert in the template file
 *
 * @return string
 */
function _print_var_generator($node, $cid = NULL) {
  global $base_url, $language;
  $path = empty($node->nid) ? $node->path : "node/$node->nid";
  $themed = theme('print_text');
  // print module settings
  $print_settings = variable_get('print_settings', print_settings_default());
  $print_html_settings = variable_get('print_html_settings', print_html_settings_default());
  $print_sourceurl_settings = variable_get('print_sourceurl_settings', print_sourceurl_settings_default());
  $print["language"] = $language->language;
  $print["title"] = $node->title;
  $print["robots_meta"] = _print_robots_meta_generator();
  $print["base_href"] = "\n" : "";
  /* Grab and format the src URL */
  if (empty($print_sourceurl_settings['forcenode'])) {
    $print["url"] = url($path, array('absolute' => TRUE));
  }
  else {
    $print["url"] = $base_url .'/'. (((bool)variable_get('clean_url', '0')) ? '' : '?q=') . $path;
  }
  if ($cid) {
    $print["url"] .= "#comment-$cid";
  }
  if ($print_sourceurl_settings['enabled'] == 1) {
    $print["printdate"] = $print_sourceurl_settings['date'] ? (" (". $themed['retrieved'] ." ". format_date(time(), 'small') .")") : "";
    $print["source_url"] = "". $themed['sourceURL'] . $print["printdate"] .": ". $print["url"] ."";
  }
  else {
    $print["source_url"] = "";
  }
  $print["site_name"] = variable_get('site_name', 0) ? ($themed['published'] ." ". variable_get('site_name', 0) ." (". l($base_url, $base_url) .")") : "";
  $print["submitted"] = theme_get_setting("toggle_node_info_$node->type") ? $themed['by'] ." ". ($node->name ? $node->name : variable_get('anonymous', t('Anonymous'))) : "";
  $print["created"] = theme_get_setting("toggle_node_info_$node->type") ? $themed['created'] ." ". format_date($node->created, 'small') : "";
  menu_set_active_item($path);
  $breadcrumb = drupal_get_breadcrumb();
  if (!empty($breadcrumb)) {
    $breadcrumb[] = menu_get_active_title();
    $print["breadcrumb"] = implode(" > ", $breadcrumb);
  }
  else {
    $print["breadcrumb"] = "";
  }
  // Display the collected links at the bottom of the page. Code once taken from Kjartan Mannes' project.module
  if (!empty($print_settings['urls'])) {
    $urls = _print_friendly_urls();
    $max = count($urls);
    if ($max) {
      $print["pfp_links"] = '';
      for ($i = 0; $i < $max; $i++) {
        $print["pfp_links"] .= '['. ($i + 1) .'] '. $urls[$i] ."
\n";
      }
      $print["pfp_links"] = "
". $themed['links'] ."
". $print["pfp_links"] ."