| 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 |
| 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 |
} |
} |
| 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 |
?> |
?> |