You are here

function gallery_assist_title_box in Gallery Assist 6

Build and return the item title box.

1 call to gallery_assist_title_box()
gallery_assist_item_box in ./gallery_assist_display.inc
Build and return the gallery item box.

File

./gallery_assist_display.inc, line 464
Build and display the Gallery Assist Container. This file will be included if the parameter "show_layout" is setted to "grid"

Code

function gallery_assist_title_box($item, $conf) {
  $points = drupal_strlen($item->ptitle) > $conf['title_substr'] ? "..." : '';
  $title = drupal_substr($item->ptitle, 0, $conf['title_substr']) . $points;
  $op = empty($conf['ga_item_title_type']) ? 0 : $conf['ga_item_title_type'];
  switch ($op) {
    case 0:
      $output = '<div id="title-box-' . $item->pid . '" class="' . $item->nodetype . ' title-box">' . "\n";
      $output .= l($title, 'node/' . $item->my_nid . '/' . $item->pid, array(
        'html' => TRUE,
        'attributes' => array(
          'title' => $item->ptitle,
        ),
      ));
      $output .= '</div>' . "\n";
      break;
    case 1:
      $output = '<div id="title-box-' . $item->pid . '" class="' . $item->nodetype . ' title-box">' . "\n";
      $output .= $title;
      $output .= '</div>' . "\n";
      break;
  }
  return $output;
}