/[drupal]/contributions/modules/aggregator2/aggregator2_logo.module
ViewVC logotype

Diff of /contributions/modules/aggregator2/aggregator2_logo.module

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

revision 1.3.2.1, Fri Feb 3 10:02:15 2006 UTC revision 1.3.2.2, Thu Jul 20 11:31:06 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: aggregator2_logo.module,v 1.3 2005-12-09 17:59:22 ahwayakchih Exp $  // $Id: aggregator2_logo.module,v 1.2 2005/10/09 18:55:15 ahwayakchih Exp $
3    
4  /*  /*
5   * Aggregator2 Logo filter   * Aggregator2 Logo filter
# Line 51  function aggregator2_logo_nodeapi(&$node Line 51  function aggregator2_logo_nodeapi(&$node
51      ($teaser && $node->item_show_link == AGGREGATOR2_SHOW_LINK_TEASER_ONLY) ||      ($teaser && $node->item_show_link == AGGREGATOR2_SHOW_LINK_TEASER_ONLY) ||
52      (!$teaser && $node->item_show_link == AGGREGATOR2_SHOW_LINK_PAGE_ONLY)) {      (!$teaser && $node->item_show_link == AGGREGATOR2_SHOW_LINK_PAGE_ONLY)) {
53        if ($teaser) {        if ($teaser) {
54          $node->teaser = theme('feed_logo', $node->image).$node->teaser;          $node->teaser = theme('feed_logo', $node) . $node->teaser;
55        }        }
56        else {        else {
57          $node->body = theme('feed_logo', $node->image).$node->body;          $node->body = theme('feed_logo', $node) . $node->body;
58        }        }
59    }    }
60  }  }
# Line 74  function aggregator2_logo_settings() { Line 74  function aggregator2_logo_settings() {
74  /**  /**
75   * Theme feed logo/link.   * Theme feed logo/link.
76   */   */
77  function theme_feed_logo(&$image) {  function theme_feed_logo(&$node) {
78    return '<div class="feed_logo">'.$image.'</div>';          if (strlen($node->image) < 1) {
79                    return '';
80            }
81    
82            $pos = strpos($node->image, 'http://');
83            if ($pos !== false && $pos == 0) {
84                    return '<div class="feed_logo"><a href="'. ($node->feed_link ? $node->feed_link : $node->link) .'" class="aggregator2_logo_link"><img src="'. $node->image .'" class="aggregator2_logo" alt="'. ($node->feed_title ? $node->feed_title : $node->title) .'" /></a></div>';
85            }
86            else {
87              return '<div class="feed_logo">'.$node->image.'</div>';
88            }
89  }  }
90  ?>  ?>

Legend:
Removed from v.1.3.2.1  
changed lines
  Added in v.1.3.2.2

  ViewVC Help
Powered by ViewVC 1.1.2