/[drupal]/contributions/modules/swish/swish.theme.inc
ViewVC logotype

Diff of /contributions/modules/swish/swish.theme.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.2, Fri Mar 7 19:03:36 2008 UTC revision 1.1.2.3, Fri Mar 7 22:22:52 2008 UTC
# Line 2  Line 2 
2    
3  /**  /**
4   * Overrides the _search_item hook.   * Overrides the _search_item hook.
5   * Returns a nice html output of each found item.   * Returns HTML markup that, honestly, is actually sort of pathetic.
6     * TODO - need to improve HTML markup
7   */   */
8  function theme_swish_search_item($item){  function theme_swish_search_item($item){
9    global $base_url;    global $base_url;
10    $extra = $item['extra'];    $extra = $item['extra'];
11    
12    $output = '<div style="line-height: 20px;"><img src="'.$base_url.'/modules/swish/images/'. strtolower($extra['file_type'])    $output = '<div style="line-height: 20px;">';
13      .'.png" width="15" height="15" style="display: inline">&nbsp;' . l($item['title'], $item['link']) . '<br/>';    if (file_exists(getcwd() .'/'. drupal_get_path('module', 'swish') .'/images/'. strtolower($extra['file_type']). '.png')) {
14        $output .= '<img src="'.$base_url. '/'. drupal_get_path('module','swish') .'/images/'. strtolower($extra['file_type'])
15        .'.png" width="15" height="15" style="display: inline">&nbsp;';
16      }
17      $output .= l($item['title'], $item['link']) . '<br/>';
18    
19    if ($item['snippet']) {    if ($item['snippet']) {
20      $output .= $item['snippet'].'<br />';      $output .= $item['snippet'].'<br />';

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

  ViewVC Help
Powered by ViewVC 1.1.2